[PR #12594] fix: re-enable TodoReadTool with shared rendering logic #14286

Open
opened 2026-02-16 18:19:05 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12594

State: open
Merged: No


Summary

Re-enables the TodoReadTool that was disabled in commit 1275c71a6 during the CLI refactor.

Related: https://github.com/anomalyco/opencode/pull/11814#issuecomment-3856994472
Fixes: https://github.com/anomalyco/opencode/issues/12680

Background

In commit 1275c71a6 (cli: make run non-interactive), the run command was refactored from using a simple lookup table to explicit rendering functions for each tool. The TodoReadTool was commented out because no rendering function was implemented for it at the time.

This PR adds the missing rendering logic and follows the DRY principle by extracting common formatting into a shared todo() function.

Testing

Tested with:

bun run dev run "Create 3 todos: 'fix bug', 'write tests', 'update docs', then read them back"

Both todowrite and todoread now display correctly in both JSON and default output formats.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12594 **State:** open **Merged:** No --- ## Summary Re-enables the `TodoReadTool` that was disabled in commit 1275c71a6 during the CLI refactor. Related: https://github.com/anomalyco/opencode/pull/11814#issuecomment-3856994472 Fixes: https://github.com/anomalyco/opencode/issues/12680 ## Background In commit 1275c71a6 (`cli: make run non-interactive`), the `run` command was refactored from using a simple lookup table to explicit rendering functions for each tool. The `TodoReadTool` was commented out because no rendering function was implemented for it at the time. This PR adds the missing rendering logic and follows the DRY principle by extracting common formatting into a shared `todo()` function. ## Testing Tested with: ```bash bun run dev run "Create 3 todos: 'fix bug', 'write tests', 'update docs', then read them back" ``` Both `todowrite` and `todoread` now display correctly in both JSON and default output formats.
yindo added the pull-request label 2026-02-16 18:19:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14286