Repository navigation
feat: rename the experimental todowrite tool to todo - #57481
rekram1-node wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
This looks good. I ran OpenCode from source on both checkouts with the simulated model and experimental.todo on. Base: a todowrite call renders the todo block. This PR: a todo call renders the same block, and a legacy todowrite call gets the unknown-tool error, shown as "Todo update failed". The related core, TUI and session-ui tests pass, and core, tui, session-ui and schema all type-check.
Public API: the experimental tool name and its permission action both change from todowrite to todo. The input, the output and the experimental.todo flag are unchanged, and the OpenAPI spec doesn't change. V1 permission.todowrite keys and old todowrite calls in history are mapped. V2 permissions rules written for v2.1.0 with "action": "todowrite" are not: they will silently stop matching and need renaming to todo. That seems acceptable for an experimental tool, but it may be worth a line in the release notes.
No blocking concerns.
Related: #42421


Refs #42421
Renames the experimental
todowritetool, added in #56947, totodo. It shipped in v2.1.0 behindexperimental.todo, so this is the cheapest time to change the name.todo. The input, the reply, and the flag are unchanged.todowritecalls. The TUI renders them as todo calls in the timeline, sidebar, and mini mode viacanonicalToolName. Desktop/web hides both names until desktop support lands.todowritegets the normal unknown-tool error.permission.todowritekey maps totodo, alongside the existingbash→shellandtask→subagentrenames.todowritetool is no longer available. Iftodois in your tool list, use it instead."Verification
packages/core:bun typecheckpasses.bun test test/v1-migration.test.ts test/tool-todo.test.ts test/config: 276 pass.packages/tui:bun typecheckpasses.test/util/tool-display.test.tsandtest/mini: 430 pass.packages/session-ui:rows-current.test.tspasses, 51 tests. It covers hiding both names.packages/schemaandservices/www: typecheck pass.check:generatedshows no OpenAPI change.Added by the opencode bot (AI-generated).
Related: #42421
Public API: renames the experimental tool and its permission action from todowrite to todo; V1 permission keys are mapped, but V2
permissionsrules usingtodowriteneed renaming