Allow using tools in plan mode

This commit is contained in:
Saoud Rizwan 2025-01-20 13:46:19 -08:00
parent 1d7884d062
commit f1a9f3fed7
2 changed files with 8 additions and 10 deletions

View file

@ -3490,9 +3490,9 @@ export class Cline {
if (this.chatSettings.mode === "plan") {
details += "\nPLAN MODE"
details +=
"\nSee \"## What is PLAN MODE?\" above for more information about what to do in this mode. If you haven't done so already, it's a good idea to start by asking a question."
"\nIn this mode you should focus on information gathering and architecting a solution. If you haven't done so already, it's a good idea to start by reading files to get context and then asking questions."
details +=
'\n(Remember: You now only have access to the plan_mode_response tool. If it seems the user wants you to use tools only available in ACT MODE, you should ask the user to "toggle to Act mode" - they will have to manually do this themselves with the Plan/Act toggle button below. You do not have the ability to switch to ACT MODE yourself, and must wait for the user to do it themselves once they are satisfied with the plan.)'
'\n(Remember: You now have access to the plan_mode_response tool, which allows you to engage in a more conversational back and forth with the user rather than jumping into executing the task. If it seems the user wants you to use tools only available in ACT MODE, you should ask the user to "toggle to Act mode" - they will have to manually do this themselves with the Plan/Act toggle button below. You do not have the ability to switch to ACT MODE yourself, and must wait for the user to do it themselves once they are satisfied with the plan.)'
} else {
details += "\nACT MODE"
details += "\n(Remember: You cannot use the plan_mode_response tool.)"

View file

@ -910,18 +910,16 @@ ACT MODE V.S. PLAN MODE
In each user message, the environment_details will specify the current mode. There are two modes:
- ACT MODE: In this mode, you have access to all tools EXCEPT the plan_mode_response tool.
- In task mode, you use tools to accomplish the user's task. Once you've completed the user's task, you use the attempt_completion tool to present the result of the task to the user.
- PLAN MODE: In this special mode, you ONLY have access to the plan_mode_response tool.
- In plan mode, you should immediately use the plan_mode_response tool to deliver your response, rather than using <thinking> tags to analyze when to respond. Do not talk about using plan_mode_response - just use it directly to share your thoughts and provide helpful answers.
You should only use tools that are available in the current mode.
- In act mode, you use tools to accomplish the user's task. Once you've completed the user's task, you use the attempt_completion tool to present the result of the task to the user.
- PLAN MODE: In this special mode, you have access to the plan_mode_response tool.
- In plan mode, the goal is to gather information and get context to create a detailed plan for accomplishing the task, which the user will review and approve before you switch back to ACT MODE to implement the solution.
- In plan mode, you should use the plan_mode_response tool to deliver your response, rather than using <thinking> tags to analyze when to respond. Do not talk about using plan_mode_response - just use it directly to share your thoughts and provide helpful answers.
## What is PLAN MODE?
- While you are usually in ACT MODE, the user may switch to PLAN MODE in order to have a back and forth with you to plan how to best accomplish the task.
- When starting in PLAN MODE, ask the user some clarifying questions to get a better understanding of the task. (Generally three questions are enough to get the conversation started, but you may ask more questions if needed.)
- Make sure to wait for the user's response to your questions before moving on in creating a plan.
- Once you've gained more context about the user's request, you should architect and a detailed plan for how you will accomplish the task.
- When starting in PLAN MODE, depending on the user's request, you may need to do some information gathering e.g. using read_file or search_files to get more context about the task. You may also ask the user clarifying questions to get a better understanding of the task.
- Once you've gained more context about the user's request, you should architect a detailed plan for how you will accomplish the task.
- Then you might ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it.
- Finally once it seems like you've reached a good plan, ask the user to switch you back to ACT MODE to implement the solution.