Access
This article introduces how to use the Agent Mode in CodeBuddy IDE, specifically the Craft Agent. If you want to directly perform multi-file modifications, you can use Craft Agent. It can read and analyze the entire project's code structure and make multi-file modifications based on your task requirements. You can also describe your task in one sentence, and it can help you build a project from scratch, make multi-file modifications, and quickly bring your ideas to life.
New Conversation
Before starting a new task, you can click the New Task button to start a new conversation and avoid interference from previous conversations.
Code Snippet Trigger
In the code editing area, you can select a code snippet as the conversation context, then input your task requirements in the input box, allowing Craft Agent to automatically complete the task for you. As shown in the image below, Craft Agent will first analyze the code's implementation principles by combining the code structure context and then provide optimization suggestions. Based on these suggestions, it will directly rewrite the files.
File or Directory-level Trigger
You can use @ to select files or directories as the context. You can also right-click on a file or directory in the left file tree and select Tencent Cloud CodeBuddy > Add to Chat to add the file or directory to the conversation context.
@
Add File to CodeBuddy
After entering the task description in the conversation panel, Craft Agent will directly analyze the code and rewrite the files. During the rewriting process, the changes will be displayed in a diff format.