You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase A — Terminal Safety:
- Signal handling + panic recovery with deferred restoreTerminal()
- Boot Ctrl+C audio cleanup, PlayChime lifecycle management
- Context propagation for LLM streaming cancellation
- Agent goroutine wait-before-exit with agentDone channel
- Cleanup method on appModel for orderly shutdown
Phase B — TUI Visual Overhaul:
- Status bar shows live tool activity ("reading auth.go", "running go test")
- Turn dividers show "continuing..." instead of developer jargon "turn N"
- Faster narration: 3s initial delay, 6s interval, tool-triggered
- Retro theme with demoscene-inspired C64 palette
- PETSCII block character spinner for retro theme
- Scanline flash sweep on completion
Phase C — VS Code / Cursor Integration:
- Terminal detection via TERM_PROGRAM (vscode.go)
- OSC 8 file hyperlinks in tool blocks (clickable paths)
- OSC 633 shell integration prompt markers
- /diff command for VS Code native diff viewer
- Boot animation throttled to 8fps in IDE terminals
Task System (Claude Code-style):
- TaskStore with create/get/update/list, blocked-by dependencies
- 4 LLM tools: create_task, update_task, list_tasks, get_task
- Live task panel with progress bar and checklist indicators
- Active task activeForm shown in status bar spinner
- /tasks slash command, 14 unit tests
Permission UX:
- Enter = allow (default action), single-key y/n/a shortcuts
- Bordered permission block with clear action display
- First-time tip notification for /trust all
- Non-blocking channel sends to prevent TUI freeze
- waitForEvent bails out on stopCh close
Other:
- Token cost estimates in /session command
- Tool activity text for all tools (git, web_search, tasks)
- estimateCost() with pricing for common models
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: agent.go
+49-9Lines changed: 49 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
package main
2
2
3
3
import (
4
+
"context"
4
5
"encoding/json"
5
6
"fmt"
6
7
"os"
@@ -72,17 +73,29 @@ Available tools:
72
73
- git_log: Show recent commit history.
73
74
- git_commit: Stage files and create a commit.
74
75
- git_branch: List, create, or switch branches.
76
+
- create_task: Create a task to track progress. The user sees these as a live checklist.
77
+
- update_task: Update task status (pending → in_progress → completed).
78
+
- list_tasks: List all tasks with status.
79
+
- get_task: Get full details of a specific task.
75
80
76
81
Guidelines:
77
-
- You can call multiple tools in parallel — read_file, list_files, search_files, web_search, and dispatch_agent all run concurrently
82
+
- You can call multiple tools in parallel — read_file, list_files, search_files, web_search, dispatch_agent, list_tasks, and get_task all run concurrently
78
83
- Use list_files and search_files to explore the project before making changes
79
84
- Read files before editing them — understand existing code first
- For multiple related edits, prefer multi_edit over separate edit_file calls
82
87
- Use git tools instead of shell for git operations — they provide structured output
83
88
- After you edit files, the system may report diagnostics (errors, warnings) from language tools. If diagnostics appear, fix the issues before moving on.
84
89
- If a tool fails, read the error and try a different approach
85
-
- When finished, briefly summarize what you changed and why`
90
+
- When finished, briefly summarize what you changed and why
91
+
92
+
Task management:
93
+
- For multi-step work (3+ steps), create tasks upfront so the user can track progress
94
+
- Set status to "in_progress" BEFORE starting work on a task
95
+
- Set status to "completed" only when fully done — not when partially done
96
+
- Keep task subjects short and imperative (e.g. "Add auth middleware")
97
+
- Provide active_form in present continuous (e.g. "Adding auth middleware") — it shows in the spinner
98
+
- For simple or single-step tasks, skip task creation — just do the work directly`
0 commit comments