mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
fix(mcp): Notifications/tools/list_changed support not working (#21050)
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
This commit is contained in:
@@ -69,4 +69,17 @@ export class ResourceRegistry {
|
||||
clear(): void {
|
||||
this.resources.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of resources registered from a specific MCP server.
|
||||
*/
|
||||
getResourcesByServer(serverName: string): MCPResource[] {
|
||||
const serverResources: MCPResource[] = [];
|
||||
for (const resource of this.resources.values()) {
|
||||
if (resource.serverName === serverName) {
|
||||
serverResources.push(resource);
|
||||
}
|
||||
}
|
||||
return serverResources.sort((a, b) => a.uri.localeCompare(b.uri));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user