feat(core): Annotate remaining error paths in tools with type. (#6699)

This commit is contained in:
joshualitt
2025-08-21 14:40:18 -07:00
committed by GitHub
parent 299bf58309
commit ec41b8db8e
19 changed files with 348 additions and 48 deletions

View File

@@ -21,6 +21,7 @@ import { makeRelative, shortenPath } from '../utils/paths.js';
import { getErrorMessage, isNodeError } from '../utils/errors.js';
import { isGitRepository } from '../utils/gitUtils.js';
import { Config } from '../config/config.js';
import { ToolErrorType } from './tool-error.js';
// --- Interfaces ---
@@ -198,6 +199,10 @@ class GrepToolInvocation extends BaseToolInvocation<
return {
llmContent: `Error during grep search operation: ${errorMessage}`,
returnDisplay: `Error: ${errorMessage}`,
error: {
message: errorMessage,
type: ToolErrorType.GREP_EXECUTION_ERROR,
},
};
}
}