The Gadget assistant can be opened from anywhere in the editor by clicking the pink sparkle icon in the top right corner on the editor. The assistant is context-aware and can help with a wide range of tasks, from generating code to debugging issues.
Context passing
The AI assistant is automatically passed the relevant context by Gadget, based on the nature of your query.
The assistant is always aware of what file or page you are looking at in your Gadget editor. For example, you can ask “Explain this code” with any file open, and it will immediately be passed the context of the file you have open. If you highlight a portion of a code file and ask the assistant to “Explain this code”, it will focus only on the highlighted portion.
Change proposals
Any proposed changes to your app will be shown as one or more file changes that can be accepted or rejected. The proposal will be displayed in the side chat, and can be expanded to view a diff that displays the exact changes broken down by file. Proposals may contain multiple changes across all areas of your app, as long as they are in a single environment.
Conversation history
The Gadget assistant stores conversation history for 24 hours after the last message sent. You can start a new conversation with your assistant to clear its memory from previous chats, and access the conversation history in the top left of the assistant to return to previous chats.
Generation
Models
The assistant generates complete model schemas with just a few inputs, handling everything from basic field definitions to complex validation rules. When you give your assistant the requirements of your app, it will generate models that define the structure and rules for storing data according to Gadget best practices.
Code
The assistant can generate code for your app, whether frontend or backend. The assistant is heavily trained on Gadget framework concepts and should link your code to the right framework principles. As with all LLMs, code generation can vary, but typically the editor assistant excels at most Gadget-supported languages: Typescript, Javascript, JSON, Liquid, Gelly.
Data
The assistant can generate sample data within your models. This data can be used for testing functionality within your app before introducing real data. Any records created by the assistant are context-aware and will pass all database validations.
Multi-file proposals
The assistant can generate proposals that combine all of its capabilities. This is particularly useful for building entire features, where database tables, frontend, and backend code are all needed to complete the request.
General support
The assistant can help with general questions about Gadget and its supported technologies, including concepts, tools, the Gadget framework, and its documentation.
It can also provide limited support for third-party packages, having context of your node_modules and type definitions, but its primary focus is on Gadget-specific topics.
Debugging
In the logs tab, you can hover over a log and click the “Explain” icon to have the AI assistant analyze it and suggest next steps. This also applies to errors or warnings in your problems drawer; click on the "Fix problem" button to ask the assistant for help.
Brainstorming
The assistant is well-versed in app development and can help you brainstorm new ideas for projects. It will suggest ways to implement new features or the best way to optimize your app.
Settings
The assistant can help you configure your app's settings, including environment variables, API keys, and plugins.
Plugins
Shopify
Based on a description of your app's requirements, the assistant configures your Shopify connection for single or multi-tenant apps, enables the specific data models you need, and sets up appropriate permissions and data access patterns. The assistant ensures your connection uses only the minimum necessary OAuth scopes for your app.
The assistant can also sync data from your connected store to be used within your app. Click the check logs button in the assistant to view incoming webhooks in your logs.
Environment variables
You can request that the assistant create, update, or delete environment variables for your app. The assistant will ensure that the variables are correctly set up in your app's environment.
API keys
The assistant can manipulate the API keys for your app. You can ask that it assign a role to the key and specify the permissions it should have.