Commit Graph
52 Commits
Author SHA1 Message Date
tao.chen 90f6f877b5 docs: mark opencode ACP panel integration as completed in plan.md 2026-07-06 11:52:44 +08:00
tao.chen eb2bf3e684 fix(acp): parse session/update content as ContentBlock, not string
The ACP spec defines session/update content as a ContentBlock object
({type, text}) but we decoded it as a string. This dropped every
agent_message_chunk and left prompt responses empty. E2E against the
real opencode acp binary surfaced the bug.

- internal/acp/messages.go: add ContentBlock struct; Update.Content is
  now ContentBlock.
- internal/acp/client.go: handleNotification extracts Text when
  Content.Type == "text"; other types are logged at debug and dropped.
- internal/acp/client_test.go: NDJSON framing test sends content as a
  ContentBlock object and reads .Text.
- README.md: document /acp/* routes + CODESPACE_OPENCODE_ARGS env.

Verified end-to-end: POST /acp/prompt returns text="Hi there!", 4
messages in history (1 user + 3 agent chunks), 0 invalid session/update
log entries.

Conversation: 019f357d-4236-7010-949c-e61067618d42
2026-07-06 11:52:22 +08:00
tao.chen a633af272b feat(web): add ACP chat panel with tabs (Terminal | Agent)
- web: add react-markdown + remark-gfm + react-syntax-highlighter
- web: new lib/api/acp.ts (useAcpStatus/History/Prompt/Cancel)
- web: new components/acp/ (AcpPanel + MessageBubble + MarkdownView +
  ThinkingIndicator). Markdown rendering with code highlighting via
  Prism oneDark. Auto-scroll to bottom when near it; error toasts
  fade after 5s.
- web: WorkspaceShell now renders a tabbed bottom panel (Terminal |
  Agent) when the bottom panel is visible. Tab state in
  workspace-ui-store.
- web: StatusBar shows agent status (ready / initializing / error)
  when the ACP session is initialized.
- web: pnpm-workspace.yaml: add packages ['.'] so pnpm install works
  in this workspace.

Conversation: 019f3562-9382-7e00-ad92-3162341e9274
2026-07-06 11:30:43 +08:00
tao.chen 2597d0d60c feat(backend): add opencode ACP (Agent Client Protocol) client
Adds a minimal but real ACP stack for the opencode process:

- pkg/config: process.args default ["acp"] (opencodeCommand still "opencode")
- internal/process: NewManager(command, args) — exec.Command uses args
- internal/acp (new): NDJSON transport + JSON-RPC client over the existing
  process stdio. Implements initialize / session/new / session/prompt /
  session/cancel. Serves fs/read_text_file and fs/write_text_file from the
  workspace's fs.FileSystem. terminal/* requests get MethodNotFound.
- internal/service/acp_service: per-workspace Client + mutex; starts the
  process on first prompt; transparently re-init on restart.
- internal/api/acp_handler: GET /acp/status, GET /acp/history,
  POST /acp/prompt, POST /acp/cancel.
- internal/model/acp: API DTOs.
- internal/acp/client_test: NDJSON split-lines, request/response correlation,
  notification dispatch, agent-initiated request handling (fs + terminal).

Existing process WS endpoint and Shell subsystem are unchanged.

Conversation: 019f354c-a51b-7ec3-83ad-c647e9b50b19
2026-07-06 11:03:59 +08:00
tao.chen 18cb3a0151 feat(web): replace workspace native select with shadcn select 2026-07-03 18:48:01 +08:00
tao.chenandClaude c065079d87 feat(web): migrate prompts and confirms to shadcn dialog and dropdown
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 18:38:28 +08:00
tao.chenandClaude 84fa86c490 docs: add plan for opencode acp panel and shadcn migration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 18:29:12 +08:00
tao.chenandClaude 3c6e0c3121 fix(web): move save logic from monaco to react with manual and auto-save
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 18:25:47 +08:00
tao.chenandClaude 7a6e7e7ebb feat(web): replace hover buttons with right-click context menu in file tree
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 17:40:07 +08:00
tao.chenandClaude fcb678773c feat(web): suppress browser ctrl+s and add file tree CRUD
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 17:17:55 +08:00
tao.chenandClaude ac87454711 feat(web): add file tree manual refresh + 5s polling + focus refetch
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 16:57:20 +08:00
tao.chenandClaude 53fe249dd6 feat(web): wire terminal panel to workspace shell ws
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 16:48:49 +08:00
tao.chenandClaude 0ec3efa812 feat(shell): add parallel bash shell subsystem auto-started per workspace
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 16:36:35 +08:00
tao.chenandClaude 75e807c154 fix(web): only connect terminal ws when process is running
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 16:15:51 +08:00
tao.chenandClaude 11ac0299a6 fix(web): treat server clean close as session end without reconnect
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 16:07:46 +08:00
tao.chenandClaude 60524bad0e fix(web): show toolbar and status bar when no workspace selected
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 16:00:58 +08:00
tao.chenandClaude 61e5ede650 fix(workspace): tolerate read-only files on delete
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 14:50:37 +08:00
tao.chenandClaude 09150c2a7d fix(web): enable websocket proxying in vite dev server
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 14:47:43 +08:00
tao.chenandClaude 09241b3350 test: cover multi-subscriber fanout for process ws
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 14:20:31 +08:00
tao.chenandClaude 0cfe8955a4 docs: drop ring buffer mentions from ws spec and plan
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 14:12:35 +08:00
tao.chenandClaude 4a4028486c refactor(process): use map for subscribers and drop dead ring buffer
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 14:08:20 +08:00
tao.chenandClaude 03377eec3c docs: document terminal websocket endpoint
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 12:36:35 +08:00
tao.chenandClaude d8c8c7fc83 feat(web): wire terminal panel to live process websocket
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 12:36:12 +08:00
tao.chenandClaude fa5b53939d feat(web): add useProcessWebSocket hook
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 12:28:42 +08:00
tao.chenandClaude 7cd05ba98a feat(api): expose process output over websocket
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 12:23:48 +08:00
tao.chenandClaude 11ccdda579 feat(service): expose subscribe, input, exit status for ws handler
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 12:10:50 +08:00
tao.chenandClaude 13a5aeda2c feat(process): capture stdout/stderr and fan out to subscribers
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 12:05:40 +08:00
tao.chenandClaude 33fac266c7 docs: add terminal websocket implementation plan
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 11:54:55 +08:00
tao.chenandClaude 741ff63424 docs: add terminal websocket design spec
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 11:48:13 +08:00
tao.chenandClaude a7be9d3f0c feat: wire OpenCode process control UI
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 11:46:13 +08:00
tao.chenandClaude 58aa6077d8 feat: wire Monaco editor to real file read/write
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 11:27:19 +08:00
tao.chenandClaude d587c94f50 feat: wire file explorer to real backend API
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 11:19:30 +08:00
tao.chenandClaude 867f1d204e feat: wire workspace CRUD UI to backend
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 11:05:56 +08:00
tao.chenandClaude b3d0b63f4b fix: defer xterm fit to ResizeObserver ticks
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 11:03:05 +08:00
tao.chen 70799a5df8 Merge branch 'feat/web'
# Conflicts:
#	README.md
2026-07-02 19:53:00 +08:00
tao.chenandClaude b5fababeea docs: add web frontend usage
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 19:38:19 +08:00
tao.chenandClaude 062cde88f8 feat: add web editor and terminal panels
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 18:35:17 +08:00
tao.chenandClaude 0f634981b5 feat: add resizable workspace shell
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 18:15:52 +08:00
tao.chen ef26b9c154 Merge pull request 'chore: configure gin mode' (#3) from feat/gin-mode-config into main
Reviewed-on: https://gitea-production-a772.up.railway.app/taochen/codespace/pulls/3
2026-07-02 09:47:58 +00:00
tao.chenandClaude Fable 5 ab4f905725 chore: configure gin mode
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 17:46:04 +08:00
tao.chen 2bdad13e5c Merge pull request 'feat: harden workspace file APIs' (#2) from feat/workspace-file-api-hardening into main
Reviewed-on: https://gitea-production-a772.up.railway.app/taochen/codespace/pulls/2
2026-07-02 09:24:40 +00:00
tao.chenandClaude 593d2aee5e feat: wire web app infrastructure
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 17:23:48 +08:00
tao.chenandClaude Fable 5 04b309d3fc feat: harden workspace file APIs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 17:22:26 +08:00
tao.chenandClaude 27503781fa feat: add web ui foundation
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 16:57:37 +08:00
tao.chenandClaude 4039d9fa48 feat: scaffold web frontend
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 16:48:19 +08:00
tao.chenandClaude Fable 5 c1b8982e3b chore: ignore local Claude state
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:41:56 +08:00
tao.chenandClaude d8b812cf0e docs: add web frontend implementation plan
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 16:40:40 +08:00
tao.chen ec8ef91432 Merge pull request 'feat: add slog structured logging' (#1) from feat/slog-logging into main
Reviewed-on: https://gitea-production-a772.up.railway.app/taochen/codespace/pulls/1
2026-07-02 08:37:11 +00:00
tao.chenandClaude Fable 5 ea754a85c5 feat: add slog structured logging
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:34:42 +08:00
tao.chenandClaude 53e402e7cb docs: add web frontend init design
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-02 16:33:59 +08:00