mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 03:54:43 -07:00
MCP OAuth Part 2 - MCP Client Integration (#4318)
Co-authored-by: Greg Shikhman <shikhman@google.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user