MCPcopy Create free account
hub / github.com/anomalyco/opencode / runTodo

Function runTodo

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

Source from the content-addressed store, hash-verified

375}
376
377function runTodo(p: ToolProps<typeof TodoWriteTool>): ToolInline {
378 return {
379 icon: "#",
380 title: "Todos",
381 mode: "block",
382 body: list<{ status?: string; content?: string }>(p.frame.input.todos)
383 .flatMap((item) => {
384 const body = typeof item?.content === "string" ? item.content : ""
385 if (!body) {
386 return []
387 }
388
389 const mark = item.status === "completed" ? "[✓]" : item.status === "in_progress" ? "[•]" : "[ ]"
390 return [`${mark} ${body}`]
391 })
392 .join("\n"),
393 }
394}
395
396function runSkill(p: ToolProps<typeof SkillTool>): ToolInline {
397 return {

Callers

nothing calls this directly

Calls 1

listFunction · 0.70

Tested by

no test coverage detected