Skip to main content

Use the Code Editor in AI Studio

The AI Studio Code Editor in ZipLeads lets you edit and manage your project's code without leaving the builder.

M
Written by Matt Phillips

The Code Editor in AI Studio gives you direct access to your project code without leaving the builder. You can edit files, search across your project, catch issues quickly and review changes in real time, all from one workspace. This makes it easier to move from AI-generated output to manual refinement when you need more control over your project.


What is the Code Editor in AI Studio?

The AI Studio Code Editor is a built-in, CodeMirror-powered coding environment inside the AI Studio builder. It lets you view, edit and manage the code behind your AI-generated websites and web apps directly in ZipLeads. You don't need an external IDE or a deploy step.

AI Studio generates a working project from your prompts (an idea, a URL or a reference design). The Code Editor then gives you precise control over the TypeScript, JSX, CSS, JSON and other files that power it.

With the Code Editor, you can iterate where you build: edit code, see instant updates in the live preview, and use AI to diagnose and fix errors as you go.


Key benefits of the Code Editor

  • Gain more control: Make direct code-level updates when you need more precision than AI editing alone can give you.

  • Make granular changes: Adjust specific text, styling, components, routes or file behaviour without reworking the whole project.

  • No context switching: Edit code directly in AI Studio without downloading files or leaving the platform.

  • Fast debugging: See errors as soon as they appear and use the AI-powered Try to fix option to get suggested corrections.

  • Safer experimentation: Use the built-in version history to preview, bookmark and roll back changes at any time.

  • Smarter navigation: Use Find & Replace and Global Project Search to jump straight to the right file, line or component.


Core features of the Code Editor

The Code Editor includes several built-in tools that make it easier to search project files, review changes, catch errors early and manage updates with confidence. Together, they make both quick fixes and more advanced code changes smoother.

Find & Replace

Find & Replace helps you quickly find and update text in the current file. It's handy when you need to rename components, update hardcoded copy or rename variables consistently.

With Find & Replace, you can:

  • Open Find & Replace with Cmd/Ctrl + F to search within the current file using a VS Code-style search.

  • Type your search term to highlight every match in the file.

  • Use the case-sensitive and whole-word options to avoid accidental partial matches.

  • Replace matches one by one, or replace them all at once.

Global Project Search

Global Project Search lets you search across your whole AI Studio project, not just the open file. This makes larger projects easier to work with and saves you opening files one by one.

Global Project Search gives you:

  • Project-wide search results, with each match grouped under its file.

  • Results that include unsaved changes, so you can find matching content before you save your latest edits.

  • Highlighted matches, so you can quickly scan the relevant lines.

  • Line numbers for each result, so it's easy to find your place in the file.

  • One-click navigation that takes you straight to the matching file and line in the Code Editor.

Instant Save & Live Preview

Instant Save & Live Preview help you review changes quickly as you work. Instead of committing changes and waiting for a separate deploy step, you update the code and see the effect straight away in the builder's preview.

Just click the Save button in the builder and the live preview updates in seconds.

Smart Error Detection

Smart Error Detection helps you catch build and preview start-up issues while you work in the Code Editor. If a change stops the preview from starting, AI Studio shows the build error in the chat. You can review the issue and use Try to fix to attempt a correction.

When an issue needs a closer look, AI Studio can also inspect the running project and test how it actually behaves before deciding what to change. This helps tell a code issue apart from problems like an outdated preview or an unavailable external resource.

After applying a fix, AI Studio can check the project again to confirm the issue is resolved.

How to use Smart Error Detection:

  1. Review the build error and start the AI fix
    If a code change causes the build or live preview to fail, a Build unsuccessful message appears in the chat.
    Click Details to review the error, then click Try to fix to have AI analyse the issue and attempt a correction.
    ​


    ​

  2. Review the AI fix and rebuilt preview
    AI analyses the error, updates the project files and posts a follow-up message explaining the fix.
    After a successful fix, AI Studio automatically rebuilds the preview using the updated files.
    Check the refreshed preview to confirm the issue is resolved.
    ​

Automatic Route Detection

Automatic Route Detection keeps your project structure organised when you add new routes in code. When you create a new route in code, it appears automatically in the route selector. This saves you manual follow-up work and makes navigation in your project easier to manage.

Version History

Version history gives you a safer way to edit by keeping earlier states of your project. You can review changes, compare updates and recover from mistakes without starting over. Every time you save your code, a new version is created.

To open Version History, click the Clock icon at the top of the builder.

Unsaved Changes Protection

AI Studio warns you before you leave with unsaved code changes, so you don't lose work. If you try to leave with unsaved changes, a warning pops up so you can save before exiting.


How to use the Code Editor

You start with an AI-generated project, and the Code Editor gives you more control over how it looks and behaves. Once your project is created, open the Code area to make direct updates, check them in the preview, and publish when everything is ready.

Follow these steps to get started:

Step 1: Open the Code Editor

Open the AI Studio project you want to update. In the project workspace, click Code to open the Code Editor.

Step 2: Select the file and update the code

Open the file you want to edit from the file tree, then make your changes directly in the editor. Use Find & Replace or Global Project Search if you need help finding the right content or file.

Step 3: Save your changes

Click Save to apply your updates and refresh the preview.

Step 4: Review the preview and fix any errors

Check the preview to make sure the content, layout and functionality look the way you expect.

If a build error appears after saving, click Details to review the issue, then click Try to fix to let AI attempt a correction.

Once AI fixes the issue, AI Studio automatically rebuilds the preview with the updated files so you can review the result.

Step 5: Publish your project

When your changes look right and your project is ready, publish the project to make the updates live.

For more information, see Publishing an AI Studio Project.


Frequently Asked Questions

Q: Do I have to use the Code Editor to get the most out of AI Studio?

No. AI Studio can generate complete pages and flows from your prompts without any manual coding. The Code Editor is for people who want more control over layout, styling, logic or integrations than the chat and visual builder give them.

Q: Which languages and file types does the Code Editor support?

The Code Editor is powered by CodeMirror and supports editing TypeScript, JSX, CSS, JSON and other text-based project files used in AI Studio.

Q: Does the Code Editor auto-save my work?

No. Your code is saved when you click Save. AI Studio warns you before you leave with unsaved code changes, which helps reduce the risk of losing work.

Q: Do edits in the Code Editor change my live, public site straight away?

No. Saving updates the live preview, but your public site only changes when you publish the AI Studio project. Check the preview first, then publish when you're ready for the changes to go live.

Did this answer your question?