| 569 | } |
| 570 | |
| 571 | function snapTask(p: ToolProps<typeof TaskTool>): ToolSnapshot { |
| 572 | const kind = Locale.titlecase(p.input.subagent_type || "general") |
| 573 | const desc = p.input.description |
| 574 | const title = text(p.frame.state.title) |
| 575 | const rows = [desc || title].filter((item): item is string => Boolean(item)) |
| 576 | |
| 577 | return { |
| 578 | kind: "task", |
| 579 | title: `# ${kind} Task`, |
| 580 | rows, |
| 581 | tail: "", |
| 582 | } |
| 583 | } |
| 584 | |
| 585 | function snapTodo(p: ToolProps<typeof TodoWriteTool>): ToolSnapshot { |
| 586 | const items = list<{ status?: string; content?: string }>(p.frame.input.todos).flatMap((item) => { |