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

Function shellOutputSnapshot

packages/opencode/src/acp/tool.ts:258–261  ·  view source on GitHub ↗
(state: { readonly metadata?: unknown })

Source from the content-addressed store, hash-verified

256}
257
258export function shellOutputSnapshot(state: { readonly metadata?: unknown }) {
259 if (!state.metadata || typeof state.metadata !== "object") return undefined
260 return stringValue((state.metadata as Record<string, unknown>).output)
261}
262
263// For shell tools, surface the actual command as the title so it stays visible
264// before output lands; non-shell tools keep their model-provided title.

Callers 2

tool.test.tsFile · 0.90
runningToolMethod · 0.90

Calls 1

stringValueFunction · 0.70

Tested by

no test coverage detected