mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
fix(coach): catalog the decline and clarify-choice strings, and let a briefing asked for by hand reason
This commit is contained in:
1 parent
8f9c443d35
commit
e59fef2545
7 files changed
+21
-12
No files matched your search
@@ -120,8 +120,9 @@ describe("v1.41 contract keys", () => {
|
||||
|
||||
it("produces the whole catalog", () => {
|
||||
// Every key laid down for the release but the `change_assumption` chip
|
||||
// label, which the dialog catalog's own test covers.
|
||||
expect(keys.size).toBe(57);
|
||||
// label, which the dialog catalog's own test covers, plus the two
|
||||
// declined-proposal replies.
|
||||
expect(keys.size).toBe(59);
|
||||
});
|
||||
|
||||
it.each(locales)("every catalog key resolves in %s", (locale) => {
|
||||
|
||||
@@ -48,6 +48,7 @@ import {
|
||||
} from "@/lib/ai/coach/types";
|
||||
import { coachClarificationSchema } from "@/lib/ai/coach/stream-events";
|
||||
import {
|
||||
COACH_CLARIFY_UI_KEYS,
|
||||
COACH_FOLLOW_UP_KEYS,
|
||||
clarifyWindowLabelKey,
|
||||
coachDomainLabelKey,
|
||||
@@ -439,12 +440,11 @@ export const CLARIFY_DAILY_LIMIT = 3;
|
||||
const COMPARISON_LABEL_KEY: Readonly<Record<CoachComparisonBasis, string>> = {
|
||||
previous_period: COACH_FOLLOW_UP_KEYS.previous_period,
|
||||
year_ago: COACH_FOLLOW_UP_KEYS.year_ago,
|
||||
// Pending until integration copies it into the bundles.
|
||||
baseline_90d: "coach.clarify.comparison.baseline90d",
|
||||
baseline_90d: COACH_CLARIFY_UI_KEYS.comparisonBaseline90d,
|
||||
};
|
||||
|
||||
/** A pending key: "Since {date}", an illness episode as an anchor. */
|
||||
const ANCHOR_ILLNESS_KEY = "coach.clarify.anchor.illness";
|
||||
/** "Since {date}", an illness episode as an anchor. */
|
||||
const ANCHOR_ILLNESS_KEY = COACH_CLARIFY_UI_KEYS.anchorIllness;
|
||||
|
||||
/** A choice the server built from the record: an id and a catalog label. */
|
||||
export interface ClarifyRecordChoice {
|
||||
|
||||
@@ -247,6 +247,8 @@ export const COACH_CLARIFY_UI_KEYS = {
|
||||
choicesLabel: "coach.clarify.choicesLabel",
|
||||
freeTextHint: "coach.clarify.freeTextHint",
|
||||
contextHint: "coach.clarify.contextHint",
|
||||
comparisonBaseline90d: "coach.clarify.comparison.baseline90d",
|
||||
anchorIllness: "coach.clarify.anchor.illness",
|
||||
} as const;
|
||||
|
||||
/** A window choice on a clarification card ("Last 30 days"). */
|
||||
|
||||
@@ -61,6 +61,7 @@ export const COACH_MEMORY_KEYS = {
|
||||
accept: "insights.coach.memory.accept",
|
||||
decline: "insights.coach.memory.decline",
|
||||
confirmed: "insights.coach.memory.confirmed",
|
||||
declined: "insights.coach.memory.declined",
|
||||
} as const;
|
||||
|
||||
/** A plan proposal's two replies, and the line a decision turn answers with. */
|
||||
@@ -68,6 +69,7 @@ export const COACH_PLAN_KEYS = {
|
||||
accept: "insights.coach.plan.accept",
|
||||
decline: "insights.coach.plan.decline",
|
||||
confirmed: "insights.coach.plan.confirmed",
|
||||
declined: "insights.coach.plan.declined",
|
||||
} as const;
|
||||
|
||||
/** The memory list in settings, and the link to it from the Coach. */
|
||||
|
||||
@@ -214,13 +214,10 @@ export async function runReuseTurn(args: {
|
||||
return new Response(stream, { status: 200, headers: SSE_HEADERS });
|
||||
}
|
||||
|
||||
/**
|
||||
* The reply a declined proposal gets. Pending keys: integration copies them
|
||||
* into the bundles with the rest of this release's strings.
|
||||
*/
|
||||
/** The reply a declined proposal gets. */
|
||||
export const COACH_DECISION_DECLINED_KEYS = {
|
||||
memory: "insights.coach.memory.declined",
|
||||
plan: "insights.coach.plan.declined",
|
||||
memory: COACH_MEMORY_KEYS.declined,
|
||||
plan: COACH_PLAN_KEYS.declined,
|
||||
} as const;
|
||||
|
||||
/** The stored note and plan of a message, each held to its wire schema. */
|
||||
|
||||
Reference in new issue
Block a user