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

Function shellOutput

packages/opencode/src/cli/cmd/run/tool.ts:1407–1418  ·  view source on GitHub ↗
(command: string, raw: string)

Source from the content-addressed store, hash-verified

1405}
1406
1407function shellOutput(command: string, raw: string): string | undefined {
1408 const body = stripAnsi(raw).replace(/^\n+/, "").replace(/\n+$/, "")
1409 if (!body) {
1410 return undefined
1411 }
1412
1413 if (!command) {
1414 return body
1415 }
1416
1417 return `\n${body}`
1418}
1419
1420export function toolEntryBody(commit: StreamCommit, raw: string): RunEntryBody | undefined {
1421 if (commit.shell) {

Callers 1

toolEntryBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected