Editing Code

Pentos includes a code editor built on Monaco, the editor behind VS Code. Open a code file to edit it with syntax highlighting, preview web code live, and ask the AI to change it for you.

Opening the Editor

  • A single file: click any code file in Files.
  • A whole codebase: drop a .zip of a project onto Files to import it as a codebase folder, then choose Open in Editor from the folder’s three-dot menu or its Info sidebar. The editor opens with a file tree of the whole project.

Text and Markdown files open in the document editor instead.

The Layout

  • File tree (codebases): every file in the project; click one to open it in a tab. Toggle it from the action bar.
  • Tabs: the files you have open.
  • Editor: syntax highlighting, line numbers, find and replace, and the usual keyboard shortcuts.
  • Action bar: Code and Preview tabs, Copy code, Download file, and the AI button.
  • Status bar: the active file, its language and your cursor position.

The editor follows your Pentos theme.

Saving

Click Save in the header or press Cmd+S / Ctrl+S. Unsaved shows while you have changes, and Pentos asks before closing with unsaved work. In a codebase, each file saves on its own. The first save keeps the original file as a version, so you can always get back to it.

Languages

Highlighting covers the code types Files accepts, including JavaScript, TypeScript, Python, Java, C and C++, C#, Go, Rust, Ruby, Swift, Kotlin, HTML, CSS, SCSS and Less, Vue, Svelte, JSON, YAML, TOML, SQL and GraphQL. Unrecognized files open as plain text.

Live Preview

Switch to the Preview tab to see web code running as you edit it:

  • HTML: a full page or a fragment.
  • CSS: including SCSS, Sass and Less.
  • JavaScript and TypeScript: including JSX and TSX, so React components render.

Previews run in a sandbox, isolated from the rest of Pentos: code in the preview cannot reach your account, your files or other pages.

AI Sidebar

Click AI (or press Cmd+I / Ctrl+I) to chat with the AI about the file, or about the open files in a codebase. Ask it to explain code, refactor, fix a bug or write something new. When it proposes changes, they are applied in the editor with the changed lines highlighted: keep them or undo them, then save. The sidebar uses the same models and chat controls as the rest of Pentos. See AI Sidebar for more.

Code From Chats

When the AI writes code in a chat, open the code block in the same editor. Use Save as file to keep it in a folder of your choice.

Notes

  • One person at a time: the code editor is for solo work. Real-time collaboration is available in the document editor.
  • Permissions follow the file: with Viewer access you can read the code but not save. Editor and Admin access can save.
  • Size: the editor saves files up to 2 MB.
  • Exporting a codebase: Download in a codebase folder’s Info sidebar saves the whole project as a .zip.