diff --git a/cortex/static/app.js b/cortex/static/app.js index fdd0931..9521eef 100644 --- a/cortex/static/app.js +++ b/cortex/static/app.js @@ -6,7 +6,6 @@ const backendToggle = document.getElementById('backend-toggle'); const sessionsBtn = document.getElementById('sessions-btn'); const sessionsPanel = document.getElementById('sessions-panel'); - const heightSel = document.getElementById('height-sel'); const enterToggle = document.getElementById('enter-toggle'); const stopBtn = document.getElementById('stop'); const mode_select_btn_el = document.getElementById('mode-select-btn'); @@ -137,17 +136,33 @@ let maxHeight = parseInt(localStorage.getItem('maxHeight') || '120'); function syncHeight() { + inputEl.style.transition = ''; inputEl.style.height = 'auto'; inputEl.style.maxHeight = maxHeight + 'px'; const sh = inputEl.scrollHeight; inputEl.style.height = Math.min(sh, maxHeight) + 'px'; } - heightSel.value = String(maxHeight); - heightSel.addEventListener('change', () => { - maxHeight = parseInt(heightSel.value); - localStorage.setItem('maxHeight', maxHeight); - syncHeight(); + function updateHeightUI() { + document.querySelectorAll('.ctx-btn[data-height]').forEach(btn => { + btn.classList.toggle('active', parseInt(btn.dataset.height) === maxHeight); + }); + } + + document.querySelectorAll('.ctx-btn[data-height]').forEach(btn => { + btn.addEventListener('click', () => { + maxHeight = parseInt(btn.dataset.height); + localStorage.setItem('maxHeight', maxHeight); + updateHeightUI(); + // Brief expand preview so the effect is immediately visible on an empty textarea + if (!inputEl.value.trim()) { + inputEl.style.transition = 'height 0.2s ease'; + inputEl.style.height = maxHeight + 'px'; + setTimeout(syncHeight, 600); + } else { + syncHeight(); + } + }); }); // ── Input mode — dropdown select with MRU ordering ────────── @@ -1662,6 +1677,7 @@ updateTierUI(); updateMemUI(); + updateHeightUI(); updateToolsToggleUI(); update_mode_ui(); diff --git a/cortex/static/index.html b/cortex/static/index.html index 062f2b8..1ebbbc3 100644 --- a/cortex/static/index.html +++ b/cortex/static/index.html @@ -90,32 +90,30 @@
Distill Memory
- - - - + + + +
-
Backend
+
Role
- +
Display
- - - - + + + + + +
diff --git a/cortex/static/style.css b/cortex/static/style.css index 5ccd1c9..e7d29c6 100644 --- a/cortex/static/style.css +++ b/cortex/static/style.css @@ -21,6 +21,9 @@ --pre-bg: rgba(0,0,0,0.35); --success: #6abf6a; --success-dim: #2a4a2a; + --amber: #f59e0b; + --amber-border: #92400e; + --amber-glow: rgba(245,158,11,0.35); } /* ── Light theme ─────────────────────────────────────────── */ @@ -45,6 +48,9 @@ --pre-bg: rgba(0,0,0,0.07); --success: #1e6e1e; --success-dim: #5aaa5a; + --amber: #b45309; + --amber-border: #92400e; + --amber-glow: rgba(180,83,9,0.25); } } @@ -69,6 +75,9 @@ --pre-bg: rgba(0,0,0,0.35); --success: #6abf6a; --success-dim: #2a4a2a; + --amber: #f59e0b; + --amber-border: #92400e; + --amber-glow: rgba(245,158,11,0.35); } [data-theme="light"] { @@ -91,6 +100,9 @@ --pre-bg: rgba(0,0,0,0.07); --success: #1e6e1e; --success-dim: #5aaa5a; + --amber: #b45309; + --amber-border: #92400e; + --amber-glow: rgba(180,83,9,0.25); } body { @@ -729,11 +741,11 @@ } #tools-toggle:hover { color: rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.2); } #tools-toggle.local-on { - color: #f59e0b; - border-color: #92400e; - box-shadow: 0 0 6px rgba(245,158,11,0.35); + color: var(--amber); + border-color: var(--amber-border); + box-shadow: 0 0 6px var(--amber-glow); } - #tools-toggle.local-on:hover { box-shadow: 0 0 10px rgba(245,158,11,0.5); } + #tools-toggle.local-on:hover { box-shadow: 0 0 10px var(--amber-glow); } #input { flex: 1; @@ -1196,9 +1208,9 @@ .ctx-btn:hover { color: var(--text); border-color: var(--muted); } .ctx-btn.active { color: var(--accent); border-color: var(--accent); } .ctx-btn.mem-on { color: var(--success); border-color: var(--success-dim); } - .ctx-btn.local-on { color: #f59e0b; border-color: #92400e; } + .ctx-btn.local-on { color: var(--amber); border-color: var(--amber-border); } #backend-model-hint { - font-size: 0.68rem; color: #f59e0b; opacity: 0.8; + font-size: 0.68rem; color: var(--amber); opacity: 0.9; margin-top: 4px; word-break: break-all; line-height: 1.3; }