feat: allow custom filename for context files (#654)

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Allen Hutchison
2025-05-31 12:49:28 -07:00
committed by GitHub
parent cbc1614b84
commit 53bf778497
15 changed files with 1710 additions and 888 deletions

View File

@@ -19,7 +19,7 @@ import { ShellTool } from '../tools/shell.js';
import { WriteFileTool } from '../tools/write-file.js';
import { WebFetchTool } from '../tools/web-fetch.js';
import { ReadManyFilesTool } from '../tools/read-many-files.js';
import { MemoryTool } from '../tools/memoryTool.js';
import { MemoryTool, setGeminiMdFilename } from '../tools/memoryTool.js';
import { WebSearchTool } from '../tools/web-search.js';
export class MCPServerConfig {
@@ -56,6 +56,7 @@ export interface ConfigParameters {
alwaysSkipModificationConfirmation?: boolean;
vertexai?: boolean;
showMemoryUsage?: boolean;
contextFileName?: string;
}
export class Config {
@@ -100,6 +101,10 @@ export class Config {
this.vertexai = params.vertexai;
this.showMemoryUsage = params.showMemoryUsage ?? false;
if (params.contextFileName) {
setGeminiMdFilename(params.contextFileName);
}
this.toolRegistry = createToolRegistry(this);
}