docs: document terminal websocket endpoint
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -105,6 +105,7 @@ All runtime logging uses slog; `fmt`, `log.Printf`, and the Gin default logger a
|
||||
| `POST` | `/api/workspaces/:id/process/stop` | Stop OpenCode process |
|
||||
| `POST` | `/api/workspaces/:id/process/restart` | Restart OpenCode process |
|
||||
| `GET` | `/api/workspaces/:id/process/status` | Get process running status and PID |
|
||||
| `GET` | `/api/workspaces/:id/process/ws` | WebSocket: stream process stdout/stderr, send stdin (text frames, raw bytes) |
|
||||
|
||||
### Health
|
||||
|
||||
|
||||
+7
-5
@@ -4,14 +4,18 @@ Frontend IDE shell for the codespace Go backend.
|
||||
|
||||
## Scope
|
||||
|
||||
This package is a runnable **UI scaffold only**. It provides the workspace layout, a mock file explorer, a Monaco editor wrapper, and an xterm terminal wrapper. It does not yet connect to the Go API.
|
||||
This package is the codespace web IDE. It connects to the Go backend:
|
||||
the file explorer and editor call the file APIs, the toolbar drives the
|
||||
process start/stop/restart endpoints, and the terminal streams the
|
||||
running OpenCode process over the WebSocket endpoint
|
||||
`/api/workspaces/:id/process/ws`.
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Purpose |
|
||||
|---|---|
|
||||
| `pnpm install` | Install dependencies |
|
||||
| `pnpm dev` | Start the Vite dev server |
|
||||
| `pnpm dev` | Start the Vite dev server (proxies `/api` and `/healthz` to `http://localhost:8080`) |
|
||||
| `pnpm lint` | Run ESLint |
|
||||
| `pnpm build` | Type-check and build for production |
|
||||
|
||||
@@ -21,7 +25,7 @@ This package is a runnable **UI scaffold only**. It provides the workspace layou
|
||||
- Tailwind CSS v4
|
||||
- react-router v7
|
||||
- Zustand for local UI state
|
||||
- TanStack Query (provider only; no real API calls yet)
|
||||
- TanStack Query for API state
|
||||
- `@monaco-editor/react` editor wrapper
|
||||
- `@xterm/xterm` + `@xterm/addon-fit` terminal wrapper
|
||||
- `react-resizable-panels` for layout splits
|
||||
@@ -29,8 +33,6 @@ This package is a runnable **UI scaffold only**. It provides the workspace layou
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Backend API integration (reserved file only at `src/lib/api/client.ts`)
|
||||
- Authentication
|
||||
- WebSocket terminal or process streaming
|
||||
- i18n
|
||||
- Tests (no test framework until business logic is added)
|
||||
|
||||
Reference in New Issue
Block a user