mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-14 15:19:26 +00:00
|
Some checks are pending
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
ci / docker publish / build (amd64) (push) Waiting to run
ci / docker publish / build (arm64) (push) Waiting to run
ci / docker publish / merge manifest + tag (push) Blocked by required conditions
* perf(chat): batch live thinking DOM updates
* test(chat): cover live thinking scheduler lifecycle
* fix(chat): guard background stop-state, restore live thinking text, drop source-text tests
- _closeOpenThinkingMarkup no longer overwrites currentAccumulated for
backgrounded streams. It now mirrors the guard the delta path already uses
(`if (!_isBg) currentAccumulated = accumulated`). Without it a backgrounded
stream's text is written into the foreground session's stop-state, which
abortCurrentRequest and detachCurrentStream then put in the wrong bubble.
- Split _extractLiveThinkingText into _liveThinkingText (strip every think tag)
and _closedThinkingText (via extractThinkingBlocks). Slicing from the first
<think> to the first </think> pinned the live box to "The" for the rest of the
stream on the `<think>The</think>` + untagged-thinking pattern that the
hasUnclosedThink detection deliberately keeps streaming through.
- The background transition now flushes with rich:true, so a stream that
backgrounds mid-thinking isn't left as pre-wrap plain text permanently.
- Move the throttle to static/js/liveThinkingThrottle.js and import it. The
.mjs suite imports the module instead of slicing it out of chat.js with
vm.runInNewContext and marker comments.
- Replace the source-text assertions in tests/test_live_thinking_scheduler_js.py
with behavioral coverage, per tests/TESTING_STANDARD.md. The .mjs suite grows
from 3 to 6 cases.
- Collapse the duplicated tool_start/agent_step finalizers into one
_endLiveThinkingSection().
* fix(chat): hoist thinking teardown out of the try block so catch can reach it
In an ES module a function declared inside `try { }` is scoped to that block,
and `catch` is a sibling scope rather than a nested one. _closeOpenThinkingMarkup
was declared inside the try and called from catch, so the call threw
ReferenceError and killed the rest of the error path: the stream never
finalized and the thinking block was never torn down.
Declare _closeOpenThinkingMarkup and a new _endThinkingOnTerminalPath next to
the existing _flushLiveThinking / _cancelLiveThinkingWork outer lets and assign
them inside the try, which is the pattern those two already use for exactly
this reason.
Verified against a live stream in a browser: before, clicking stop mid-thinking
logged "_closeOpenThinkingMarkup is not defined" and left no finalized thinking
section; after, the block collapses to "View thinking process" correctly.
* perf(chat): extract live thinking at commit cadence
* fix(chat): bound live thinking work
* test(chat): update stream invariant assertions
---------
Co-authored-by: Léo <leograndcontact@gmail.com>
|
||
|---|---|---|
| .. | ||
| calendar | ||
| color | ||
| compare | ||
| editor | ||
| emailLibrary | ||
| markdown | ||
| model | ||
| research | ||
| util | ||
| a11y.js | ||
| admin.js | ||
| assistant.js | ||
| calendar.js | ||
| censor.js | ||
| chat.js | ||
| chatRenderer.js | ||
| chatStream.js | ||
| codeRunner.js | ||
| colorPicker.js | ||
| composerArrowUpRecall.js | ||
| cookbook-deps-recipes.js | ||
| cookbook-diagnosis.js | ||
| cookbook-hwfit.js | ||
| cookbook.js | ||
| cookbookDownload.js | ||
| cookbookPorts.js | ||
| cookbookProgressSignal.js | ||
| cookbookRunning.js | ||
| cookbookSchedule.js | ||
| cookbookServe.js | ||
| document.js | ||
| documentLibrary.js | ||
| dragSort.js | ||
| emailInbox.js | ||
| emailLibrary.js | ||
| emailShared.js | ||
| emojiPicker.js | ||
| emojiShortcodes.js | ||
| escMenuStack.js | ||
| fileHandler.js | ||
| gallery.js | ||
| galleryEditor.js | ||
| group.js | ||
| init.js | ||
| keyboard-shortcuts.js | ||
| langIcons.js | ||
| liveThinkingThrottle.js | ||
| markdown.js | ||
| memory.js | ||
| modalManager.js | ||
| modalSnap.js | ||
| modelPicker.js | ||
| models.js | ||
| modelSort.js | ||
| MODULE_SUMMARY.md | ||
| notes.js | ||
| package.json | ||
| platform.js | ||
| presets.js | ||
| providerDeviceFlow.js | ||
| providers.js | ||
| rag.js | ||
| researchSynapse.js | ||
| search-chat.js | ||
| search.js | ||
| section-management.js | ||
| sessions.js | ||
| settings.js | ||
| sidebar-layout.js | ||
| signature.js | ||
| skills.js | ||
| slashAutocomplete.js | ||
| slashCommands.js | ||
| spinner.js | ||
| startupShell.js | ||
| storage.js | ||
| streamingRenderer.js | ||
| streamingSegmenter.js | ||
| tasks.js | ||
| theme.js | ||
| tileManager.js | ||
| toolWindowZOrder.js | ||
| tourAutoplay.js | ||
| tourHints.js | ||
| tts-ai.js | ||
| ui.js | ||
| voiceRecorder.js | ||
| windowDrag.js | ||
| windowResize.js | ||
| workspace.js | ||