Docs · Editor
In-app editor
Zero ships an integrated editor. Operators can open, edit, rename, and delete files inside a Work item's worktree — directly from the console, without switching to an external editor.
Overview
The in-app editor operates within the case worktree. Changes made here are tracked alongside session diffs — edits flow into the same Work item context as agent-produced changes.
The editor is distinct from session execution. Operator edits do not restart or modify a running session — they modify files in the worktree directly.
Open a file
Files are scoped to a project or a Work item. The two scopes use different endpoints:
| Scope | Endpoint |
|---|---|
| Project-wide | POST /projects/:id/files |
| Work item worktree | POST /cases/:id/editor/files |
Autocomplete
The editor exposes an autocomplete endpoint that returns completions for the current cursor position. This draws on the language-server bridge when a compatible server is running.
POST /editor/complete
Body: {
"file": "src/auth/jwt.rs",
"content": "fn verify_token(",
"cursor": { "line": 12, "character": 18 }
}
→ { "completions": ["token: &str", "token: &str, secret: &[u8]"] }See Language-server diagnostics for the underlying LSP bridge.
Create a file
POST /cases/:id/editor/files
Body: { "path": "src/auth/helpers.rs", "content": "// placeholder" }
→ { "created": true, "path": "src/auth/helpers.rs" }Rename and delete
POST /cases/:id/editor/rename
Body: { "from": "src/auth/helpers.rs", "to": "src/auth/utils.rs" }
DELETE /cases/:id/editor/files
Body: { "path": "src/auth/helpers.rs" }Create a directory
POST /cases/:id/editor/directories
Body: { "path": "src/auth/tokens" }
→ { "created": true, "path": "src/auth/tokens" }API reference
| Method | Path | Description |
|---|---|---|
POST | /editor/complete | Get autocomplete suggestions at cursor position. |
POST | /projects/:id/files | Create or read a file in a project scope. |
POST | /cases/:id/editor/files | Create a file in the Work item worktree. |
DELETE | /cases/:id/editor/files | Delete a file from the Work item worktree. |
POST | /cases/:id/editor/rename | Rename a file in the Work item worktree. |
POST | /cases/:id/editor/directories | Create a directory in the Work item worktree. |