Files
codebase-memory-mcp/graph-ui/src/browser-ai/agent-settings.css
T
Bernhard Jackiewicz 9e27ae3048 feat(ui): set and keep local agent token limits per model
The agent configuration offered model, automatic explanations and
history only, and the model choice and the automatic flag reset on every
reload.

It now has an input (context) and an output limit for the selected
model, bounded by the model policy: the answer stays within the model's
output ceiling and question plus answer within its browser context.
Limits, the chosen model and "Explain selections automatically" are
stored in this browser under a versioned key and validated on read, as
the view preferences are. Manual chat uses the limits for its prompt
budget and asks the worker for that many output tokens; automatic
explanations keep their short budget but never exceed the limits.

Signed-off-by: Bernhard Jackiewicz <bj@techport.io>
2026-10-02 18:57:24 +02:00

35 lines
3.0 KiB
CSS

.cbm-agent-settings {
--chat-border: #34483f; --chat-muted: #9badA4; --chat-accent: #91cbb0;
box-sizing: border-box; width: min(540px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 48px));
margin: auto; padding: 0; overflow: auto; color: #dfE8e3; background: #111b17;
border: 1px solid #425a4e; border-radius: 16px; box-shadow: 0 24px 100px #0009;
font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.cbm-agent-settings::backdrop { background: #03090799; backdrop-filter: blur(5px); }
.cbm-agent-settings * { box-sizing: border-box; }
.cbm-agent-settings > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid var(--chat-border); }
.cbm-agent-settings h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.4px; }
.cbm-agent-settings p { margin: 0; color: var(--chat-muted); font-size: 12px; }
.cbm-agent-settings button, .cbm-agent-settings select { font: inherit; color: inherit; border: 1px solid var(--chat-border); background: #1b2a22; border-radius: 7px; padding: 8px 12px; }
.cbm-agent-settings button { cursor: pointer; }
.cbm-agent-settings button:disabled, .cbm-agent-settings select:disabled { opacity: .5; cursor: not-allowed; }
.cbm-agent-settings > header button { background: transparent; border: 0; font-size: 24px; padding: 0 8px; }
.cbm-agent-settings :is(button, select, input, a):focus-visible { outline: 2px solid var(--chat-accent); outline-offset: 3px; }
.cbm-agent-settings-body { padding: 22px 24px; display: grid; gap: 16px; }
.cbm-agent-settings .cbm-chat-settings { display: grid; gap: 12px; }
.cbm-agent-settings .cbm-chat-settings select { width: 100%; min-width: 0; }
.cbm-agent-settings label { font-weight: 500; }
.cbm-agent-settings input { accent-color: #77b695; }
.cbm-agent-settings a { color: #abc8be; text-underline-offset: 3px; }
.cbm-agent-settings .cbm-chat-model-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.cbm-agent-settings .cbm-chat-primary { border-color: #638a74; background: #263f31; }
.cbm-agent-settings .cbm-chat-status { color: var(--chat-muted); font-size: 12px; }
.cbm-agent-settings .cbm-chat-loading { padding: 0; }
.cbm-agent-settings .cbm-chat-error, .cbm-agent-settings .cbm-chat-notice { margin: 0 !important; }
.cbm-agent-settings .cbm-chat-token-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; margin: 0; padding: 12px; border: 1px solid var(--chat-border); border-radius: 9px; }
.cbm-agent-settings .cbm-chat-token-limits legend { padding: 0 6px; font-size: 12px; font-weight: 500; }
.cbm-agent-settings .cbm-chat-token-limits p { grid-column: 1 / -1; }
.cbm-agent-settings .cbm-chat-token-limit { display: grid; gap: 4px; }
.cbm-agent-settings .cbm-chat-token-limit input { width: 100%; font: inherit; color: inherit; border: 1px solid var(--chat-border); background: #0d1612; border-radius: 7px; padding: 7px 10px; }
.cbm-agent-settings .cbm-chat-token-limit small { color: var(--chat-muted); font-size: 11px; }