"use client"; import { BookOpenIcon } from "lucide-react"; import { GRAPH_CONTEXT_TOKENS_DEFAULT, GRAPH_CONTEXT_TOKENS_MAX, GRAPH_CONTEXT_TOKENS_STEP, } from "@/src/core"; /** * The knowledge-context budget control (vision-context-injection.md) — the * "session data" section's one input, shown where sessions START: the home * (graph) view's new-session dock and the /chat/new draft. It renders in * the StatsBar's LEFT slot — the very place session data (context/cost) * lives once a session exists, which pre-chat is free real estate (just * "—"). Input before output: the panel that will later show what the * session contributed to the graph asks first what the graph will * contribute to the session. * * One quiet compact row sized to sit in the stats band beside the model + * thinking pills: short slider, "tok" readout, the FULL number (owner, * 2026-09-15: no k-rounding — 1024 reads as 1024). 0 = off; absent settings * show the DEFAULT (1024 — on). The value rides ChatSettings (the same * lifted settings the model picker uses), so it persists pre-chat via the * same deferred PUT. Sessions never show this control — the injection is * one-shot at session start, so mid-session there is nothing to decide. */ export function GraphContextControl({ value, onChange, testId = "graph-context-control", }: { value: number; onChange: (tokens: number) => void; testId?: string; }) { return (