Code mode
Let Lumen read and change files in your own folders, with your approval for every change.
Switch to Code with the switch at the top right. Code mode gives the model file tools and a code-focused assistant.
Workspaces
Tap the folder button and choose a workspace:
- Your folders: Open a folder… lets you pick any folder in Files, including iCloud Drive. Lumen works on it in place.
- Lumen workspaces: folders inside Files › On My iPhone › Lumen › Workspaces, like the built-in Playground.
To switch folders in the middle of a session, open the ⋯ menu and tap Change workspace…. The next reply works in the new folder.
Approvals
Lumen can list, read, search, create, edit, move, copy and delete files. Every change appears as a card showing what will happen, with a diff for edits:
- Allow applies that change. Deny refuses it, and Lumen adapts.
- Allow all changes in this chat stops asking for the rest of the chat, except deletions.
- Deletes always ask. Deleted items go to Lumen's own trash for 7 days, so Undo can bring them back.
Each finished change shows Done with Undo.
Save code from a reply
Smaller models sometimes show code in their reply instead of saving it. When that happens, a card below the reply asks Save this code as app.js?:
- Save file writes it to your workspace. Rename… picks another name or folder first, and Not now skips it.
- Every code block in code mode also has a Save button, so you can save any snippet yourself.
Run code
- JavaScript runs in a sandbox on your device. Run buttons appear on code blocks and in the workspace editor, and the console shows the output.
- Web pages (HTML, CSS, JS) open in a live preview. A preview can load resources from the internet only if the page asks for them, and never with Strict Offline on.
Editor
Open any file from the workspace browser to read it with syntax highlighting or edit it yourself.
Code mode workspaces are part of Lumen Pro. Keep your own copies or use version control for important work.