diff options
| author | Scott Densmore <[email protected]> | 2025-06-02 14:55:51 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-02 14:55:51 -0700 |
| commit | e428707e074627b0eacce2c2295f34b2ffa28198 (patch) | |
| tree | eb977c256c48ea40c661f459e89507f3beb22fba /packages/core/src/config/config.ts | |
| parent | 1dcf0a4cbdee249fd9a20c67b9b718563353773b (diff) | |
Refactor: Centralize GeminiClient in Config (#693)
Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/core/src/config/config.ts')
| -rw-r--r-- | packages/core/src/config/config.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index dc77208c..46e5123c 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -21,6 +21,7 @@ import { WebFetchTool } from '../tools/web-fetch.js'; import { ReadManyFilesTool } from '../tools/read-many-files.js'; import { MemoryTool, setGeminiMdFilename } from '../tools/memoryTool.js'; import { WebSearchTool } from '../tools/web-search.js'; +import { GeminiClient } from '../core/client.js'; import { GEMINI_CONFIG_DIR as GEMINI_DIR } from '../tools/memoryTool.js'; export enum ApprovalMode { @@ -86,6 +87,7 @@ export class Config { private approvalMode: ApprovalMode; private readonly vertexai: boolean | undefined; private readonly showMemoryUsage: boolean; + private readonly geminiClient: GeminiClient; constructor(params: ConfigParameters) { this.apiKey = params.apiKey; @@ -112,6 +114,7 @@ export class Config { } this.toolRegistry = createToolRegistry(this); + this.geminiClient = new GeminiClient(this); } getApiKey(): string { @@ -200,6 +203,10 @@ export class Config { getShowMemoryUsage(): boolean { return this.showMemoryUsage; } + + getGeminiClient(): GeminiClient { + return this.geminiClient; + } } function findEnvFile(startDir: string): string | null { |
