"use client"; import { cn } from "@/lib/utils"; export type AnswerMode = "strict" | "general"; const MODES: { value: AnswerMode; label: string; hint: string }[] = [ { value: "strict", label: "Strict", hint: "Answers only from your document, and refuses when the evidence is not there.", }, { value: "general", label: "General", hint: "Answers freely and explains in more depth, still keeping to your document.", }, ]; /** * Chooses how the model is allowed to answer. * * Both modes search only the user's uploaded document — the choice changes how * the answer is written, not what is retrieved. "General" relaxes the * evidence-only contract so the model may add explanatory context instead of * refusing, while still grounding cited claims in the document. */ export function AnswerModeToggle({ mode, disabled, onChange, }: { mode: AnswerMode; disabled?: boolean; onChange: (mode: AnswerMode) => void; }) { const active = MODES.find((m) => m.value === mode) ?? MODES[0]; return (
{active.hint}