Trae The Builder pattern helps you develop a complete project from 0 to 1. You can seamlessly integrate it into the project build process.
In Builder mode, the AI assistant will call different tools according to the needs when answering, including tools for analyzing code files, tools for editing code files, tools for running commands, and so on. This makes the answer more accurate and effective.
Workflow of the Builder model
In Builder mode, the AI assistant actively reads the contents of the files in the current project, disassembles the tasks and executes them step-by-step, including:
- Extract relevant context
- Creating or modifying files
- Generate and run terminal commands
- Analyze command run status
Enable Builder Mode
- utilization command + U The shortcut key opens the side dialog box.
- In the upper left corner of the side dialog box, click the Builder The
Explore the Builder Model
Builder offers a range of useful features to help you develop projects from 0 to 1 with precision and efficiency.
Adding Context
AI Assistant understands the context of the current project, including code, files, and folders, to more accurately assist you with your development needs. Reference:Three ways to refer to a context when programming in Trae
Input multimodal content
You can add images to your session, such as screenshots of errors, designs, reference styles, and so on, to more accurately and efficiently express your needs.
Generate and process code changes
Depending on your needs, AI Assistant automatically creates new files or edits existing files and automatically saves the generated code. You can choose to accept or reject code changes, including:
- Handles all code changes within multiple files : Click in the list of documents to be reviewed at the top of the input box Accepted in full maybe Reject them all. button to accept or reject all code changes in the current project in bulk.
- Process all code changes within a single file : To open the file in the editor, click on the top prompt bar in the acceptance (Shortcut: Command + Enter) or rejection (Shortcut: Command + Backspace) button to batch accept or reject all code changes within the current file.
- Processing of single code changes : Click on a code change in the editor in the upper right corner of the ^Y maybe ^N button to accept or reject the change.
Generate and run the command
Depending on your needs, the AI Assistant will recommend the necessary shell commands for you to run (see the following example). You can choose to run or skip a command, and AI Assistant will do the rest accordingly.
strike (on the keyboard) (of a computer) run After that, the terminal will run the command. After the command is run, AI Assistant automatically reads and analyzes the results. If it runs abnormally, AI Assistant automatically analyzes the cause and suggests a solution.
If the command runs successfully, you can click on the top right corner of the command card endpoint button, and then view the log of the command's operation in the terminal.
Preview results
Once the AI Assistant has completed the development requirements, it will provide the previews button. When clicked, Trae opens the Webview Window for displaying development results.
During the preview process, if you continue to talk to the AI assistant and modify your requirements, the results will be available in the Webview The window is updated in real time.
exist Webview In the upper right corner of the window, click Open in your browser button to open a window in your browser to preview the development results.
fallback version
You can roll back the project to the version before the specified session round was initiated.
The fallback operation is not undoable;
Rollback versions are only supported in the most recently active Builder window;
Rollback to a version within the last 10 sessions is only supported.
Use the following steps to roll back the version of the project:
- Find the target dialog bubble.
- Click on the left side of the regression (in computer software) Button.
The dialog box displays the files that will be affected by this rollback.
- Click on the file name.
The file will open within the editor showing the upcoming changes.
- Confirm the scope of the impact of this rollback.
- If this retreat meets expectations, click recognize The
Builder starts the fallback project.
Managing Historical Dialogues
strike (on the keyboard) Builder in the upper-right corner of the window History Session button, the left side will show historical record A window showing all conversations in Chat mode and Builder mode.
- If you need to view the history of a particular round of conversation, click on the conversation entry and you will jump to the location of that conversation.
- To delete a round of dialog, hover your mouse over the dialog and click on the right side of the removing Icons.
Conversation logs cannot be recovered after deletion.