mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 06:12:50 -07:00
fix(core): prevent MCP tool wiping on background discovery failures
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -1344,6 +1344,7 @@ export async function discoverTools(
|
||||
error,
|
||||
mcpServerName,
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user