feat: Session Phase 2 — interactive agent chat + split pane#109
Merged
jonwiggins merged 1 commit intomainfrom Mar 26, 2026
Merged
feat: Session Phase 2 — interactive agent chat + split pane#109jonwiggins merged 1 commit intomainfrom
jonwiggins merged 1 commit intomainfrom
Conversation
2382072 to
85c0872
Compare
Add an interactive Claude Code chat pane alongside the existing web terminal in sessions. The agent chat (left) and terminal (right) operate on the same worktree in a resizable split pane layout. Backend: - New WebSocket handler at WS /ws/sessions/:id/chat that execs claude one-shot prompts in the pod worktree and streams structured JSON events - Auth env vars (API key, OAuth token, max-subscription) resolved and injected into the claude process - Cost tracking: cumulative cost extracted from agent result events and persisted to the session record in real time - Extended GET /api/sessions/:id to return model config from repo settings Frontend: - SessionChat component: streaming chat UI with markdown, tool use visibility (collapsible file/bash/search tool calls), thinking blocks, interrupt button, and error display - SplitPane component: resizable drag handle, collapsible panes with expand/collapse buttons, layout persisted to localStorage - Updated session detail page with split pane layout, live cost counter in header, model selector dropdown, and compact inline PR badges - "Send to agent" integration: parent page can register a handler to push terminal output into the chat input Shared types: - SessionChatClientMessage, SessionChatServerMessage, SessionChatEvent, SessionChatStatus types added to @optio/shared Closes #105 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5729067 to
6c005df
Compare
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.
Summary
Adds an interactive Claude Code chat pane alongside the existing web terminal in sessions (Phase 2 of #80, following #93).
WS /ws/sessions/:id/chat): Execs claude one-shot prompts in the pod worktree, streams structured JSON events (text, tool_use, tool_result, thinking, system, error), supports interruptFiles Changed
apps/api/src/ws/session-chat.tsapps/api/src/server.tsapps/api/src/routes/sessions.tsapps/web/src/components/session-chat.tsxapps/web/src/components/split-pane.tsxapps/web/src/app/sessions/[id]/page.tsxpackages/shared/src/types/session.tsTest plan
pnpm turbo typecheck)pnpm turbo test— 216 tests)pnpm format:check)Closes #105
🤖 Generated with Claude Code