Code Mode
Generate complete apps, games, websites, and code files with live preview. Code Mode uses a 128K token context window for large, complex projects.
Getting Started
Open AI Chat and switch to Code mode using the mode selector (keyboard shortcut ⌘6).
Describe what you want to build — Theo generates the code and shows a live preview if the output is visual (HTML/CSS/JS, React, Vue).
Examples: "Build a todo app with dark mode", "Create a landing page for a SaaS product", "Make a Snake game with score tracking".
Capabilities
Live Preview
HTML/CSS/JS output renders in a sandboxed iframe — see your app running instantly.
Multi-File Projects
Generate complete projects with multiple files — an entry file plus supporting modules.
Iterative Editing
Ask Theo to update specific parts of your code without regenerating the whole thing.
Validation
Theo can validate syntax and check for common errors before you ship.
Shareable Artifacts
Share your code with a public URL — anyone can view the preview and source.
Framework Support
Generate React, Vue, or vanilla HTML/CSS/JS projects with proper structure.
Live Preview
When Theo generates visual code (HTML, React, Vue), a live preview appears in an iframe sandbox next to the source code. The preview updates automatically when you ask Theo to make changes.
The sandbox is fully isolated for security — external scripts, cookies, and navigation are restricted.
Tips for Best Results
- Be specific about functionality: "add a dark/light toggle with localStorage persistence" beats "add themes."
- Mention your preferred framework if you have one (React, Vue, or vanilla).
- For iterative changes, describe only what to modify — Theo will update the relevant parts.
- Use "validate this code" to check for syntax errors before sharing.
- Code Mode uses Think-tier credits due to the 128K context window.
Related Articles
Theo AI Overview
Overview of Theo AI — 11 chat modes, creation tools, generative UI, memory, and the sidebar mascot.
AI Chat
Conversational AI that creates flowcharts, whiteboards, notes, and presentations from natural language.
Learn Mode
Orchestrated learning suite — flashcards, quizzes, study notes, and presentations generated in parallel from any topic.