diff options
| author | joshualitt <[email protected]> | 2025-08-21 14:40:18 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-21 21:40:18 +0000 |
| commit | ec41b8db8e714867ea354c29c07f009cd837ac23 (patch) | |
| tree | 4bb01ac90a25d6d82cfc005d68aae336be192744 /packages/core/src/tools/grep.ts | |
| parent | 299bf58309a0950ac81ae051b02ec64463ebd153 (diff) | |
feat(core): Annotate remaining error paths in tools with type. (#6699)
Diffstat (limited to 'packages/core/src/tools/grep.ts')
| -rw-r--r-- | packages/core/src/tools/grep.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/core/src/tools/grep.ts b/packages/core/src/tools/grep.ts index 86988c44..4a0b8af4 100644 --- a/packages/core/src/tools/grep.ts +++ b/packages/core/src/tools/grep.ts @@ -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, + }, }; } } |
