Skip to content

Commit e05f7bf

Browse files
committed
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
1 parent 50e45a2 commit e05f7bf

18 files changed

+79
-61
lines changed

src/core/environment/getEnvironmentDetails.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,6 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
264264
}
265265
}
266266

267-
const reminderSection = formatReminderSection(cline.todoList)
267+
const reminderSection = formatReminderSection(cline.todoList, state?.alwaysAllowUpdateTodoList)
268268
return `<environment_details>\n${details.trim()}\n${reminderSection}\n</environment_details>`
269269
}

src/core/environment/reminder.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ import { TodoItem, TodoStatus } from "@roo-code/types"
33
/**
44
* Format the reminders section as a markdown block in English, with basic instructions.
55
*/
6-
export function formatReminderSection(todoList?: TodoItem[]): string {
6+
export function formatReminderSection(todoList?: TodoItem[], isUpdateTodoListEnabled?: boolean): string {
77
if (!todoList || todoList.length === 0) {
8-
return "You have not created a todo list yet. Create one with `update_todo_list` if your task is complicated or involves multiple steps."
8+
if (isUpdateTodoListEnabled !== false) {
9+
return "You have not created a todo list yet. Create one with `update_todo_list` if your task is complicated or involves multiple steps."
10+
} else {
11+
return "You have not created a todo list yet."
12+
}
913
}
1014
const statusMap: Record<TodoStatus, string> = {
1115
pending: "Pending",
@@ -29,10 +33,14 @@ export function formatReminderSection(todoList?: TodoItem[]): string {
2933
})
3034
lines.push("")
3135

32-
lines.push(
33-
"",
34-
"IMPORTANT: When task status changes, remember to call the `update_todo_list` tool to update your progress.",
35-
"",
36-
)
36+
if (isUpdateTodoListEnabled !== false) {
37+
lines.push(
38+
"",
39+
"IMPORTANT: When task status changes, remember to call the `update_todo_list` tool to update your progress.",
40+
"",
41+
)
42+
} else {
43+
lines.push("")
44+
}
3745
return lines.join("\n")
3846
}

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)