mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-08 14:12:22 +01:00
_isAgent was a const inside the try block of handleChatSubmit, but the catch block reads it to pick the timeout message, so a client timeout threw a ReferenceError and left the reply bubble empty. Declare it next to the other catch-visible variables and assign it where it is computed.
This commit is contained in:
+2
-1
@@ -2588,6 +2588,7 @@ import { invalidateSettings } from './appConfig.js';
|
||||
currentHolder = null;
|
||||
|
||||
let abortCtrl = null;
|
||||
let _isAgent = false; // read by the catch block's timeout message
|
||||
let streamingTTS = false;
|
||||
try {
|
||||
// Re-enable auto-scroll when user sends a message
|
||||
@@ -2985,7 +2986,7 @@ import { invalidateSettings } from './appConfig.js';
|
||||
currentAbort = abortCtrl;
|
||||
|
||||
const _tState = Storage.loadToggleState();
|
||||
const _isAgent = (_tState.mode || 'chat') === 'agent' || !!_tState.plan_mode || workspaceAgentIntent;
|
||||
_isAgent = (_tState.mode || 'chat') === 'agent' || !!_tState.plan_mode || workspaceAgentIntent;
|
||||
|
||||
// Timeout: 6 min for research and agent mode, 3 min otherwise
|
||||
const timeoutMs = el('research-toggle').checked || _isAgent ? RESEARCH_TIMEOUT_MS : DEFAULT_TIMEOUT_MS;
|
||||
|
||||
Reference in New Issue
Block a user