A Pi extension that replicates VSCode Copilot Chat manage_todo_list tool. Track multi-step work with a structured todo list that persists across sessions and displays live progress in a widget above your editor.
Status: Production-ready. Faithful replication of Copilot's manage_todo_list with enhanced visual feedback and session persistence.
pi-todo.mp4
- Two operations:
read(retrieve current list) andwrite(complete replacement) - TodoItem schema:
id,title,description,status(not-started | in-progress | completed) - Validation: Required fields, valid statuses, complete replacement only
- Multiple in-progress: Supports parallel work and subagents
- Smart warnings: Alerts when todo list is too small (<3 items)
- LLM guidance: CRITICAL workflow — plan → mark in-progress → complete → mark completed → repeat
- ✓ Live widget above editor showing real-time progress with status icons
- ✓ Session persistence across switches, forks, and tree navigation
- ✓ Themed display with colors and strikethrough for completed items
- ✓ User commands:
/todos(toggle/stats) and/todos clear(reset) - ✓ Status icons:
✓completed,◉in-progress,○not-started - ✓ Enhanced feedback: Progress stats and continuation instructions in tool responses
- ✓ Small list detection: Warns when todo list might be unnecessary
Option A — Install from npm:
pi install npm:pi-manage-todo-listOption B — Load directly (dev):
pi -e ~/projects/pi-manage-todo-list/src/index.tsOption C — Install from local folder:
pi install ~/projects/pi-manage-todo-listThen run pi normally; the extension auto-discovers.
The agent automatically uses manage_todo_list for complex multi-step work:
You: Build a REST API with authentication, rate limiting, and tests.
Agent: I'll break this into a structured todo list:
[calls manage_todo_list with write operation]
1. ○ Design API endpoints (not-started)
2. ○ Implement authentication middleware (not-started)
3. ○ Add rate limiting (not-started)
4. ○ Write integration tests (not-started)
Now starting with the first task...
[calls manage_todo_list to mark #1 as in-progress]
The widget displays above your editor:
Todo List — 0/4 completed
◉ 1. Design API endpoints
○ 2. Implement authentication middleware
○ 3. Add rate limiting
○ 4. Write integration tests
| Command | Description |
|---|---|
/todos |
Show completion stats and refresh widget |
/todos clear |
Clear entire todo list |
State Management:
- In-memory state per session via
TodoStateManager - Persists via
detailsfield in tool results - Auto-reconstructs on session events (start/switch/fork/tree)
Widget:
- Read-only display with progress stats
- Icons, colors, and strikethrough for visual clarity
- Updates after every
manage_todo_listcall
Tool Rendering:
renderCall: Shows operation type and item countrenderResult: Expandable view with status breakdown
| Feature | Copilot | pi-manage-todo-list |
|---|---|---|
| Tool Schema | Identical | ✓ |
| Multiple in-progress | Allowed | ✓ |
| Small list warning | Yes (<3 items) | ✓ |
| LLM Workflow | Basic | Enhanced with continuation instructions |
| Progress Stats | Not in response | ✓ Shows X/Y completed |
| UI Visibility | None | Live widget |
| Persistence | Conversation only | Session file + tool details |
| Visual Feedback | Text only | Themed icons + colors |
| User Control | None | /todos commands |
TypeScript check:
npx tsc --noEmitTest with Pi:
pi -e ./src/index.ts --print "create 3 todos: review code, write tests, deploy"src/
types.ts # TodoItem, TodoDetails, TodoStatus
state-manager.ts # In-memory state + validation
tool.ts # manage_todo_list tool definition
ui/
todo-widget.ts # Read-only widget above editor
index.ts # Extension entry point
See CHANGELOG.md for version history and release notes.
MIT (see LICENSE)
