Compare commits

...

1 Commits

Author SHA1 Message Date
Spencer 83eb00719d fix(core): prevent MCP tool wiping on background discovery failures 2026-04-24 18:49:25 +00:00
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -1461,8 +1461,8 @@ describe('mcp-client', () => {
// Trigger notification - should fail internally but catch the error
await notificationCallback();
// Should try to remove tools
expect(mockedToolRegistry.removeMcpToolsByServer).toHaveBeenCalled();
// Should NOT try to remove tools when discovery fails
expect(mockedToolRegistry.removeMcpToolsByServer).not.toHaveBeenCalled();
// Should NOT emit success feedback
expect(coreEvents.emitFeedback).not.toHaveBeenCalledWith(
+1
View File
@@ -1344,6 +1344,7 @@ export async function discoverTools(
error,
mcpServerName,
);
throw error;
}
return [];
}