Use roots cache in get-roots-list tool
* In get-roots-list.ts, query the server's cache of the latest roots from the client and only request the list from the client if it doesn't exist. * In roots.ts, export the roots map
This commit is contained in:
parent
77deef08ce
commit
6854902775
1 changed files with 20 additions and 15 deletions
|
|
@ -5,7 +5,7 @@ import {
|
|||
} from "@modelcontextprotocol/sdk/types.js";
|
||||
|
||||
// Track roots by session id
|
||||
const roots: Map<string | undefined, Root[]> = new Map<
|
||||
export const roots: Map<string | undefined, Root[]> = new Map<
|
||||
string | undefined,
|
||||
Root[]
|
||||
>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue