fix(chat): preserve reasoning and simplify streaming indicators - #210
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Keeps the reasoning component visible after an assistant reply finishes, defaults it to collapsed, and removes the redundant thinking placeholder and rectangular streaming cursors.
Why?
The renderer removed the live turn after applying its outcome but only copied the answer text into the settled message. Reasoning was consequently lost from the current transcript until messages were reloaded. Automatic expansion and duplicate streaming indicators also made the chat unnecessarily noisy.
What changed?
Preserve assembled reasoning alongside answer text when settling a turn.
Show the reasoning component while reasoning is live, even before its first text arrives.
Keep reasoning collapsed by default and respect the user's expansion choice across streaming state changes.
Remove the separate “正在思考” placeholder and rectangular cursors from answer and reasoning content.
Add a regression test delivering the outcome immediately after the chunks to verify that final reasoning survives assembler draining.
Fix Windows parser tests loading Electron and triggering a binary download: load the Electron app only inside an Electron process, with a regression test.
Fix the macOS smoke-test race by waiting for watched-folder background imports to finish before deleting their source.
How was this tested?
npm run typecheck— passed.npm test— all 486 tests passed.npm run build— passed.npm run build:unpack— passed on Linux.npm run smoke:packaged— all 29 packaged-app checks passed on Linux.git diff --check— passed.Screenshots / recordings
Not captured. Manual desktop verification remains outstanding: confirm reasoning stays visible after completion, starts collapsed, can be expanded manually, and no rectangular cursor or separate thinking placeholder is displayed.
Checklist
npm run typecheckpasses.npm run buildpasses.Desktop / build changes
npm run build:unpackpasses (Linux).npm run smoke:packagedpasses (Linux).