MCPcopy Index your code
hub / github.com/anomalyco/opencode / snapTask

Function snapTask

packages/opencode/src/cli/cmd/run/tool.ts:571–583  ·  view source on GitHub ↗
(p: ToolProps<typeof TaskTool>)

Source from the content-addressed store, hash-verified

569}
570
571function 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
585function snapTodo(p: ToolProps<typeof TodoWriteTool>): ToolSnapshot {
586 const items = list<{ status?: string; content?: string }>(p.frame.input.todos).flatMap((item) => {

Callers

nothing calls this directly

Calls 1

textFunction · 0.70

Tested by

no test coverage detected