chore: remove dead code for todoread tool (#19128)

This commit is contained in:
Aiden Cline
2026-03-25 11:21:42 -05:00
committed by GitHub
parent cafc2b204b
commit 77fc88c8ad
87 changed files with 5 additions and 528 deletions

View File

@@ -80,11 +80,6 @@ export const TaskTool = Tool.define("task", async (ctx) => {
pattern: "*",
action: "deny",
},
{
permission: "todoread",
pattern: "*",
action: "deny",
},
...(hasTaskPermission
? []
: [
@@ -137,7 +132,6 @@ export const TaskTool = Tool.define("task", async (ctx) => {
agent: agent.name,
tools: {
todowrite: false,
todoread: false,
...(hasTaskPermission ? {} : { task: false }),
...Object.fromEntries((config.experimental?.primary_tools ?? []).map((t) => [t, false])),
},

View File

@@ -16,7 +16,7 @@ export const TodoWriteTool = Tool.define("todowrite", {
metadata: {},
})
await Todo.update({
Todo.update({
sessionID: ctx.sessionID,
todos: params.todos,
})
@@ -29,25 +29,3 @@ export const TodoWriteTool = Tool.define("todowrite", {
}
},
})
export const TodoReadTool = Tool.define("todoread", {
description: "Use this tool to read your todo list",
parameters: z.object({}),
async execute(_params, ctx) {
await ctx.ask({
permission: "todoread",
patterns: ["*"],
always: ["*"],
metadata: {},
})
const todos = await Todo.get(ctx.sessionID)
return {
title: `${todos.filter((x) => x.status !== "completed").length} todos`,
metadata: {
todos,
},
output: JSON.stringify(todos, null, 2),
}
},
})

View File

@@ -1,14 +0,0 @@
Use this tool to read the current to-do list for the session. This tool should be used proactively and frequently to ensure that you are aware of
the status of the current task list. You should make use of this tool as often as possible, especially in the following situations:
- At the beginning of conversations to see what's pending
- Before starting new tasks to prioritize work
- When the user asks about previous tasks or plans
- Whenever you're uncertain about what to do next
- After completing tasks to update your understanding of remaining work
- After every few messages to ensure you're on track
Usage:
- This tool takes in no parameters. So leave the input blank or empty. DO NOT include a dummy object, placeholder string or a key like "input" or "empty". LEAVE IT BLANK.
- Returns a list of todo items with their status, priority, and content
- Use this information to track progress and plan next steps
- If no todos exist yet, an empty list will be returned