MCPcopy
hub / github.com/anomalyco/opencode / toolError

Function toolError

packages/opencode/src/cli/cmd/run.ts:108–124  ·  view source on GitHub ↗
(part: ToolPart)

Source from the content-addressed store, hash-verified

106}
107
108async function toolError(part: ToolPart) {
109 try {
110 const { toolInlineInfo } = await import("./run/tool")
111 const next = toolInlineInfo(part)
112 inline({
113 icon: "✗",
114 title: `${next.title} failed`,
115 ...(next.description && { description: next.description }),
116 })
117 return
118 } catch {
119 inline({
120 icon: "✗",
121 title: `${part.tool} failed`,
122 })
123 }
124}
125
126export const RunCommand = effectCmd({
127 command: "run [message..]",

Callers 1

loopFunction · 0.70

Calls 2

toolInlineInfoFunction · 0.85
inlineFunction · 0.70

Tested by

no test coverage detected