mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
support for mcp tools
This commit is contained in:
parent
6b6eef5b80
commit
9742f6e4a2
6 changed files with 677 additions and 46 deletions
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue