mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 11:53:10 +08:00
b6068ad5f4
One `thinking` message carries two granularities. handler.ts:2956 forwards a `thinking_delta` fragment, which the client must concatenate raw to rebuild one thought. handler.ts:2787 forwards a block the CLI already finished, which is a separate thought. The client could not tell them apart and concatenated both, so two finished blocks rendered as "plan the fix carefullythen run tests" — the words run together on screen.30a55a173copied that concatenation into the history-mapping path, where every block is finished, so the transcript view glues them every time. Its test then copied the glued string into its expectation, which pinned the missing separator as correct: anyone fixing it first has to argue with a green assertion. That is the same failure mode as2262973a4asserting `getByText('deepseek-reasoner')` while another model's number was on screen, a day apart. The emit site now says which kind it sent (`complete` on the wire) instead of leaving the renderer to infer it, and both merge sites go through one `joinThinkingContent` so they cannot drift. Merging adjacent blocks into a single bubble stays — that part was deliberate and tested; only the separator was missing. Three mutations, each caught: dropping the separator for finished blocks reddens two store tests, adding one for fragments reddens the streaming tests, and removing the server's `complete` flag reddens the translate golden. That last one only works now because the golden had no scenario for the whole-block emit path at all — it covered `thinking_delta` and nothing else, so the flag could have been dropped with every check green. Added one.
Claude Code Haha Desktop
基于 Tauri 2 + React 的桌面客户端。
开发
bun install
bun run tauri dev
构建
# macOS (Apple Silicon)
./scripts/build-macos-arm64.sh
# Windows (x64, MSI only)
.\scripts\build-windows-x64.ps1
构建产物位于 build-artifacts/ 目录,文件名会显式包含平台、架构和包类型。
常见问题
macOS 提示"已损坏,无法打开"
xattr -cr /Applications/Claude\ Code\ Haha.app