mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Desktop chat currently reuses one status channel for assistant streaming and background task progress. When a task update arrived mid-turn, the store flushed the in-flight markdown into a completed message, which caused the remaining deltas to render as a second bubble and broke markdown styling. Keep the reply in streaming state until the turn actually becomes idle, and lock the behavior with a regression test that injects task progress between text deltas. Constraint: Background task progress currently shares the same status channel as assistant streaming Rejected: Retune markdown renderer styles | would hide the symptom without preserving message integrity Confidence: high Scope-risk: narrow Reversibility: clean Directive: Do not flush streaming assistant text on non-idle status transitions unless the turn is actually ending Tested: bun run test src/stores/chatStore.test.ts; bun run lint Not-tested: Manual desktop UI verification with a live agent session