mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
fix: subagent filename vs agent name mismatch handle
This commit is contained in:
@@ -52,6 +52,7 @@ import {
|
||||
import { SubagentHooks } from './subagent-hooks.js';
|
||||
import { logSubagentExecution } from '../telemetry/loggers.js';
|
||||
import { SubagentExecutionEvent } from '../telemetry/types.js';
|
||||
import { TaskTool } from '../tools/task.js';
|
||||
|
||||
/**
|
||||
* @fileoverview Defines the configuration interfaces for a subagent.
|
||||
@@ -290,7 +291,11 @@ export class SubAgentScope {
|
||||
);
|
||||
|
||||
if (hasWildcard || asStrings.length === 0) {
|
||||
toolsList.push(...toolRegistry.getFunctionDeclarations());
|
||||
toolsList.push(
|
||||
...toolRegistry
|
||||
.getFunctionDeclarations()
|
||||
.filter((t) => t.name !== TaskTool.Name),
|
||||
);
|
||||
} else {
|
||||
toolsList.push(
|
||||
...toolRegistry.getFunctionDeclarationsFiltered(asStrings),
|
||||
@@ -299,7 +304,11 @@ export class SubAgentScope {
|
||||
toolsList.push(...onlyInlineDecls);
|
||||
} else {
|
||||
// Inherit all available tools by default when not specified.
|
||||
toolsList.push(...toolRegistry.getFunctionDeclarations());
|
||||
toolsList.push(
|
||||
...toolRegistry
|
||||
.getFunctionDeclarations()
|
||||
.filter((t) => t.name !== TaskTool.Name),
|
||||
);
|
||||
}
|
||||
|
||||
const initialTaskText = String(
|
||||
|
||||
Reference in New Issue
Block a user