From ba3b9f3602a6b27dd23222aa172451346f8d9c30 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Sat, 23 Aug 2025 15:49:02 -0600 Subject: [PATCH 1/7] fix: resolve newTaskRequireTodos setting not working correctly - Use dynamic Package.name instead of hardcoded namespace values - Show todos parameter as optional/required based on setting value - Remove hardcoded new_task example from shared tool use section - Update tests to use Package.name pattern The setting now works correctly for both regular and nightly builds without requiring hardcoded namespace values. --- src/core/prompts/sections/tool-use.ts | 13 ----- .../prompts/tools/__tests__/new-task.spec.ts | 57 ++++++++++--------- src/core/prompts/tools/new-task.ts | 57 ++++++++++--------- src/core/tools/__tests__/newTaskTool.spec.ts | 14 ++++- src/core/tools/newTaskTool.ts | 5 +- 5 files changed, 75 insertions(+), 71 deletions(-) diff --git a/src/core/prompts/sections/tool-use.ts b/src/core/prompts/sections/tool-use.ts index 434d2f8785..c598fabae3 100644 --- a/src/core/prompts/sections/tool-use.ts +++ b/src/core/prompts/sections/tool-use.ts @@ -15,18 +15,5 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution.` } diff --git a/src/core/prompts/tools/__tests__/new-task.spec.ts b/src/core/prompts/tools/__tests__/new-task.spec.ts index b6379384d0..c59faf12ab 100644 --- a/src/core/prompts/tools/__tests__/new-task.spec.ts +++ b/src/core/prompts/tools/__tests__/new-task.spec.ts @@ -3,7 +3,7 @@ import { getNewTaskDescription } from "../new-task" import { ToolArgs } from "../types" describe("getNewTaskDescription", () => { - it("should not show todos parameter at all when setting is disabled", () => { + it("should show todos parameter as optional when setting is disabled", () => { const args: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -14,15 +14,16 @@ describe("getNewTaskDescription", () => { const description = getNewTaskDescription(args) - // Check that todos parameter is not mentioned at all - expect(description).not.toContain("todos:") - expect(description).not.toContain("todo list") - expect(description).not.toContain("") - expect(description).not.toContain("") + // Check that todos parameter is shown as optional + expect(description).toContain("todos: (optional)") + expect(description).toContain("The initial todo list in markdown checklist format") - // Should have a simple example without todos + // Should have a simple example without todos in the main example expect(description).toContain("Implement a new feature for the application") + // Should also have an example with optional todos + expect(description).toContain("Example with optional todos:") + // Should still have mode and message as required expect(description).toContain("mode: (required)") expect(description).toContain("message: (required)") @@ -53,7 +54,7 @@ describe("getNewTaskDescription", () => { expect(description).toContain("Set up auth middleware") }) - it("should not show todos parameter when settings is undefined", () => { + it("should show todos parameter as optional when settings is undefined", () => { const args: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -62,14 +63,12 @@ describe("getNewTaskDescription", () => { const description = getNewTaskDescription(args) - // Check that todos parameter is not shown by default - expect(description).not.toContain("todos:") - expect(description).not.toContain("todo list") - expect(description).not.toContain("") - expect(description).not.toContain("") + // Check that todos parameter is shown as optional by default + expect(description).toContain("todos: (optional)") + expect(description).toContain("The initial todo list in markdown checklist format") }) - it("should not show todos parameter when newTaskRequireTodos is undefined", () => { + it("should show todos parameter as optional when newTaskRequireTodos is undefined", () => { const args: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -78,14 +77,12 @@ describe("getNewTaskDescription", () => { const description = getNewTaskDescription(args) - // Check that todos parameter is not shown by default - expect(description).not.toContain("todos:") - expect(description).not.toContain("todo list") - expect(description).not.toContain("") - expect(description).not.toContain("") + // Check that todos parameter is shown as optional by default + expect(description).toContain("todos: (optional)") + expect(description).toContain("The initial todo list in markdown checklist format") }) - it("should only include todos in example when setting is enabled", () => { + it("should include todos in main example only when setting is enabled", () => { const argsWithSettingOff: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -105,13 +102,19 @@ describe("getNewTaskDescription", () => { const descriptionOff = getNewTaskDescription(argsWithSettingOff) const descriptionOn = getNewTaskDescription(argsWithSettingOn) - // When setting is off, should NOT include todos in example - const todosPattern = /\s*\[\s*\]\s*Set up auth middleware/s - expect(descriptionOff).not.toMatch(todosPattern) - expect(descriptionOff).not.toContain("") + // When setting is on, should include todos in main example + expect(descriptionOn).toContain("Implement user authentication") + expect(descriptionOn).toContain("[ ] Set up auth middleware") + + // When setting is on, should NOT have "Example with optional todos" section + expect(descriptionOn).not.toContain("Example with optional todos:") + + // When setting is off, main example should NOT include todos in Usage section + const usagePattern = /\s*.*<\/mode>\s*.*<\/message>\s*<\/new_task>/s + expect(descriptionOff).toMatch(usagePattern) - // When setting is on, should include todos in example - expect(descriptionOn).toMatch(todosPattern) - expect(descriptionOn).toContain("") + // When setting is off, should have separate "Example with optional todos" section + expect(descriptionOff).toContain("Example with optional todos:") + expect(descriptionOff).toContain("[ ] Set up auth middleware") }) }) diff --git a/src/core/prompts/tools/new-task.ts b/src/core/prompts/tools/new-task.ts index 0b15bc0ad9..889b319da3 100644 --- a/src/core/prompts/tools/new-task.ts +++ b/src/core/prompts/tools/new-task.ts @@ -3,52 +3,51 @@ import { ToolArgs } from "./types" export function getNewTaskDescription(args: ToolArgs): string { const todosRequired = args.settings?.newTaskRequireTodos === true - // When setting is disabled, don't show todos parameter at all - if (!todosRequired) { - return `## new_task -Description: This will let you create a new task instance in the chosen mode using your provided message. - -Parameters: -- mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). -- message: (required) The initial user message or instructions for this new task. - -Usage: - -your-mode-slug-here -Your initial instructions here - - -Example: - -code -Implement a new feature for the application. - -` - } - - // When setting is enabled, show todos as required + // Always show the todos parameter, but mark it as optional or required based on setting return `## new_task -Description: This will let you create a new task instance in the chosen mode using your provided message and initial todo list. +Description: This will let you create a new task instance in the chosen mode using your provided message${todosRequired ? " and initial todo list" : ""}. Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (required) The initial todo list in markdown checklist format for the new task. +- todos: (${todosRequired ? "required" : "optional"}) The initial todo list in markdown checklist format for the new task. Usage: your-mode-slug-here -Your initial instructions here +Your initial instructions here${ + todosRequired + ? ` [ ] First task to complete [ ] Second task to complete [ ] Third task to complete - +` + : "" + } Example: code +${todosRequired ? "Implement user authentication" : "Implement a new feature for the application"}${ + todosRequired + ? ` + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests +` + : "" + } + + +${ + !todosRequired + ? `Example with optional todos: + +code Implement user authentication [ ] Set up auth middleware @@ -58,4 +57,6 @@ Example: ` + : "" +}` } diff --git a/src/core/tools/__tests__/newTaskTool.spec.ts b/src/core/tools/__tests__/newTaskTool.spec.ts index 1c883c6fe5..adb12c1dbd 100644 --- a/src/core/tools/__tests__/newTaskTool.spec.ts +++ b/src/core/tools/__tests__/newTaskTool.spec.ts @@ -11,6 +11,16 @@ vi.mock("vscode", () => ({ }, })) +// Mock Package module +vi.mock("../../../shared/package", () => ({ + Package: { + name: "roo-cline", + publisher: "RooVeterinaryInc", + version: "1.0.0", + outputChannel: "Roo-Code", + }, +})) + // Mock other modules first - these are hoisted to the top vi.mock("../../../shared/modes", () => ({ getModeBySlug: vi.fn(), @@ -589,7 +599,7 @@ describe("newTaskTool", () => { expect(mockPushToolResult).toHaveBeenCalledWith(expect.stringContaining("Successfully created new task")) }) - it("should check VSCode setting with correct configuration key", async () => { + it("should check VSCode setting with Package.name configuration key", async () => { const mockGet = vi.fn().mockReturnValue(false) const mockGetConfiguration = vi.fn().mockReturnValue({ get: mockGet, @@ -615,7 +625,7 @@ describe("newTaskTool", () => { mockRemoveClosingTag, ) - // Verify that VSCode configuration was accessed correctly + // Verify that VSCode configuration was accessed with Package.name expect(mockGetConfiguration).toHaveBeenCalledWith("roo-cline") expect(mockGet).toHaveBeenCalledWith("newTaskRequireTodos", false) }) diff --git a/src/core/tools/newTaskTool.ts b/src/core/tools/newTaskTool.ts index 2a3ab293b6..9464645503 100644 --- a/src/core/tools/newTaskTool.ts +++ b/src/core/tools/newTaskTool.ts @@ -9,6 +9,7 @@ import { defaultModeSlug, getModeBySlug } from "../../shared/modes" import { formatResponse } from "../prompts/responses" import { t } from "../../i18n" import { parseMarkdownChecklist } from "./updateTodoListTool" +import { Package } from "../../shared/package" export async function newTaskTool( cline: Task, @@ -56,8 +57,10 @@ export async function newTaskTool( return } const state = await provider.getState() + + // Use Package.name to get the correct configuration namespace const requireTodos = vscode.workspace - .getConfiguration("roo-cline") + .getConfiguration(Package.name) .get("newTaskRequireTodos", false) // Check if todos are required based on VSCode setting From d9894e170f0b64ec29c144cbddffd367c5ad882e Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Sat, 23 Aug 2025 16:07:07 -0600 Subject: [PATCH 2/7] test: update snapshots after removing hardcoded new_task example The snapshots needed updating because the hardcoded new_task example was removed from the shared tool use section --- .../architect-mode-prompt.snap | 28 +++++++++---------- .../ask-mode-prompt.snap | 28 +++++++++---------- .../mcp-server-creation-disabled.snap | 28 +++++++++---------- .../mcp-server-creation-enabled.snap | 28 +++++++++---------- .../partial-reads-enabled.snap | 28 +++++++++---------- .../consistent-system-prompt.snap | 28 +++++++++---------- .../with-computer-use-support.snap | 28 +++++++++---------- .../with-diff-enabled-false.snap | 28 +++++++++---------- .../system-prompt/with-diff-enabled-true.snap | 28 +++++++++---------- .../with-diff-enabled-undefined.snap | 28 +++++++++---------- .../with-different-viewport-size.snap | 28 +++++++++---------- .../system-prompt/with-mcp-hub-provided.snap | 28 +++++++++---------- .../system-prompt/with-undefined-mcp-hub.snap | 28 +++++++++---------- 13 files changed, 182 insertions(+), 182 deletions(-) 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 d67156ab98..0f24105a65 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -343,6 +330,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -353,7 +341,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap index 5deea1465d..2185f72d22 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -240,6 +227,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -250,7 +238,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 f6cd169723..e98d791b1d 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -342,6 +329,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -352,7 +340,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 5a88719371..9c21791808 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -392,6 +379,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -402,7 +390,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 6d43d30e9a..991e8970a0 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -348,6 +335,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -358,7 +346,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 d67156ab98..0f24105a65 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -343,6 +330,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -353,7 +341,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 6aec1a0651..b7e6c8ded0 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -396,6 +383,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -406,7 +394,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 d67156ab98..0f24105a65 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -343,6 +330,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -353,7 +341,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 a8165dc4f2..c0a65bc5f4 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -431,6 +418,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -441,7 +429,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 d67156ab98..0f24105a65 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -343,6 +330,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -353,7 +341,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 b0408f01b8..638c213ca9 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -396,6 +383,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -406,7 +394,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 5a88719371..9c21791808 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -392,6 +379,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -402,7 +390,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + 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 d67156ab98..0f24105a65 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 @@ -22,19 +22,6 @@ Tool uses are formatted using XML-style tags. The tool name itself becomes the X ... -For example, to use the new_task tool: - - -code -Implement a new feature for the application. - -[ ] Design the feature architecture -[ ] Implement core functionality -[ ] Add error handling -[ ] Write tests - - - Always use the actual tool name as the XML tag name for proper parsing and execution. # Tools @@ -343,6 +330,7 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. +- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -353,7 +341,19 @@ Usage: Example: code -Implement a new feature for the application. +Implement a new feature for the application + + +Example with optional todos: + +code +Implement user authentication + +[ ] Set up auth middleware +[ ] Create login endpoint +[ ] Add session management +[ ] Write tests + From c1bd86c6a14635a7815e85371b38e47eb4f10057 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Sat, 23 Aug 2025 16:19:35 -0600 Subject: [PATCH 3/7] fix: remove namespace prefix from newTaskRequireTodos setting The setting name should not include the namespace prefix in package.json as VSCode automatically adds the extension's namespace. This was preventing the setting from appearing in the VSCode settings UI. --- src/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.json b/src/package.json index 52949a006a..ee3921d368 100644 --- a/src/package.json +++ b/src/package.json @@ -399,7 +399,7 @@ "maximum": 3600, "description": "%settings.apiRequestTimeout.description%" }, - "roo-cline.newTaskRequireTodos": { + "newTaskRequireTodos": { "type": "boolean", "default": false, "description": "%settings.newTaskRequireTodos.description%" From 0776893cc80c1a973f39cf7bce5f36b7a179cb6b Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Sat, 23 Aug 2025 16:24:49 -0600 Subject: [PATCH 4/7] fix: restore prefixed setting id roo-cline.newTaskRequireTodos for Settings UI visibility --- src/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.json b/src/package.json index ee3921d368..52949a006a 100644 --- a/src/package.json +++ b/src/package.json @@ -399,7 +399,7 @@ "maximum": 3600, "description": "%settings.apiRequestTimeout.description%" }, - "newTaskRequireTodos": { + "roo-cline.newTaskRequireTodos": { "type": "boolean", "default": false, "description": "%settings.newTaskRequireTodos.description%" From c9da9811debab0ac5169b155c02bc14dd16b813f Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Sat, 23 Aug 2025 17:08:08 -0600 Subject: [PATCH 5/7] docs(newTaskTool): explain dynamic Package.name config namespace\n\ntest(newTaskTool): verify config uses Package.name variant (roo-code-nightly) --- src/core/tools/__tests__/newTaskTool.spec.ts | 36 ++++++++++++++++++++ src/core/tools/newTaskTool.ts | 3 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/core/tools/__tests__/newTaskTool.spec.ts b/src/core/tools/__tests__/newTaskTool.spec.ts index adb12c1dbd..ac43f9f887 100644 --- a/src/core/tools/__tests__/newTaskTool.spec.ts +++ b/src/core/tools/__tests__/newTaskTool.spec.ts @@ -629,6 +629,42 @@ describe("newTaskTool", () => { expect(mockGetConfiguration).toHaveBeenCalledWith("roo-cline") expect(mockGet).toHaveBeenCalledWith("newTaskRequireTodos", false) }) + + it("should use current Package.name value (roo-code-nightly) when accessing VSCode configuration", async () => { + // Arrange: capture calls to VSCode configuration and ensure we can assert the namespace + const mockGet = vi.fn().mockReturnValue(false) + const mockGetConfiguration = vi.fn().mockReturnValue({ + get: mockGet, + } as any) + vi.mocked(vscode.workspace.getConfiguration).mockImplementation(mockGetConfiguration) + + // Mutate the mocked Package.name dynamically to simulate a different build variant + const pkg = await import("../../../shared/package") + ;(pkg.Package as any).name = "roo-code-nightly" + + const block: ToolUse = { + type: "tool_use", + name: "new_task", + params: { + mode: "code", + message: "Test message", + }, + partial: false, + } + + await newTaskTool( + mockCline as any, + block, + mockAskApproval, + mockHandleError, + mockPushToolResult, + mockRemoveClosingTag, + ) + + // Assert: configuration was read using the dynamic nightly namespace + expect(mockGetConfiguration).toHaveBeenCalledWith("roo-code-nightly") + expect(mockGet).toHaveBeenCalledWith("newTaskRequireTodos", false) + }) }) // Add more tests for error handling (invalid mode, approval denied) if needed diff --git a/src/core/tools/newTaskTool.ts b/src/core/tools/newTaskTool.ts index 9464645503..6b650cb94e 100644 --- a/src/core/tools/newTaskTool.ts +++ b/src/core/tools/newTaskTool.ts @@ -58,7 +58,8 @@ export async function newTaskTool( } const state = await provider.getState() - // Use Package.name to get the correct configuration namespace + // Use Package.name (dynamic at build time) as the VSCode configuration namespace. + // Supports multiple extension variants (e.g., stable/nightly) without hardcoded strings. const requireTodos = vscode.workspace .getConfiguration(Package.name) .get("newTaskRequireTodos", false) From 371b3e6ddd6db1db7d8d1594c6e42f1287897cde Mon Sep 17 00:00:00 2001 From: daniel-lxs Date: Sun, 24 Aug 2025 14:53:20 -0500 Subject: [PATCH 6/7] refactor: simplify new-task prompt generation - Replace complex template literals with two complete prompt constants - Remove nested ternary operators for better readability - Hide todos parameter completely when disabled (not shown as optional) - Update tests to reflect new behavior - Reduce code from 105 to 66 lines for better maintainability --- .../prompts/tools/__tests__/new-task.spec.ts | 54 ++++++++------- src/core/prompts/tools/new-task.ts | 69 ++++++++++--------- 2 files changed, 68 insertions(+), 55 deletions(-) diff --git a/src/core/prompts/tools/__tests__/new-task.spec.ts b/src/core/prompts/tools/__tests__/new-task.spec.ts index c59faf12ab..94dfaf1d79 100644 --- a/src/core/prompts/tools/__tests__/new-task.spec.ts +++ b/src/core/prompts/tools/__tests__/new-task.spec.ts @@ -3,7 +3,7 @@ import { getNewTaskDescription } from "../new-task" import { ToolArgs } from "../types" describe("getNewTaskDescription", () => { - it("should show todos parameter as optional when setting is disabled", () => { + it("should NOT show todos parameter at all when setting is disabled", () => { const args: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -14,15 +14,17 @@ describe("getNewTaskDescription", () => { const description = getNewTaskDescription(args) - // Check that todos parameter is shown as optional - expect(description).toContain("todos: (optional)") - expect(description).toContain("The initial todo list in markdown checklist format") + // Check that todos parameter is NOT shown at all + expect(description).not.toContain("todos:") + expect(description).not.toContain("todos parameter") + expect(description).not.toContain("The initial todo list in markdown checklist format") - // Should have a simple example without todos in the main example + // Should have a simple example without todos expect(description).toContain("Implement a new feature for the application") - // Should also have an example with optional todos - expect(description).toContain("Example with optional todos:") + // Should NOT have any todos tags in examples + expect(description).not.toContain("") + expect(description).not.toContain("") // Should still have mode and message as required expect(description).toContain("mode: (required)") @@ -43,6 +45,7 @@ describe("getNewTaskDescription", () => { // Check that todos is marked as required expect(description).toContain("todos: (required)") expect(description).toContain("and initial todo list") + expect(description).toContain("The initial todo list in markdown checklist format") // Should not contain any mention of optional for todos expect(description).not.toContain("todos: (optional)") @@ -54,7 +57,7 @@ describe("getNewTaskDescription", () => { expect(description).toContain("Set up auth middleware") }) - it("should show todos parameter as optional when settings is undefined", () => { + it("should NOT show todos parameter when settings is undefined", () => { const args: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -63,12 +66,14 @@ describe("getNewTaskDescription", () => { const description = getNewTaskDescription(args) - // Check that todos parameter is shown as optional by default - expect(description).toContain("todos: (optional)") - expect(description).toContain("The initial todo list in markdown checklist format") + // Check that todos parameter is NOT shown by default + expect(description).not.toContain("todos:") + expect(description).not.toContain("The initial todo list in markdown checklist format") + expect(description).not.toContain("") + expect(description).not.toContain("") }) - it("should show todos parameter as optional when newTaskRequireTodos is undefined", () => { + it("should NOT show todos parameter when newTaskRequireTodos is undefined", () => { const args: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -77,12 +82,14 @@ describe("getNewTaskDescription", () => { const description = getNewTaskDescription(args) - // Check that todos parameter is shown as optional by default - expect(description).toContain("todos: (optional)") - expect(description).toContain("The initial todo list in markdown checklist format") + // Check that todos parameter is NOT shown by default + expect(description).not.toContain("todos:") + expect(description).not.toContain("The initial todo list in markdown checklist format") + expect(description).not.toContain("") + expect(description).not.toContain("") }) - it("should include todos in main example only when setting is enabled", () => { + it("should include todos in examples only when setting is enabled", () => { const argsWithSettingOff: ToolArgs = { cwd: "/test", supportsComputerUse: false, @@ -105,16 +112,17 @@ describe("getNewTaskDescription", () => { // When setting is on, should include todos in main example expect(descriptionOn).toContain("Implement user authentication") expect(descriptionOn).toContain("[ ] Set up auth middleware") + expect(descriptionOn).toContain("") + expect(descriptionOn).toContain("") - // When setting is on, should NOT have "Example with optional todos" section - expect(descriptionOn).not.toContain("Example with optional todos:") + // When setting is off, should NOT include any todos references + expect(descriptionOff).not.toContain("") + expect(descriptionOff).not.toContain("") + expect(descriptionOff).not.toContain("[ ] Set up auth middleware") + expect(descriptionOff).not.toContain("[ ] First task to complete") - // When setting is off, main example should NOT include todos in Usage section + // When setting is off, main example should be simple const usagePattern = /\s*.*<\/mode>\s*.*<\/message>\s*<\/new_task>/s expect(descriptionOff).toMatch(usagePattern) - - // When setting is off, should have separate "Example with optional todos" section - expect(descriptionOff).toContain("Example with optional todos:") - expect(descriptionOff).toContain("[ ] Set up auth middleware") }) }) diff --git a/src/core/prompts/tools/new-task.ts b/src/core/prompts/tools/new-task.ts index 889b319da3..bba6c6250f 100644 --- a/src/core/prompts/tools/new-task.ts +++ b/src/core/prompts/tools/new-task.ts @@ -1,51 +1,51 @@ import { ToolArgs } from "./types" -export function getNewTaskDescription(args: ToolArgs): string { - const todosRequired = args.settings?.newTaskRequireTodos === true - - // Always show the todos parameter, but mark it as optional or required based on setting - return `## new_task -Description: This will let you create a new task instance in the chosen mode using your provided message${todosRequired ? " and initial todo list" : ""}. +/** + * Prompt when todos are NOT required (default) + */ +const PROMPT_WITHOUT_TODOS = `## new_task +Description: This will let you create a new task instance in the chosen mode using your provided message. Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (${todosRequired ? "required" : "optional"}) The initial todo list in markdown checklist format for the new task. Usage: your-mode-slug-here -Your initial instructions here${ - todosRequired - ? ` - -[ ] First task to complete -[ ] Second task to complete -[ ] Third task to complete -` - : "" - } +Your initial instructions here Example: code -${todosRequired ? "Implement user authentication" : "Implement a new feature for the application"}${ - todosRequired - ? ` +Implement a new feature for the application + +` + +/** + * Prompt when todos ARE required + */ +const PROMPT_WITH_TODOS = `## new_task +Description: This will let you create a new task instance in the chosen mode using your provided message and initial todo list. + +Parameters: +- mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). +- message: (required) The initial user message or instructions for this new task. +- todos: (required) The initial todo list in markdown checklist format for the new task. + +Usage: + +your-mode-slug-here +Your initial instructions here -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests -` - : "" - } +[ ] First task to complete +[ ] Second task to complete +[ ] Third task to complete + -${ - !todosRequired - ? `Example with optional todos: +Example: code Implement user authentication @@ -56,7 +56,12 @@ ${ [ ] Write tests + ` - : "" -}` + +export function getNewTaskDescription(args: ToolArgs): string { + const todosRequired = args.settings?.newTaskRequireTodos === true + + // Simply return the appropriate prompt based on the setting + return todosRequired ? PROMPT_WITH_TODOS : PROMPT_WITHOUT_TODOS } From 7ffe0157a29e6b16ca00c635efa0748bf74a3de0 Mon Sep 17 00:00:00 2001 From: daniel-lxs Date: Sun, 24 Aug 2025 15:38:46 -0500 Subject: [PATCH 7/7] test: update snapshots after removing optional todos parameter The todos parameter is now conditionally required based on the newTaskRequireTodos setting, so the snapshots needed to be updated to reflect the new tool documentation format. --- .../architect-mode-prompt.snap | 13 ------------- .../add-custom-instructions/ask-mode-prompt.snap | 13 ------------- .../mcp-server-creation-disabled.snap | 13 ------------- .../mcp-server-creation-enabled.snap | 13 ------------- .../partial-reads-enabled.snap | 13 ------------- .../system-prompt/consistent-system-prompt.snap | 13 ------------- .../system-prompt/with-computer-use-support.snap | 13 ------------- .../system-prompt/with-diff-enabled-false.snap | 13 ------------- .../system-prompt/with-diff-enabled-true.snap | 13 ------------- .../system-prompt/with-diff-enabled-undefined.snap | 13 ------------- .../system-prompt/with-different-viewport-size.snap | 13 ------------- .../system-prompt/with-mcp-hub-provided.snap | 13 ------------- .../system-prompt/with-undefined-mcp-hub.snap | 13 ------------- 13 files changed, 169 deletions(-) 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 0f24105a65..ced0ede463 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 @@ -330,7 +330,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -344,18 +343,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap index 2185f72d22..90bbc1ae34 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap @@ -227,7 +227,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -241,18 +240,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 e98d791b1d..9fdf29df77 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 @@ -329,7 +329,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -343,18 +342,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 9c21791808..3594c8054f 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 @@ -379,7 +379,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -393,18 +392,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 991e8970a0..00e7d3f5db 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 @@ -335,7 +335,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -349,18 +348,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 0f24105a65..ced0ede463 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 @@ -330,7 +330,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -344,18 +343,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 b7e6c8ded0..72e208ee6a 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 @@ -383,7 +383,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -397,18 +396,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 0f24105a65..ced0ede463 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 @@ -330,7 +330,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -344,18 +343,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 c0a65bc5f4..72aa071ce6 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 @@ -418,7 +418,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -432,18 +431,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 0f24105a65..ced0ede463 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 @@ -330,7 +330,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -344,18 +343,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 638c213ca9..83271f47ad 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 @@ -383,7 +383,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -397,18 +396,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 9c21791808..3594c8054f 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 @@ -379,7 +379,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -393,18 +392,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list 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 0f24105a65..ced0ede463 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 @@ -330,7 +330,6 @@ Description: This will let you create a new task instance in the chosen mode usi Parameters: - mode: (required) The slug of the mode to start the new task in (e.g., "code", "debug", "architect"). - message: (required) The initial user message or instructions for this new task. -- todos: (optional) The initial todo list in markdown checklist format for the new task. Usage: @@ -344,18 +343,6 @@ Example: Implement a new feature for the application -Example with optional todos: - -code -Implement user authentication - -[ ] Set up auth middleware -[ ] Create login endpoint -[ ] Add session management -[ ] Write tests - - - ## update_todo_list