Merge plan and panel toggles into one composer button
The composer had two separate mode buttons (plan + panel). Fold them into a
single #planModeBtn that cycles through every operating mode in one place:
Off -> Plan -> Fusion -> MoA -> Off. Cleaner UI, one affordance instead of two.
Plan stays transient (reset on session switch, never persisted) while
Fusion/MoA persist to the session via apiUpdateSession({multiModelMode}) and
are read server-side from ctx.MultiModelMode. The compat var _planModeActive
is kept in sync (true iff mode === 'plan') so sendMessage and modals.js read
it unchanged. No text label — icon + tint only.
- index.html: drop the separate panel button, reuse #planModeBtn
- chat.css: unified states (plan/fusion/moa tints) on #planModeBtn
- chat.js: cycleCompositeMode / initCompositeMode / _renderCompositeBtn
replace the split plan/panel functions
- chat-page.js: single wiring block, init from session.multiModelMode
- ARCHITECTURE_QUICK.md: document the unified toggle
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
47557c9724
commit
1b203707ec
5 files changed
+103
-20
No files matched your search
@@ -572,13 +572,12 @@ registerPage('chat', {
|
||||
});
|
||||
}
|
||||
|
||||
// Plan Mode Toggle
|
||||
const planModeBtn = document.getElementById('planModeBtn');
|
||||
if (planModeBtn) {
|
||||
// Plan-Modus bei Session-Wechsel zurücksetzen
|
||||
_planModeActive = false;
|
||||
planModeBtn.classList.remove('plan-mode-active');
|
||||
planModeBtn.addEventListener('click', togglePlanMode);
|
||||
// Unified Modus-Toggle (Aus / Plan / Fusion / MoA) – aus der Session initialisieren
|
||||
const compositeModeBtn = document.getElementById('planModeBtn');
|
||||
if (compositeModeBtn) {
|
||||
const hasPanelAgents = !!(session.panelAgentIds && String(session.panelAgentIds).trim());
|
||||
initCompositeMode(session.multiModelMode, hasPanelAgents);
|
||||
compositeModeBtn.addEventListener('click', cycleCompositeMode);
|
||||
}
|
||||
|
||||
// File Upload
|
||||
|
||||
Reference in new issue
Block a user