fix: the knowledge-context slider is a discrete 6-stop scale — off, then powers of four from 64

The continuous 0-4096 dial was precision theater (a 128-token budget is
~2 propositions; nobody wants that granularity). Decided stops (owner,
2026-09-15): 0 / 64 / 256 / 1024 / 4096 / 16384 — the native range walks
positions 0-5 and maps through GRAPH_CONTEXT_TOKENS_STOPS in contracts.
Max rises to 16384 (route range follows); the server still accepts any
integer in range so a stale client cannot brick settings; non-stop
legacy values snap to the nearest stop for the thumb, readout stays
honest.
This commit is contained in:
amosblomqvist
2026-09-15 08:09:56 +03:00
parent f6b0c3fb86
commit 4022e3f0d0
4 changed files with 57 additions and 26 deletions
+10 -5
View File
@@ -68,12 +68,17 @@ export interface ChatSettings {
graphContextTokens?: number;
}
/** The injection budget's decided knobs (2026-09-14): default 1024 (a
* meaningful, modest slice of prior knowledge), hard max 4096, slider
* step 128, 0 = off. */
/** The injection budget's decided knobs (2026-09-14; scale revised
* 2026-09-15, owner): default 1024 (a meaningful, modest slice of prior
* knowledge), hard max 16384, 0 = off. The UI is a DISCRETE slider over
* these stops — powers of four from 64 (the fine-grained low end was
* theater: a 128-token budget is ~2 propositions, nobody wants that
* dial); the server still accepts any integer in range (a stale client
* can't brick settings), the stops only govern what the slider sends. */
export const GRAPH_CONTEXT_TOKENS_DEFAULT = 1024;
export const GRAPH_CONTEXT_TOKENS_MAX = 4096;
export const GRAPH_CONTEXT_TOKENS_STEP = 128;
export const GRAPH_CONTEXT_TOKENS_MAX = 16384;
/** The slider's positions, left to right: off, then powers of four. */
export const GRAPH_CONTEXT_TOKENS_STOPS = [0, 64, 256, 1024, 4096, 16384] as const;
// ─── Background-extraction usage (the money channel, extraction side) ────────