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
@@ -16,6 +16,7 @@ import * as fs from 'fs/promises';
import * as path from 'path';
import * as os from 'os';
import { ToolConfirmationOutcome } from './tools.js';
import { ToolErrorType } from './tool-error.js';
// Mock dependencies
vi.mock(import('fs/promises'), async (importOriginal) => {
@@ -287,6 +288,9 @@ describe('MemoryTool', () => {
expect(result.returnDisplay).toBe(
`Error saving memory: ${underlyingError.message}`,
);
expect(result.error?.type).toBe(
ToolErrorType.MEMORY_TOOL_EXECUTION_ERROR,
);
});
});