refactor: remove todo tool (#35989)
This commit is contained in:
@@ -93,7 +93,7 @@ describe("extractResponseText", () => {
|
||||
})
|
||||
|
||||
test("returns text even when tool parts follow", () => {
|
||||
const parts = [createTextPart("I'll help with that."), createToolPart("todowrite", "3 todos")]
|
||||
const parts = [createTextPart("I'll help with that."), createToolPart("read", "src/index.ts")]
|
||||
expect(extractResponseText(parts)).toBe("I'll help with that.")
|
||||
})
|
||||
|
||||
@@ -103,8 +103,7 @@ describe("extractResponseText", () => {
|
||||
})
|
||||
|
||||
test("returns null for tool-only response (signals summary needed)", () => {
|
||||
// This is the exact scenario from the bug report - todowrite with no text
|
||||
const parts = [createToolPart("todowrite", "8 todos")]
|
||||
const parts = [createToolPart("read", "src/index.ts")]
|
||||
expect(extractResponseText(parts)).toBeNull()
|
||||
})
|
||||
|
||||
|
||||
@@ -519,8 +519,8 @@ Options:
|
||||
--description what the agent should do [string]
|
||||
--mode agent mode [string] [choices: "all", "primary", "subagent"]
|
||||
--permissions, --tools comma-separated list of permissions to allow (default: all).
|
||||
Available: "bash, read, edit, glob, grep, webfetch, task, todowrite,
|
||||
websearch, lsp, skill" [string]
|
||||
Available: "bash, read, edit, glob, grep, webfetch, task, websearch,
|
||||
lsp, skill" [string]
|
||||
-m, --model model to use in the format of provider/model [string]"
|
||||
`;
|
||||
|
||||
|
||||
@@ -321,50 +321,8 @@ test("holds markdown code blocks until final commit and keeps newline ownership"
|
||||
}
|
||||
})
|
||||
|
||||
test("renders todo and question summaries without boilerplate footer copy", async () => {
|
||||
test("renders question summaries without boilerplate footer copy", async () => {
|
||||
const cases = [
|
||||
{
|
||||
title: "# Todos",
|
||||
include: [
|
||||
"[✓] List files under `run/`",
|
||||
"[•] Count functions in each `run/` file",
|
||||
"[ ] Mark each tracking item complete",
|
||||
],
|
||||
exclude: ["Updating", "todos completed"],
|
||||
start: toolCommit({
|
||||
tool: "todowrite",
|
||||
phase: "start",
|
||||
toolState: "running",
|
||||
state: {
|
||||
status: "running",
|
||||
input: {
|
||||
todos: [
|
||||
{ status: "completed", content: "List files under `run/`" },
|
||||
{ status: "in_progress", content: "Count functions in each `run/` file" },
|
||||
{ status: "pending", content: "Mark each tracking item complete" },
|
||||
],
|
||||
},
|
||||
time: { start: 1 },
|
||||
},
|
||||
}),
|
||||
final: toolCommit({
|
||||
tool: "todowrite",
|
||||
phase: "final",
|
||||
toolState: "completed",
|
||||
state: {
|
||||
status: "completed",
|
||||
input: {
|
||||
todos: [
|
||||
{ status: "completed", content: "List files under `run/`" },
|
||||
{ status: "in_progress", content: "Count functions in each `run/` file" },
|
||||
{ status: "pending", content: "Mark each tracking item complete" },
|
||||
],
|
||||
},
|
||||
metadata: {},
|
||||
time: { start: 1, end: 4 },
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
title: "# Questions",
|
||||
include: ["What should I work on in the codebase next?", "Bug fix"],
|
||||
|
||||
@@ -220,7 +220,6 @@ export default {
|
||||
api.kv.set(options.kv_key, "stored")
|
||||
const kv_after = api.kv.get(options.kv_key, "missing")
|
||||
const diff = api.state.session.diff(options.session_id)
|
||||
const todo = api.state.session.todo(options.session_id)
|
||||
const lsp = api.state.lsp()
|
||||
const mcp = api.state.mcp()
|
||||
const depth_before = api.ui.dialog.depth
|
||||
@@ -263,8 +262,6 @@ export default {
|
||||
kv_ready: api.kv.ready,
|
||||
diff_count: diff.length,
|
||||
diff_file: diff[0]?.file,
|
||||
todo_count: todo.length,
|
||||
todo_first: todo[0]?.content,
|
||||
lsp_count: lsp.length,
|
||||
mcp_count: mcp.length,
|
||||
mcp_first: mcp[0]?.name,
|
||||
@@ -513,10 +510,6 @@ export default {
|
||||
if (sessionID !== "ses_test") return []
|
||||
return [{ file: "src/app.ts", additions: 3, deletions: 1 }]
|
||||
},
|
||||
todo(sessionID) {
|
||||
if (sessionID !== "ses_test") return []
|
||||
return [{ content: "ship it", status: "pending" }]
|
||||
},
|
||||
},
|
||||
lsp() {
|
||||
return [{ id: "ts", root: "/tmp/project", status: "connected" }]
|
||||
@@ -867,8 +860,6 @@ describe("tui.plugin.loader", () => {
|
||||
expect(data.local.kv_ready).toBe(true)
|
||||
expect(data.local.diff_count).toBe(1)
|
||||
expect(data.local.diff_file).toBe("src/app.ts")
|
||||
expect(data.local.todo_count).toBe(1)
|
||||
expect(data.local.todo_first).toBe("ship it")
|
||||
expect(data.local.lsp_count).toBe(1)
|
||||
expect(data.local.mcp_count).toBe(1)
|
||||
expect(data.local.mcp_first).toBe("github")
|
||||
|
||||
Reference in New Issue
Block a user