Wix AI Assistant

The Wix AI Assistant is an intelligent coding companion built into the Wix IDE. It provides developers with real-time assistance, helping you write code, fix errors, discover features, and learn to use Wix APIs to create great sites.

Access the Wix AI Assistant

To access the Wix AI Assistant, click the Wix AI Assistant icon in the Wix IDE sidebar:

This opens the Wix AI Assistant panel:

Get coding advice from the assistant

There are several ways the Wix AI Assistant can help you:

Generate new code

For assistance in writing new code, follow these steps:

  1. Select Generate code.
  2. In the text input field, describe what you want the code to do, then click .

The code assistant creates a code snippet that performs the requested task, and explains how the code works.

For example:

  • Create a backend function that retrieves and returns the currently logged-in member's address.
  • Generate code that gets all the blog posts written between two dates.

Fix your code

To find out what's wrong with code that isn't working, follow these steps:

  1. Select Fix my code.

  2. In the text input field, paste the code that isn't working, then click .

    For example:

    Copy
  3. The code assistant then asks you to describe the problems or errors you're encountering. Describe your code's problems in the text input field, then click .

    For example:

    • This code is supposed to log "hello world" to the console, but instead it logs "myText".

The code assistant explains what's wrong with your code and provides a code snippet with code that should work correctly.

Discover Wix API capabilities

To ask questions about Wix APIs and find out what you can do with them, follow these steps:

  1. Select Look up documentation.
  2. In the text input field, enter a question, then click .

The code assistant answers your question based on the Wix API documentation.

For example:

  • How can I retrieve an item from a data collection by ID?
  • Is there an API for receiving HTTP requests?

Quick access to the Wix AI Assistant

You can also access the Wix AI Assistant directly from the editor window:

  • Open the Wix AI Assistant: Right-click anywhere in the editor window and select Ask Wix AI Assistant. This opens the Wix AI Assistant panel, ready for your query.
  • Fix your code: If you have a piece of code that needs fixing, highlight it in the editor window, right-click anywhere in the editor window, and select Wix AI Assistant: Fix code. This opens the Wix AI Assistant panel with the Fix my code option pre-selected and your highlighted code already entered as the initial query.

Code snippets

When the Wix AI Assistant provides a code snippet, an Insert button and a Copy button appear above it:

Click Copy to copy the code to the clipboard.

Click Insert to insert the code directly into the code file you are editing. The code is inserted where your cursor is currently located. If you have some code selected, the inserted code will replace it.

Interactive chat

The Wix AI Assistant provides an interactive chat interface, so you can continue your conversation with the assistant after receiving its initial response. For example, you can ask clarifying questions, request corrections, or make further queries that build on your first one.

To continue the conversation, enter your question in the text input field, then click .

You can ask up to 2 follow-up questions after each initial query. After this, the Wix AI Assistant starts over.

Get more assistance

After your chat is complete, you might want to get assistance with a new question. To start over, click the home icon at the top of the Wix AI Assistant panel.

Was this helpful?
Yes
No