summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorRobb Currall <[email protected]>2025-07-08 16:33:39 -0400
committerGitHub <[email protected]>2025-07-08 15:33:39 -0500
commita2fa7ffa425beeaef7999d7946e96ba0b5607f49 (patch)
tree86eba929054bdc37171691280c87851ce3d3aba5 /packages
parentf7d6175283e9296e17ea466d596d38c029e33f25 (diff)
downloadopencode-a2fa7ffa425beeaef7999d7946e96ba0b5607f49.tar.gz
opencode-a2fa7ffa425beeaef7999d7946e96ba0b5607f49.zip
fix: support cancelled task state (#775)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/tool/todo.ts2
-rw-r--r--packages/tui/internal/components/chat/message.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/todo.ts b/packages/opencode/src/tool/todo.ts
index 941564605..8a330c2d6 100644
--- a/packages/opencode/src/tool/todo.ts
+++ b/packages/opencode/src/tool/todo.ts
@@ -5,7 +5,7 @@ import { App } from "../app/app"
const TodoInfo = z.object({
content: z.string().min(1).describe("Brief description of the task"),
- status: z.enum(["pending", "in_progress", "completed"]).describe("Current status of the task"),
+ status: z.enum(["pending", "in_progress", "completed", "cancelled"]).describe("Current status of the task"),
priority: z.enum(["high", "medium", "low"]).describe("Priority level of the task"),
id: z.string().describe("Unique identifier for the todo item"),
})
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go
index 3414a77d5..fe34ad5ab 100644
--- a/packages/tui/internal/components/chat/message.go
+++ b/packages/tui/internal/components/chat/message.go
@@ -422,6 +422,8 @@ func renderToolDetails(
switch todo["status"] {
case "completed":
body += fmt.Sprintf("- [x] %s\n", content)
+ case "cancelled":
+ body += fmt.Sprintf("- [~] %s\n", content)
// case "in-progress":
// body += fmt.Sprintf("- [ ] %s\n", content)
default: