Supported Languages
The Code editor supports syntax highlighting and AI code generation for all major languages:- Web and Frontend
- Backend
- Data and Query
- Config and Markup
- JavaScript (ES2022+)
- TypeScript
- JSX / TSX (React, Preact)
- HTML
- CSS / SCSS / Less
What ZeroTwo Can Do in the Code Editor
Generate Code from Scratch
Describe the function, module, class, or script you need. ZeroTwo writes the full implementation with comments, proper naming, and idiomatic style for the target language. Prompts to try:- “Write a Python function that parses a CSV file and returns a list of dictionaries”
- “Create a TypeScript class for a simple event emitter with on, off, and emit methods”
- “Write a Go HTTP handler that validates a JSON request body and returns a 400 on missing fields”
- “Build a SQL schema for a multi-tenant SaaS application with users, organizations, and subscriptions”
- “Write a React hook in TypeScript that debounces a search input”
Refactor Existing Code
Paste code into the editor and ask ZeroTwo to improve it. The AI rewrites the code in place. Prompts to try:- “Refactor this to use async/await instead of callbacks”
- “Extract the database logic into a separate service class”
- “Rewrite this loop using functional array methods (map, filter, reduce)”
- “Break this large function into smaller, reusable helpers”
Add Types and Annotations
Prompts to try:- “Add TypeScript types to this JavaScript code”
- “Write JSDoc comments for every function in this file”
- “Add Python type hints and a docstring to each function”
- “Generate a Zod schema that matches this TypeScript interface”
Write Tests
Prompts to try:- “Write Jest unit tests for this function covering edge cases”
- “Create pytest tests for this Python module”
- “Add integration tests for this Express route handler”
- “Write table-driven tests for this Go function”
Fix Bugs
Describe the bug or paste the error message. ZeroTwo diagnoses and fixes the issue in the editor. Prompts to try:- “This function throws a null pointer exception when the input is empty — fix it”
- “Fix the off-by-one error in this loop”
- “The async function is not being awaited correctly — here is the error: [paste error]“
Convert Between Languages
Prompts to try:- “Convert this Python script to Go”
- “Rewrite this JavaScript class in TypeScript”
- “Translate this shell script to Python”
- “Convert this REST API handler to GraphQL”
Explain Code
Ask ZeroTwo to explain what the code does. The explanation appears in the chat; the code in the canvas stays unchanged. Prompts to try:- “Explain what this code does, line by line”
- “What is the time and space complexity of this algorithm?”
- “Why might this implementation cause a race condition?”
Editor Actions
Copy Code
Click the Copy button in the canvas toolbar to copy the entire editor contents to your clipboard. Paste directly into your project files or IDE.Download as File
Click Download to save the code as a file. ZeroTwo automatically uses the correct extension based on the detected language —.py, .ts, .go, .sql, .rb, etc.
The current Code editor canvas shows one file at a time. For multi-file projects, use separate canvases per file or paste multiple files with clear section comments and use canvas per module.
Working with Existing Code
You can paste your own code into the editor at any time and then ask ZeroTwo to act on it:Open a Code canvas
Activate Canvas Mode and send a prompt like “Open a Python code canvas” or any code-generating request.
Send an instruction in the chat
Tell ZeroTwo what to do: “Refactor this,” “Add error handling,” “Convert to TypeScript,” “Write tests for each function,” etc.
Language Quick Reference
| Language | Say in your prompt |
|---|---|
| Python | ”Python”, “Python 3” |
| JavaScript | ”JavaScript”, “JS”, “Node.js” |
| TypeScript | ”TypeScript”, “TS” |
| React (JSX/TSX) | “React”, “JSX”, “TSX” |
| Go | ”Go”, “Golang” |
| Rust | ”Rust” |
| SQL | ”SQL”, “PostgreSQL”, “MySQL”, “SQLite” |
| Shell | ”Shell”, “Bash”, “sh” |
| Java | ”Java” |
| C# | “C#”, “CSharp” |
| Ruby | ”Ruby” |
| PHP | ”PHP” |
| Swift | ”Swift” |
| Kotlin | ”Kotlin” |
| R | ”R” |
| Julia | ”Julia” |
Tips for Best Results
Related Pages
Canvas Overview
All 7 canvas editor types and how to activate Canvas Mode.
Export Canvas
Copy or download your code as a file.
HTML Preview
Render HTML, CSS, and JS live in a split-pane canvas.
Troubleshooting
Fix common code canvas issues.

