GUI settings panel: per-session instance + global defaults, notes, name lock

- ⚙️ settings modal with a Sessione/Generali scope toggle: per-session edits PATCH only that session; Generali edits PUT the defaults template (future sessions only). Fields: name, notes (chat purpose), system prompt, temperature/top_p/top_k/min_p/max_tokens.

- Name field disabled once locked; the sidebar ✏️ rename is disabled after the first interaction. Unexposed settings fields preserved on save. README documents the settings/identity model; 114 tests. Verified via node --check + HTTP (assets + settings flow).
This commit is contained in:
adm committed 2026-11-25 15:51:43 +01:00
1 parent c199953927
commit 73b665d1a7
4 files changed
+165 -5

No files matched your search

+20 -1
View File
@@ -179,7 +179,7 @@ details.thinking .reasoning {
#send { min-width: 52px; font-size: 1.3rem; }
/* ---- Stats modal ---- */
#stats-modal, #dialog {
#stats-modal, #dialog, #settings-modal {
position: fixed; inset: 0; z-index: 40;
background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
padding: 20px;
@@ -201,6 +201,25 @@ details.thinking .reasoning {
#dialog-input:focus { outline: none; border-color: var(--accent); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
/* ---- Settings modal ---- */
.settings-card { width: min(560px, 100%); max-height: 85vh; overflow-y: auto; }
.scope-toggle { display: flex; gap: 8px; margin: 0 0 12px; }
.scope-toggle .btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
#set-hint { margin: 0 0 12px; }
#set-name-hint { margin: -8px 0 12px; }
.small { font-size: 0.8rem; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.field > span { font-size: 0.85rem; color: var(--muted); }
.field input, .field textarea {
width: 100%; background: var(--panel-2); color: var(--text);
border: 1px solid var(--border); border-radius: 8px;
padding: 8px 10px; font-size: 16px; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input:disabled { opacity: 0.6; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.sess-btn:disabled { opacity: 0.35; cursor: default; }
/* ---- Wide screens: persistent sidebar ---- */
@media (min-width: 900px) {
#drawer { position: static; transform: none; width: var(--sidebar-w); flex-shrink: 0; }