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

Function bashCommand

packages/opencode/src/cli/cmd/run/session-data.ts:659–671  ·  view source on GitHub ↗
(part: ToolPart)

Source from the content-addressed store, hash-verified

657}
658
659function bashCommand(part: ToolPart): string | undefined {
660 if (part.tool !== "bash") {
661 return undefined
662 }
663
664 const input = part.state.input
665 if (!input || typeof input !== "object" || Array.isArray(input)) {
666 return undefined
667 }
668
669 const command = Reflect.get(input, "command")
670 return typeof command === "string" ? command : undefined
671}
672
673function shellCommit(
674 input: {

Callers 1

reduceSessionDataFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected