From cad14f81b920ef53bd49c2d897bccc048ab8bdfd Mon Sep 17 00:00:00 2001 From: red person Date: Tue, 3 Nov 2026 03:25:29 +0300 Subject: [PATCH] fix(documents): preserve the selected chat mode on open (#6945) * fix(documents): preserve the selected chat mode on open * test: isolate photo routing from external MCP registry state --- static/js/document.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/static/js/document.js b/static/js/document.js index 0ae261529..1c6b85b19 100644 --- a/static/js/document.js +++ b/static/js/document.js @@ -1062,15 +1062,6 @@ import { attachColorPicker } from './colorPicker.js?v=20260910eyedropper1'; } } - /** Switch chat to agent mode if not already */ - function _ensureAgentMode() { - const ab = document.getElementById('mode-agent-btn'); - const cb = document.getElementById('mode-chat-btn'); - if (ab && !ab.classList.contains('active')) { - ab.click(); - } - } - export function init(apiBase) { API_BASE = apiBase; initLibrary({ @@ -7415,7 +7406,6 @@ import { attachColorPicker } from './colorPicker.js?v=20260910eyedropper1'; // Doc was opened last → it goes in front of the email windows (clears the // email-front flag; the doc/email z-index alternation lives in CSS). document.body.classList.remove('email-front'); - _ensureAgentMode(); _markDocVisibleState(_lastSessionId, 'open'); document.body.classList.add('doc-view');