support for mcp tools

This commit is contained in:
olcan
2025-05-04 12:11:19 -07:00
committed by Olcan
parent 6b6eef5b80
commit 9742f6e4a2
6 changed files with 677 additions and 46 deletions

View File

@@ -34,6 +34,7 @@ export class Config {
private readonly fullContext: boolean = false, // Default value here
private readonly toolDiscoveryCommand: string | undefined,
private readonly toolCallCommand: string | undefined,
private readonly mcpServerCommand: string | undefined,
) {
// toolRegistry still needs initialization based on the instance
this.toolRegistry = createToolRegistry(this);
@@ -77,6 +78,10 @@ export class Config {
getToolCallCommand(): string | undefined {
return this.toolCallCommand;
}
getMcpServerCommand(): string | undefined {
return this.mcpServerCommand;
}
}
function findEnvFile(startDir: string): string | null {
@@ -112,6 +117,7 @@ export function createServerConfig(
fullContext?: boolean,
toolDiscoveryCommand?: string,
toolCallCommand?: string,
mcpServerCommand?: string,
): Config {
return new Config(
apiKey,
@@ -123,6 +129,7 @@ export function createServerConfig(
fullContext,
toolDiscoveryCommand,
toolCallCommand,
mcpServerCommand,
);
}