Skip to content

Viewers ​

One file viewer, used in four places: the Files screen, a thread's Inspector Files tab, Diff review's right pane, and the the preview cards under a reply in Threads.

Routing ​

The viewer picks a renderer by extension first, then by media type: Markdown, HTML, images (png, jpg, gif, webp, avif, bmp, ico, svg), CSV/TSV as a table, JSON, PDF, spreadsheets (xlsx, xlsm, xls) as a table with a tab per sheet, audio, video, patches — rendered as a diff — and everything else as numbered text. A format only its own application reads (.docx, .pptx) is named and offered an Open with system app button rather than half-drawn.

Rendered and Raw ​

Markdown, HTML, JSON and CSV/TSV each render as something other than their bytes, and the rendering hides things: the markup, the exact delimiters, the key order. The header carries a Raw button that shows the file as it is, and Rendered to go back. The choice is remembered per kind, not per file — someone who reads CSVs as text wants that for CSVs.

Images, PDFs, audio, video and code have no second reading to offer, so they have no button.

Editing a file ​

Small text files — markdown, JSON, CSV, code, patches, up to 1 MB — have an Edit button beside Raw. It opens the file in a plain text box: mono, Tab inserts two spaces, Save or Cancel.

This is deliberately not an editor. One file at a time, no find and replace, no multi-file anything, no syntax highlighting, no undo beyond the box's own. It exists for the small correction you would otherwise leave the app to make.

Saving checks that the file is still the one that was read. If anything else changed it in the meantime — the agent, another editor, a pull — the save is refused with changed on disk, reload and nothing is written; your draft stays in the box. Files outside an open project cannot be saved at all, the same fence that applies to reading them. The core is not involved in either.

Markdown ​

Renders as a document. A relative image link (![](https://raw.githubusercontent.com/Wafour-Developer/snowpea-ide/main/docs/manual/en/shot.png)) is resolved against the document's own folder and read back through the main process, so a local screenshot actually appears instead of a broken-image icon. Raw HTML inside the markdown is escaped on the way in, and the rendered output is sanitised again before it is shown — two passes, because markdown renderers are exactly where a script tag likes to hide.

HTML ​

Renders inside a sandboxed iframe with scripts off by default. Allow scripts turns them on for that one file only; opening a different file resets the consent, and the frame never gets same-origin access even when scripts are allowed. This is why an HTML file can be looked at safely before you decide to trust it.

SVG is the one image format that can carry script, so it never goes through the HTML path or gets inlined — it renders through a plain <img>, which cannot execute anything embedded in it.

CSV and TSV ​

The delimiter is sniffed — comma, tab, semicolon, pipe — by picking whichever one splits the file's lines most consistently, and a menu lets you override the guess. A quoted field surviving a delimiter or a newline inside it is parsed correctly rather than split apart. The first 5,000 rows are shown; the rest are counted rather than rendered, so a large export does not stall the pane.

JSON ​

Renders as a collapsible tree, open two levels deep to start. Invalid JSON says so and falls back to plain text instead of showing an empty tree.

Audio, video, PDF ​

Real players for audio and video; PDF renders in a frame.

Caps ​

Text is read up to 2 MB; past that the viewer shows the first 2 MB and says the file was truncated. Anything shown as bytes instead of text — images, PDF, media — goes up to 25 MB. Past either limit, or for a path outside every project you have open or attached, the viewer says why instead of leaving an empty pane, the same way Files refuses a path outside every allowed root.

Every byte comes from the main process. There is no filesystem access in the window itself, so nothing here can read outside a project you opened or a file you attached.

In diff review ​

The right pane has a Diff / File toggle. A patch is naturally read as a diff, but a generated image or a binary asset is not — the toggle switches to showing the file itself, through the same viewer described above.

Files from a turn ​

When a turn writes or generates a file — write_file, edit_file, image_generate, text_to_speech, video_generate, music_generate — or you attached one (see Attachments), a "Files from this turn" strip appears under the reply.

Images show as thumbnails; everything else is a labelled tile. Clicking one opens the viewer in an overlay over the thread, without leaving the conversation. Open in Files jumps to the Files screen with the file selected in the tree, for when you want it in the full-window reading pane instead.

MIT licensed. The manual is generated from the product repositories — see the banner on each page.