Skip to content

Commit 9b66b07

Browse files
committed
fix: remove todo list filtering from custom instructions
Remove the filtering logic that was excluding update_todo_list references from mode-specific instructions when todoListEnabled was false. The todo list tool availability should be controlled at the tool level, not by filtering instructions.
1 parent adf3052 commit 9b66b07

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/core/prompts/sections/custom-instructions.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -259,27 +259,7 @@ export async function addCustomInstructions(
259259

260260
// Add mode-specific instructions after
261261
if (typeof modeCustomInstructions === "string" && modeCustomInstructions.trim()) {
262-
let instructions = modeCustomInstructions.trim()
263-
264-
// Filter out todo list references if todoListEnabled is false
265-
if (options.settings?.todoListEnabled === false) {
266-
// Remove sentences that mention update_todo_list
267-
instructions = instructions
268-
.split("\n")
269-
.map((line) => {
270-
// Skip lines that mention update_todo_list tool
271-
if (line.includes("update_todo_list") || line.includes("todo list using the")) {
272-
return ""
273-
}
274-
return line
275-
})
276-
.filter((line) => line !== "")
277-
.join("\n")
278-
// Clean up any double line breaks that might have been created
279-
.replace(/\n\n+/g, "\n\n")
280-
}
281-
282-
sections.push(`Mode-specific Instructions:\n${instructions}`)
262+
sections.push(`Mode-specific Instructions:\n${modeCustomInstructions.trim()}`)
283263
}
284264

285265
// Add rules - include both mode-specific and generic rules if they exist

0 commit comments

Comments
 (0)