mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-15 17:25:26 -04:00
Fix chat stream recovery and PDF library indexing (#468)
This commit is contained in:
+9
-6
@@ -512,6 +512,9 @@ import createResearchSynapse from './researchSynapse.js';
|
||||
let timedOut = false;
|
||||
let processingProbeTimer = null;
|
||||
let processingProbeAbort = null;
|
||||
let _renderStream = () => {};
|
||||
let _cancelThinkingTimer = () => {};
|
||||
let _removeThinkingSpinner = () => {};
|
||||
const clearProcessingProbe = () => {
|
||||
if (processingProbeTimer) {
|
||||
clearTimeout(processingProbeTimer);
|
||||
@@ -986,13 +989,13 @@ import createResearchSynapse from './researchSynapse.js';
|
||||
}
|
||||
const esc = uiModule.esc;
|
||||
// Remove thinking spinner helper
|
||||
function _removeThinkingSpinner() {
|
||||
_removeThinkingSpinner = () => {
|
||||
const el = document.querySelector('.agent-thinking-dots');
|
||||
if (el) {
|
||||
if (el._spinner) el._spinner.destroy();
|
||||
el.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Tool-aware thinking spinner
|
||||
let _lastToolName = '';
|
||||
@@ -1056,9 +1059,9 @@ import createResearchSynapse from './researchSynapse.js';
|
||||
}
|
||||
}, 400);
|
||||
}
|
||||
function _cancelThinkingTimer() {
|
||||
_cancelThinkingTimer = () => {
|
||||
if (_textPauseTimer) { clearTimeout(_textPauseTimer); _textPauseTimer = null; }
|
||||
}
|
||||
};
|
||||
|
||||
// Document streaming state (text-fence detection)
|
||||
let _docFenceOpened = false;
|
||||
@@ -1085,7 +1088,7 @@ import createResearchSynapse from './researchSynapse.js';
|
||||
}
|
||||
|
||||
// Direct render helper for streaming text
|
||||
function _renderStream() {
|
||||
_renderStream = () => {
|
||||
let dt = stripToolBlocks(roundText);
|
||||
const bodyEl = roundHolder.querySelector('.body');
|
||||
const contentEl = _ensureStreamLayout(bodyEl);
|
||||
@@ -1184,7 +1187,7 @@ import createResearchSynapse from './researchSynapse.js';
|
||||
contentEl._prevTextLen = contentEl.textContent.length;
|
||||
if (window.hljs) contentEl.querySelectorAll('pre code').forEach((b) => window.hljs.highlightElement(b));
|
||||
uiModule.scrollHistory();
|
||||
}
|
||||
};
|
||||
|
||||
// Walk text nodes, skip past `prevLen` characters of old text,
|
||||
// wrap everything after that in <span class="token-new"> for fade-in
|
||||
|
||||
Reference in New Issue
Block a user