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

Function taskStatus

packages/opencode/src/cli/cmd/run/subagent-data.ts:295–309  ·  view source on GitHub ↗
(part: ToolPart)

Source from the content-addressed store, hash-verified

293}
294
295function taskStatus(part: ToolPart): FooterSubagentTab["status"] {
296 if (part.state.status === "completed") {
297 return "completed"
298 }
299
300 if (part.state.status === "error") {
301 if (metadata(part, "interrupted") === true || text(part.state.error) === "Tool execution aborted") {
302 return "cancelled"
303 }
304
305 return "error"
306 }
307
308 return "running"
309}
310
311function taskTab(part: ToolPart, sessionID: string): FooterSubagentTab {
312 const label = Locale.titlecase(text(part.state.input.subagent_type) ?? "general")

Callers 1

taskTabFunction · 0.85

Calls 2

metadataFunction · 0.70
textFunction · 0.70

Tested by

no test coverage detected