feat: add claude conversation streaming - #262
Conversation
3859af4 to
210348d
Compare
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
210348d to
e38fdaf
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolved overlapping edits in agent-service.ts/.test.ts (kept main's resume-by-id wording + extra fork/codex tests). Updated stale instance-prefix tests to match main's d4e60ef (uppercase now allowed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @centdix's task in 4m 31s —— View job Claude Code Review — PR #262: Claude conversation streaming
Overall this is a well-structured PR that cleanly reuses the #260 Codex streaming contract. The unified 1. Multi-block
|
Summary
Add live web-chat streaming for Claude Code worktrees using Claude's headless
stream-jsonmode, aligned with the Codex streaming model from #260.The WebSocket is now only the live tail: Claude publishes ordered
messageDelta,messageUpsert, andconversationStatusevents. HTTP history remains the canonical snapshot path for attach/refresh, but this PR intentionally does not add a post-completion persisted-transcript refetch or polling loop for streamed Claude sends; we will decide that separately later.Changes
--session-id, resumes existing sessions with-r/--resume, and replays retained live events to late subscribers.tool_use.id/tool_use_idastoolCallIdso refreshed tool results stay grouped with their tool calls instead of rendering as user messages.Test plan
bun test backend/src/__tests__/claude-conversation-stream-service.test.ts backend/src/__tests__/agents-ui-stream-service.test.tsbun test backend/src/__tests__/claude-cli.test.ts backend/src/__tests__/claude-conversation-service.test.tsbun run --cwd frontend test src/lib/worktree-conversation.test.ts src/lib/MobileChatSurface.test.tsbun run --cwd frontend test src/lib/WorktreeConversationPanel.test.tsbun test bin/srcbun test packages/api-contract/srcbun run --cwd backend checkbun run --cwd frontend checkgit diff --check