MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / hasFailedEditOutput

Function hasFailedEditOutput

cli/src/utils/implementor-helpers.ts:313–333  ·  view source on GitHub ↗
(params: {
  outputStr: string
  message: string | null
  diffFromOutput: string | null
})

Source from the content-addressed store, hash-verified

311}
312
313function hasFailedEditOutput(params: {
314 outputStr: string
315 message: string | null
316 diffFromOutput: string | null
317}): boolean {
318 const { outputStr, message, diffFromOutput } = params
319 const trimmedOutput = outputStr.trim()
320 if (!trimmedOutput) {
321 return false
322 }
323 if (
324 extractValueForKey(outputStr, 'errorMessage') ||
325 isErrorOutput(outputStr)
326 ) {
327 return true
328 }
329 if (diffFromOutput || isSuccessfulEditMessage(message)) {
330 return false
331 }
332 return !isSuccessfulEditMessage(trimmedOutput)
333}
334
335function isFailedEditToolBlock(toolBlock: ToolContentBlock): boolean {
336 const outputRaw = toolBlock.outputRaw as unknown

Callers 2

extractDiffFunction · 0.85
isFailedEditToolBlockFunction · 0.85

Calls 3

extractValueForKeyFunction · 0.85
isErrorOutputFunction · 0.85
isSuccessfulEditMessageFunction · 0.85

Tested by

no test coverage detected