mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: support cancelled task state (#775)
This commit is contained in:
parent
f7d6175283
commit
a2fa7ffa42
2 changed files with 3 additions and 1 deletions
|
|
@ -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"),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue