fix(desktop): preserve streamed reasoning on late fallback - #71930
yuexiongHNU wants to merge 3 commits into
Conversation
e4ac976 to
79d503d
Compare
79d503d to
3af5d3b
Compare
|
Thanks for preserving the original authorship while rebuilding this against the split streaming hooks. Current main reproduces both reported defects: Commit Automated hermes-sweeper review. |
SummaryTwo PRs address #64995 by preserving streamed reasoning when a late Related pull requests
Duplicates#65432 and #71930 substantially implement the same truncation and late-fallback fix; #71930 supersedes #65432 through its current-main rebuild and dedicated MoA-safe Suggested consolidationKeep #71930 open with a salvage path, consistent with the automated keep_open review: retain its dedicated Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I64995(["issue #64995 (open)"])
subgraph Dup65432 ["PRs duplicating each other"]
P65432["PR #65432 (closed)"]
P71930["PR #71930 (open)"]
end
P71930 -->|best fix| I64995
class I64995 open
class P65432 closed
class P71930 open
class P71930 best
class P71930 target
click I64995 "https://github.com/NousResearch/hermes-agent/issues/64995"
click P65432 "https://github.com/NousResearch/hermes-agent/pull/65432"
click P71930 "https://github.com/NousResearch/hermes-agent/pull/71930"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 2 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 24 kB of PR diffs, 13 kB of issue/PR text, <1 kB of discussion (1 comments), 4 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
What does this PR do?
Prevents a late
reasoning.availablefallback from replacing reasoning that already arrived throughreasoning.delta. If no reasoning was streamed, the fallback is inserted before assistant text instead.The backend now relays the complete fallback rather than truncating it to 500 characters. The fallback has its own update path, so MoA events keep their existing replacement semantics.
This rebuilds the closed #65432 work on current main. The two original commits and author metadata from @skyc1e and @rasitakyol are preserved; the follow-up commit fixes the MoA regression found during the current-main review.
Related Issue
Fixes #64995
Type of Change
Changes Made
agent/conversation_loop.py: relay the complete structured reasoning fallback while keeping delegated-subagent previews bounded.apps/desktop/src/app/session/hooks/use-message-stream/index.ts: preserve an existing streamed reasoning part and place a missing fallback before assistant text.apps/desktop/src/app/session/hooks/use-message-stream/gateway-event.ts: routereasoning.availablethrough the fallback-specific path without changing MoA replacement behavior.How to Test
Stream reasoning through
reasoning.delta, then emitreasoning.available; the existing reasoning part must remain unchanged.Emit
reasoning.availablewithout prior reasoning; it must appear before assistant text and retain more than 500 characters.Run:
Run:
Checklist
Code
Documentation & Housekeeping
cli-config.yaml.example: N/ACONTRIBUTING.md/AGENTS.md: N/AScreenshots / Logs
A full Desktop UI run exposed the MoA replacement regression in the closed implementation; the fallback-specific path in the final commit fixes it, and the MoA regression file now passes 4/4. Re-running the other failed files with one worker left four unrelated current-main failures: three host-locale assertions tracked by #71659 / #71750 and the existing Dialog/Select dismiss repro.