mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
support for mcp tools
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user