refactor: remove todo tool (#35989) · argszero/opencode@7feefb6 · GitHub
Skip to content

Commit 7feefb6

Browse files
authored
refactor: remove todo tool (anomalyco#35989)
1 parent d4155f2 commit 7feefb6

250 files changed

Lines changed: 237 additions & 4755 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

github/index.ts

Lines changed: 0 additions & 1 deletion

packages/app/e2e/performance/timeline-stability/tools.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@ test.describe("timeline tool state stability", () => {
3333
}
3434
const names = { webfetch: "webfetch", websearch: "websearch", task: "task", skill: "skill", custom: "mcp_probe" }
3535
const questionID = "prt_state_question"
36-
const todoID = "prt_state_todo"
3736
const initial = [
3837
...ids.map((id) => toolPart(`prt_state_${id}`, names[id], "pending", inputs[id])),
3938
toolPart(questionID, "question", "pending", questionInput()),
40-
toolPart(todoID, "todowrite", "pending", { todos: [{ content: "Hidden", status: "pending" }] }),
4139
textPart("prt_state_following", "Following lightweight tools"),
4240
]
4341
const childID = "ses_timeline_child"
@@ -49,7 +47,6 @@ test.describe("timeline tool state stability", () => {
4947
await timeline.send(status("busy"), 120)
5048
for (const id of ids) await timeline.waitForPart(`prt_state_${id}`)
5149
await expect(page.locator(`[data-timeline-part-id="${questionID}"]`)).toHaveCount(0)
52-
await expect(page.locator(`[data-timeline-part-id="${todoID}"]`)).toHaveCount(0)
5350

5451
const regionIDs = [
5552
"prt_state_webfetch",
@@ -105,7 +102,6 @@ test.describe("timeline tool state stability", () => {
105102
]),
106103
)
107104
await expect(page.locator(`[data-timeline-part-id="${questionID}"]`)).toContainText("Keep it stable")
108-
await expect(page.locator(`[data-timeline-part-id="${todoID}"]`)).toHaveCount(0)
109105
await expect(
110106
page.locator(`a[href$="/session/${childID}"]`, { has: page.locator('[data-component="task-tool-card"]') }),
111107
).toBeVisible()

packages/app/e2e/performance/timeline/session-timeline-stress.fixture.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ const childMessages = Array.from({ length: 4 }, (_, index) => [
269269
]).flat()
270270

271271
function renderable(part: MessagePart) {
272-
if (part.type === "tool" && part.tool === "todowrite") return false
273272
if (part.type === "text") return !!part.text.trim()
274273
if (part.type === "reasoning") return !!part.text.trim()
275274
return part.type !== "step-start" && part.type !== "step-finish" && part.type !== "patch"

packages/app/e2e/regression/cross-server-tab-close.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async function mockServers(page: Page, requests: string[]) {
9090
if (url.pathname === `/session/${current.id}`) return json(route, current)
9191
if (/^\/session\/[^/]+$/.test(url.pathname)) return json(route, { name: "NotFoundError" }, 404)
9292
if (url.pathname === `/session/${current.id}/message`) return json(route, [])
93-
if (/^\/session\/[^/]+\/(children|todo|diff)$/.test(url.pathname)) return json(route, [])
93+
if (/^\/session\/[^/]+\/(children|diff)$/.test(url.pathname)) return json(route, [])
9494
if (["/skill", "/command", "/lsp", "/formatter", "/permission", "/question", "/vcs/diff"].includes(url.pathname))
9595
return json(route, [])
9696
if (["/global/config", "/config", "/provider/auth", "/mcp", "/session/status"].includes(url.pathname))

packages/app/e2e/regression/remote-tab-busy.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function mockServers(page: Page) {
6565
if (url.pathname === `/session/${current.id}`) return json(route, current)
6666
if (/^\/session\/[^/]+$/.test(url.pathname)) return json(route, { name: "NotFoundError" }, 404)
6767
if (url.pathname === `/session/${current.id}/message`) return json(route, [])
68-
if (/^\/session\/[^/]+\/(children|todo|diff)$/.test(url.pathname)) return json(route, [])
68+
if (/^\/session\/[^/]+\/(children|diff)$/.test(url.pathname)) return json(route, [])
6969
if (["/skill", "/command", "/lsp", "/formatter", "/permission", "/question", "/vcs/diff"].includes(url.pathname))
7070
return json(route, [])
7171
if (["/global/config", "/config", "/provider/auth", "/mcp"].includes(url.pathname)) return json(route, {})

packages/app/e2e/regression/session-timeline-projection.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ test.describe("session timeline projection", () => {
3535
editPart("prt_edit"),
3636
toolPart("prt_write", "write", "completed", { filePath: "src/new.ts", content: "export const stable = true\n" }),
3737
patchPart("prt_patch"),
38-
toolPart("prt_todo", "todowrite", "completed", { todos: [{ content: "Hidden", status: "pending" }] }),
3938
toolPart(
4039
"prt_question",
4140
"question",
@@ -65,7 +64,6 @@ test.describe("session timeline projection", () => {
6564
]) {
6665
await expect(page.locator(`[data-timeline-part-id="${id}"]`).first(), id).toBeVisible()
6766
}
68-
await expect(page.locator('[data-timeline-part-id="prt_todo"]')).toHaveCount(0)
6967
})
7068

7169
test("projects gaps, dividers, assistant parts, and errors together", async ({ page }) => {

packages/app/e2e/regression/session-timeline-tool-projection.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ test("renders every tool error outcome without leaking hidden tools", async ({ p
1717
error: "The user dismissed this question",
1818
}),
1919
toolPart("prt_question_error", "question", "error", questionInput(), { error: "Question transport failed" }),
20-
toolPart("prt_todo_error", "todowrite", "error", { todos: [] }, { error: "Hidden todo failure" }),
2120
)
2221
await setupTimeline(page, { messages: [userMessage(), assistantMessage(parts)] })
2322

2423
await expect(page.locator('[data-kind="tool-error-card"]')).toHaveCount(ordinary.length + 1)
2524
await expect(page.getByText(/dismissed/i)).toBeVisible()
26-
await expect(page.locator('[data-timeline-part-id="prt_todo_error"]')).toHaveCount(0)
2725
for (let index = 0; index < ordinary.length; index++) {
2826
await expect(page.locator(`[data-timeline-part-id="prt_error_${index}"]`)).toBeVisible()
2927
}

packages/app/e2e/regression/session-todo-dock-navigation.spec.ts

Lines changed: 0 additions & 186 deletions
This file was deleted.

packages/app/e2e/regression/tab-navigate-mousedown.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async function mockServer(page: Page) {
6363
if (byId) return json(route, byId)
6464
if (/^\/session\/[^/]+$/.test(url.pathname)) return json(route, { name: "NotFoundError" }, 404)
6565
if (/^\/session\/[^/]+\/message$/.test(url.pathname)) return json(route, [])
66-
if (/^\/session\/[^/]+\/(children|todo|diff)$/.test(url.pathname)) return json(route, [])
66+
if (/^\/session\/[^/]+\/(children|diff)$/.test(url.pathname)) return json(route, [])
6767
if (["/skill", "/command", "/lsp", "/formatter", "/permission", "/question", "/vcs/diff"].includes(url.pathname))
6868
return json(route, [])
6969
if (["/global/config", "/config", "/provider/auth", "/mcp", "/session/status"].includes(url.pathname))

packages/app/e2e/smoke/session-timeline.fixture.ts

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)