mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
One-shot prettier pass so the new format:check gate starts from a clean baseline. Formatting only — no behaviour change. Generator-owned and vendored artifacts stay untouched via .prettierignore.
30 lines
1.4 KiB
TypeScript
30 lines
1.4 KiB
TypeScript
/**
|
|
* Query keys — Coach preferences, facts, about-me, and nudge state.
|
|
* Part of the centralized factory; aggregated in `./index.ts`.
|
|
*/
|
|
export const coachKeys = {
|
|
coachPrefs: () => ["coach-prefs"] as const,
|
|
coachFacts: () => ["coach-facts"] as const,
|
|
/** v1.15.20 — Settings → AI "about me" self-description. */
|
|
coachAboutMe: () => ["coach-about-me"] as const,
|
|
/** v1.16.0 — pending clarifying questions (Coach composer chips). */
|
|
coachAboutMeQuestions: () => ["coach-about-me", "questions"] as const,
|
|
/** v1.16.1 — unseen proactive-nudge state for the floating Coach bubble. */
|
|
coachNudgeStatus: () => ["coach-nudge-status"] as const,
|
|
/** v1.18.6 (CCH-03) — mark-Coach-seen mutation (clears the FAB unread dot). */
|
|
coachMarkSeen: () => ["coach-mark-seen"] as const,
|
|
/**
|
|
* v1.18.7 — the Coach conversation rail list (`GET /api/insights/chat`).
|
|
* Previously a hook-local bare `["coachConversations"]`; centralised so
|
|
* the optimistic delete and the streaming hook's post-turn invalidation
|
|
* share one factory-routed key.
|
|
*/
|
|
coachConversations: () => ["coachConversations"] as const,
|
|
/**
|
|
* v1.18.7 — one decrypted Coach conversation (`GET /api/insights/chat/[id]`).
|
|
* Keyed on the conversation id so two open threads never share a cache slot;
|
|
* the streaming hook invalidates this slot once the persisted twin lands.
|
|
*/
|
|
coachConversation: (id: string | null) => ["coachConversation", id] as const,
|
|
};
|