mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-15 12:58:04 +00:00
Reduce cookbook startup polling
This commit is contained in:
+5
-3
@@ -1541,9 +1541,9 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
|
||||
<div class="thinking-header-left"><span class="live-think-header-text">Thinking\u2026</span></div>
|
||||
<span class="live-think-spinner-slot" style="flex-shrink:0;margin-left:auto;"></span>
|
||||
<span class="live-think-timer" style="font-size:11px;opacity:0.4;font-variant-numeric:tabular-nums;margin-left:6px;margin-right:5px;"></span>
|
||||
<span class="thinking-toggle live-think-toggle" id="${_liveThinkDomId}-toggle"></span>
|
||||
<span class="thinking-toggle live-think-toggle expanded" id="${_liveThinkDomId}-toggle"></span>
|
||||
</div>
|
||||
<div class="thinking-content" id="${_liveThinkDomId}">
|
||||
<div class="thinking-content expanded" id="${_liveThinkDomId}">
|
||||
<div class="thinking-content-inner live-think-inner"></div>
|
||||
</div>
|
||||
</div>`;
|
||||
@@ -1589,13 +1589,15 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
|
||||
_liveThinkTimerEl.textContent = _formatThinkStats(_elapsedLive, _liveThinkTokenCount);
|
||||
}
|
||||
// Keep thinking box scrolled to bottom, but let user scroll up
|
||||
var _followThinking = true;
|
||||
var thinkBox = _liveThinkInner.closest('.thinking-content');
|
||||
if (thinkBox) {
|
||||
var nearBottom = thinkBox.scrollHeight - thinkBox.clientHeight - thinkBox.scrollTop < 80;
|
||||
if (nearBottom) thinkBox.scrollTop = thinkBox.scrollHeight;
|
||||
_followThinking = nearBottom;
|
||||
}
|
||||
}
|
||||
uiModule.scrollHistory();
|
||||
if (_followThinking) uiModule.scrollHistory();
|
||||
continue;
|
||||
} else if (!hasUnclosedThink && isThinking) {
|
||||
isThinking = false;
|
||||
|
||||
Reference in New Issue
Block a user