mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
d30c310336
The composer's SELECT is now a clinician-facing mode picker instead of a list of LLM vendors (the model still comes from Settings → AI and continues to drive the Veil consent gate). The mode travels with each send: - backend appends an Analysis/Graph directive to the agent's system prompt - Graph mode renders an Obsidian-style RecordGraph for the /patient fast-path (new data-recordGraph message part reusing the shared graph component) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
// The chat "situation" modes shown in the composer — what the clinician wants
|
|
// the assistant to do, rather than which LLM runs (the model/provider is set
|
|
// once in Settings → AI). The mode travels with each send so the backend can
|
|
// shape its system prompt, and Graph mode also renders the record graph for the
|
|
// `/patient` fast-path.
|
|
|
|
import { MessageSquare, Network, Sparkles } from "lucide-react";
|
|
|
|
export type ChatMode = "chat" | "analysis" | "graph";
|
|
|
|
export const DEFAULT_MODE: ChatMode = "chat";
|
|
|
|
export type ChatModeOption = {
|
|
id: ChatMode;
|
|
icon: typeof MessageSquare;
|
|
// i18n keys under `chat.input.modes.*`.
|
|
labelKey: string;
|
|
descriptionKey: string;
|
|
};
|
|
|
|
export const CHAT_MODES: ChatModeOption[] = [
|
|
{
|
|
id: "chat",
|
|
icon: MessageSquare,
|
|
labelKey: "chat.input.modes.chat.label",
|
|
descriptionKey: "chat.input.modes.chat.description",
|
|
},
|
|
{
|
|
id: "analysis",
|
|
icon: Sparkles,
|
|
labelKey: "chat.input.modes.analysis.label",
|
|
descriptionKey: "chat.input.modes.analysis.description",
|
|
},
|
|
{
|
|
id: "graph",
|
|
icon: Network,
|
|
labelKey: "chat.input.modes.graph.label",
|
|
descriptionKey: "chat.input.modes.graph.description",
|
|
},
|
|
];
|
|
|
|
export function getMode(id: string): ChatModeOption {
|
|
return CHAT_MODES.find((m) => m.id === id) ?? CHAT_MODES[0];
|
|
}
|