From e05f7bf77291b33bd9910363d584ed0c4c25c89a Mon Sep 17 00:00:00 2001 From: Roo Code Date: Sat, 12 Jul 2025 15:30:00 +0000 Subject: [PATCH] feat: fix Advanced Settings UI issues and make update_todo_list conditional - Fix Advanced Settings button layout with proper flex spacing and alignment - Remove excessive left border when expanded (pl-0) - Make update_todo_list tool conditional on alwaysAllowUpdateTodoList setting - Update architect mode instructions to be conditional on tool availability - Update reminder text to be conditional on feature being enabled - Filter out empty tool descriptions from tools list - Update test snapshots to reflect conditional behavior Fixes issues reported in GitHub issue #5624 --- src/core/environment/getEnvironmentDetails.ts | 2 +- src/core/environment/reminder.ts | 22 +++++++++++++------ .../architect-mode-prompt.snap | 8 +++---- .../mcp-server-creation-disabled.snap | 8 +++---- .../mcp-server-creation-enabled.snap | 8 +++---- .../partial-reads-enabled.snap | 8 +++---- .../consistent-system-prompt.snap | 8 +++---- .../with-computer-use-support.snap | 8 +++---- .../with-diff-enabled-false.snap | 8 +++---- .../system-prompt/with-diff-enabled-true.snap | 8 +++---- .../with-diff-enabled-undefined.snap | 8 +++---- .../with-different-viewport-size.snap | 8 +++---- .../system-prompt/with-mcp-hub-provided.snap | 8 +++---- .../system-prompt/with-undefined-mcp-hub.snap | 8 +++---- src/core/prompts/tools/index.ts | 5 ++++- src/core/prompts/tools/update-todo-list.ts | 7 ++++++ src/shared/modes.ts | 2 +- .../src/components/chat/CodeIndexPopover.tsx | 6 ++--- 18 files changed, 79 insertions(+), 61 deletions(-) diff --git a/src/core/environment/getEnvironmentDetails.ts b/src/core/environment/getEnvironmentDetails.ts index 8d4f157f4d6..08cd20e2515 100644 --- a/src/core/environment/getEnvironmentDetails.ts +++ b/src/core/environment/getEnvironmentDetails.ts @@ -264,6 +264,6 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo } } - const reminderSection = formatReminderSection(cline.todoList) + const reminderSection = formatReminderSection(cline.todoList, state?.alwaysAllowUpdateTodoList) return `\n${details.trim()}\n${reminderSection}\n` } diff --git a/src/core/environment/reminder.ts b/src/core/environment/reminder.ts index 6edb24364df..7ef5f48802f 100644 --- a/src/core/environment/reminder.ts +++ b/src/core/environment/reminder.ts @@ -3,9 +3,13 @@ import { TodoItem, TodoStatus } from "@roo-code/types" /** * Format the reminders section as a markdown block in English, with basic instructions. */ -export function formatReminderSection(todoList?: TodoItem[]): string { +export function formatReminderSection(todoList?: TodoItem[], isUpdateTodoListEnabled?: boolean): string { if (!todoList || todoList.length === 0) { - return "You have not created a todo list yet. Create one with `update_todo_list` if your task is complicated or involves multiple steps." + if (isUpdateTodoListEnabled !== false) { + return "You have not created a todo list yet. Create one with `update_todo_list` if your task is complicated or involves multiple steps." + } else { + return "You have not created a todo list yet." + } } const statusMap: Record = { pending: "Pending", @@ -29,10 +33,14 @@ export function formatReminderSection(todoList?: TodoItem[]): string { }) lines.push("") - lines.push( - "", - "IMPORTANT: When task status changes, remember to call the `update_todo_list` tool to update your progress.", - "", - ) + if (isUpdateTodoListEnabled !== false) { + lines.push( + "", + "IMPORTANT: When task status changes, remember to call the `update_todo_list` tool to update your progress.", + "", + ) + } else { + lines.push("") + } return lines.join("\n") } diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap index e80857d354d..9f1bf8e2bb9 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap @@ -549,21 +549,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap index 8563bef9cca..4e6718ea13a 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap @@ -611,21 +611,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap index fd8ef4dc983..2dfe2f38dba 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap @@ -617,21 +617,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap index 0d172d756b1..6c9babbdff0 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap @@ -554,21 +554,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap index e80857d354d..9f1bf8e2bb9 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap @@ -549,21 +549,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap index 576bf0ddd5a..73b3cb4b296 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap @@ -605,21 +605,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap index e80857d354d..9f1bf8e2bb9 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap @@ -549,21 +549,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap index 6fc7ad69cef..a13ff1486b1 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap @@ -637,21 +637,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap index e80857d354d..9f1bf8e2bb9 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap @@ -549,21 +549,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap index 6ccccedefeb..2d5558a566f 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap @@ -605,21 +605,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap index fd8ef4dc983..2dfe2f38dba 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap @@ -617,21 +617,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap index e80857d354d..9f1bf8e2bb9 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap @@ -549,21 +549,21 @@ Mode-specific Instructions: 2. You should also ask the user clarifying questions to get a better understanding of the task. -3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be: +3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be: - Specific and actionable - Listed in logical execution order - Focused on a single, well-defined outcome - Clear enough that another mode could execute it independently -4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished. +4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished. -5. 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 refine the todo list. +5. 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 refine your approach. 6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes ("") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors. 7. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.** +**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/tools/index.ts b/src/core/prompts/tools/index.ts index 3fd5a636a4f..257ff9273a5 100644 --- a/src/core/prompts/tools/index.ts +++ b/src/core/prompts/tools/index.ts @@ -116,10 +116,13 @@ export function getToolDescriptionsForMode( return undefined } - return descriptionFn({ + const description = descriptionFn({ ...args, toolOptions: undefined, // No tool options in group-based approach }) + + // Filter out empty descriptions (e.g., when update_todo_list is disabled) + return description && description.trim() ? description : undefined }) return `# Tools\n\n${descriptions.filter(Boolean).join("\n\n")}` diff --git a/src/core/prompts/tools/update-todo-list.ts b/src/core/prompts/tools/update-todo-list.ts index 528d5a1b512..5766082f03f 100644 --- a/src/core/prompts/tools/update-todo-list.ts +++ b/src/core/prompts/tools/update-todo-list.ts @@ -4,6 +4,13 @@ import { ToolArgs } from "./types" * Get the description for the update_todo_list tool. */ export function getUpdateTodoListDescription(args?: ToolArgs): string { + // Check if the todo list feature is enabled + const isEnabled = args?.settings?.alwaysAllowUpdateTodoList !== false + + if (!isEnabled) { + return "" // Return empty string if feature is disabled + } + return `## update_todo_list **Description:** diff --git a/src/shared/modes.ts b/src/shared/modes.ts index 9c790236ebc..66f6768d196 100644 --- a/src/shared/modes.ts +++ b/src/shared/modes.ts @@ -72,7 +72,7 @@ export const modes: readonly ModeConfig[] = [ description: "Plan and design before implementation", groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"], customInstructions: - "1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished.\n\n5. 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 refine the todo list.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.**", + "1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished.\n\n5. 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 refine your approach.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.**", }, { slug: "code", diff --git a/webview-ui/src/components/chat/CodeIndexPopover.tsx b/webview-ui/src/components/chat/CodeIndexPopover.tsx index 1243b7efa2c..f6fc52f2f27 100644 --- a/webview-ui/src/components/chat/CodeIndexPopover.tsx +++ b/webview-ui/src/components/chat/CodeIndexPopover.tsx @@ -942,17 +942,17 @@ export const CodeIndexPopover: React.FC = ({
{isAdvancedSettingsOpen && ( -
+
{/* Search Score Threshold Slider */}