MCP OAuth Part 2 - MCP Client Integration (#4318)

Co-authored-by: Greg Shikhman <shikhman@google.com>
This commit is contained in:
Brian Ray
2025-07-22 09:34:56 -04:00
committed by GitHub
parent 138ff73821
commit 258c848909
7 changed files with 689 additions and 28 deletions
+7
View File
@@ -158,6 +158,13 @@ export class GeminiClient {
this.getChat().setHistory(history);
}
async setTools(): Promise<void> {
const toolRegistry = await this.config.getToolRegistry();
const toolDeclarations = toolRegistry.getFunctionDeclarations();
const tools: Tool[] = [{ functionDeclarations: toolDeclarations }];
this.getChat().setTools(tools);
}
async resetChat(): Promise<void> {
this.chat = await this.startChat();
}