mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-03 11:42:23 +01:00
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:
@@ -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) {
|
export function init(apiBase) {
|
||||||
API_BASE = apiBase;
|
API_BASE = apiBase;
|
||||||
initLibrary({
|
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
|
// 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).
|
// email-front flag; the doc/email z-index alternation lives in CSS).
|
||||||
document.body.classList.remove('email-front');
|
document.body.classList.remove('email-front');
|
||||||
_ensureAgentMode();
|
|
||||||
_markDocVisibleState(_lastSessionId, 'open');
|
_markDocVisibleState(_lastSessionId, 'open');
|
||||||
|
|
||||||
document.body.classList.add('doc-view');
|
document.body.classList.add('doc-view');
|
||||||
|
|||||||
Reference in New Issue
Block a user