# Files & the editor

Files open on the Stage in a real editor — Monaco, the engine behind VS Code — with a dirty-diff gutter, formatting, a diff view, and a one-keystroke 'Fix with Agent'. Images, PDFs, Office docs, and CSVs render with their design, not as flat text.

## Opening a file

When the agent reads or edits a file, it opens on the Stage; you can also open one from source control or the Files surface. Code shows with full syntax highlighting, a path breadcrumb across the top, and the editor toolbar on the right.

## The editor toolbar

- Format document (⇧⌥F) — tidy the file, with an optional format-on-save toggle.
- Word wrap (⌥Z) — wrap long lines on or off.
- View changes — appears when the file has uncommitted edits; flips to a HEAD-vs-working diff and back.

Lines you’ve changed since the last commit are marked in the dirty-diff gutter down the edge of the editor, so edits — the agent’s or yours — are visible as you scroll.

## Fix with Agent

The editor runs real language intelligence — diagnostics, hover, go-to-def, references, rename. When there’s a red squiggle, right-click it (or press ⌘⇧I) and choose ✦ Fix with Agent to hand that diagnostic straight to the agent. Fix All with Agent sends every problem in the file at once.

## Images, PDFs, Office docs & data

Not everything is code. The file surface renders each type with its real design:

- Images — zoom, pan, and fit.
- Audio & video — an inline player.
- PDF, Word, PowerPoint — rendered with their layout — pages, slides, formatting — not stripped to plain text.
- CSV — a real, scrollable, sortable-looking table with a sticky header (or its raw text in Code mode).
- Markdown, mermaid, HTML, SVG — rendered live, with a Preview / Code toggle.

> One toggle for both formsFor any file with a rendered and a source form, the header’s Preview / Code switch flips between them — see the table, then peek at the raw CSV; read the doc, then read its Markdown.
