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

Function completedToolUpdate

packages/opencode/src/acp/tool.ts:186–199  ·  view source on GitHub ↗
(input: {
  readonly toolCallId: string
  readonly toolName: string
  readonly state: CompletedToolState & { readonly title?: string }
  readonly cwd?: string
})

Source from the content-addressed store, hash-verified

184}
185
186export function completedToolUpdate(input: {
187 readonly toolCallId: string
188 readonly toolName: string
189 readonly state: CompletedToolState & { readonly title?: string }
190 readonly cwd?: string
191}): ToolCallUpdate {
192 return {
193 toolCallId: input.toolCallId,
194 status: "completed",
195 ...(input.state.title ? { title: input.state.title } : {}),
196 content: completedToolContent(input.toolName, input.state),
197 rawOutput: completedToolRawOutput(input.state),
198 }
199}
200
201export function errorToolUpdate(input: {
202 readonly toolCallId: string

Callers 2

tool.test.tsFile · 0.90
handleToolPartMethod · 0.90

Calls 2

completedToolContentFunction · 0.85
completedToolRawOutputFunction · 0.85

Tested by

no test coverage detected