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
This commit is contained in:
red person
2026-11-03 00:25:29 +00:00
committed by GitHub
parent 8532f4606b
commit cad14f81b9
-10
View File
@@ -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');