MCPcopy Create free account
hub / github.com/freecodexyz/free-code / interpretCommandResult

Function interpretCommandResult

src/tools/BashTool/commandSemantics.ts:124–140  ·  view source on GitHub ↗
(
  command: string,
  exitCode: number,
  stdout: string,
  stderr: string,
)

Source from the content-addressed store, hash-verified

122 * Interpret command result based on semantic rules
123 */
124export function interpretCommandResult(
125 command: string,
126 exitCode: number,
127 stdout: string,
128 stderr: string,
129): {
130 isError: boolean
131 message?: string
132} {
133 const semantic = getCommandSemantic(command)
134 const result = semantic(exitCode, stdout, stderr)
135
136 return {
137 isError: result.isError,
138 message: result.message,
139 }
140}

Callers 1

callFunction · 0.70

Calls 1

getCommandSemanticFunction · 0.85

Tested by

no test coverage detected