Skip to content

Commit e82c715

Browse files
committed
Allow create_plan tool in ask mode
1 parent 878b830 commit e82c715

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

backend/src/main-prompt.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,6 @@ export const mainPrompt = async (
660660
[
661661
'write_file',
662662
'str_replace',
663-
'create_plan',
664663
'run_terminal_command',
665664
].includes(tool)
666665
) {

backend/src/tools.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ ${getToolCallString('think_deeply', {
456456
Use when:
457457
- User explicitly requests a detailed plan.
458458
- Task involves significant architectural or multi-file changes.
459-
- Only use this tool to create new plans. Do not modify existing plans using this tool—use the \`write_file\` tool instead for modifications.
459+
- Use this tool to overwrite a previous plan by using the exact same file name.
460460
461461
Don't include:
462462
- Goals, timelines, benefits, next steps.
@@ -469,7 +469,7 @@ For a technical plan, act as an expert architect engineer and provide direction
469469
- Just show the changes needed.
470470
471471
What to include in the plan:
472-
- Include code, but not full files of it. Write out key snippets of code and use lots of psuedo code. For example, interfaces between modules, function signatures, and other code that is not immediately obvious should be written out explicitly. Function and method bodies could be written out in psuedo code.
472+
- Include key snippets of code -- not full files of it. Use psuedo code. For example, include interfaces between modules, function signatures, and other code that is not immediately obvious should be written out explicitly. Function and method bodies could be written out in psuedo code.
473473
- Do not waste time on much background information, focus on the exact steps of the implementation.
474474
- Do not wrap the path content in markdown code blocks, e.g. \`\`\`.
475475
@@ -481,7 +481,7 @@ Do not include any of the following sections in the plan:
481481
482482
After creating than plan, you should end turn to let the user review the plan.
483483
484-
Important: Use this tool sparingly. Do not use this tool more than once in a conversation, if a plan was already created, or for similar user requests.
484+
Important: Use this tool sparingly. Do not use this tool more than once in a conversation, unless in ask mode.
485485
486486
Examples:
487487
${getToolCallString('create_plan', {
@@ -1224,12 +1224,9 @@ export function getFilteredToolsInstructions(costMode: string) {
12241224
// For ask mode, exclude write_file, str_replace, create_plan, and run_terminal_command
12251225
allowedTools = allowedTools.filter(
12261226
(tool) =>
1227-
![
1228-
'write_file',
1229-
'str_replace',
1230-
'create_plan',
1231-
'run_terminal_command',
1232-
].includes(tool.name)
1227+
!['write_file', 'str_replace', 'run_terminal_command'].includes(
1228+
tool.name
1229+
)
12331230
)
12341231
}
12351232

0 commit comments

Comments
 (0)