feat: quick generation settings panel in chat - #624
Conversation
d8e6355 to
60589d8
Compare
Add a compact panel from the chat input bar for adjusting temperature, top-p, and max tokens without opening the full settings sheet. - Temperature pill in the chat input showing the current session value - QuickGenSettingsSheet with sliders for temperature and top-p - Max tokens: an "Unlimited" toggle plus a finite slider, mirroring the full Generation Settings sheet's n_predict semantics. n_predict = -1 (unlimited) is the default since a-ghorbani#687, so the slider (64–8192) alone could not represent it — opening the panel on a default session would show a false "64" cap and any slider touch would silently cap an otherwise-unlimited session. The toggle represents -1 directly; turning it off starts the slider at the same 1024 fallback the full sheet uses. - Changes apply to the session's completion settings immediately (settingsSource flips to 'custom'); Reset restores the unlimited default - Tests cover the finite/unlimited/toggle-off/reset/no-session paths Closes a-ghorbani#605
60589d8 to
d671a5e
Compare
|
Rebased onto current
Also corrected here: the shared test mock's Verification: |
Summary
updateSessionCompletionSettings(which flipssettingsSourcetocustom).Max tokens / unlimited
n_predictdefaults to-1(unlimited) since #687 (with a migration flipping existing1024 → -1). A 64–8192 slider can't represent unlimited, so max tokens is an Unlimited toggle plus a finite slider — mirroring the full Generation Settings sheet's semantics. Turning the toggle off starts the slider at the same1024fallback the full sheet uses. This avoids the panel showing a false "64" cap on a default (unlimited) session and silently capping generation on any slider touch.Test plan
-1when left on, caps when turned off.tsc,eslint,l10n:validateclean; full suite 269 suites / 4165 passed.Closes #605