// COMPLETE REFERENCE

Editor

Chapter 643 3 min read English Stable reference URL
Editor Interface Screen

The suite’s file and code editor, built on Monaco. It opens the workspace files the assistant edits through chat, so a person can review a change before it is committed or deployed. It is a developer tool (registry category: "dev"), which is why this page lives in the reference chapter.

Authority: botui/ui/suite/editor.html, botui/ui/suite/js/editor.js, botui/ui/suite/editor/modules/, and botserver/crates/boteditor/src/.

What it does

Capability Behaviour
Workspace file tree lists the files of the project’s dev-VM workspace; the tree is populated only when the editor is opened with a project context
Language mode Monaco picks the grammar from the extension (.js, .html, .css, .rs, .json, .md), everything else is plain text
CSV editing CSV files switch from Monaco to a table editor
Save writes back through /api/editor/file/{path}; Save as opens a server-rendered dialog
Undo / redo session-level server actions
Format pretty-prints a JSON document; other content is returned unchanged
AI review Magic sends the current buffer to /api/editor/magic and shows improved code, an explanation and suggestions in a panel

Formatting is not a general formatter: handle_format (boteditor/src/handlers/edits.rs:43-58) only re-serialises valid JSON and otherwise returns the input, HTML-escaped.

Where the files come from

The editor does not browse the whole Drive. Its root is the editor workspace (boteditor/src/handlers/mod.rs:82-96): /tmp/gb-editor/<bucket> inside the server, or EDITOR_WORKSPACE when set. Paths are resolved against that root by a path guard, so a request cannot climb out of it. Drive enters only through the explicit Drive actions — saving a CSV, or the Vibe project flow, which call /api/files/*. Treat the editor as “the workspace the agent uses”, not as a Drive client.

HTTP surface

boteditor/src/routes.rs:11-18:

Method Path Purpose
GET /api/editor/files list the workspace root
GET/POST /api/editor/file/{path} read or write one file
POST /api/editor/save save through the server-rendered dialog
GET /api/editor/save-as the “save as” dialog fragment
POST /api/editor/undo, /api/editor/redo session history
POST /api/editor/format JSON pretty-print
POST /api/editor/magic LLM review of the buffer

Not implemented

Claim that appears elsewhere Reality
Git integration the registry description says “with git integration”, but there is no git reference anywhere in the editor front-end; use the Vibe git dialog or the Terminal
Configurable code fonts (JetBrains Mono, Fira Code, …) no font setting exists in the editor UI
Applying the AI suggestion automatically Magic shows a result panel; applying it to the buffer is manual
  • Terminal — the shell for work the editor does not cover
  • Vibe API — the project and Source Control flows around the workspace
  • Designer API — the visual app builder
  • Drive — the file store the workspace is published to
// SEARCH ESC
Pagefind · 236 pages · 4 books Enter to open ↑ ↓ to move