mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
feat(agent): Introduce Foundational Subagent Architecture (#1805)
Co-authored-by: Colt McAnlis <colton@google.com>
This commit is contained in:
@@ -365,6 +365,22 @@ export class ToolRegistry {
|
||||
return declarations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a filtered list of tool schemas based on a list of tool names.
|
||||
* @param toolNames - An array of tool names to include.
|
||||
* @returns An array of FunctionDeclarations for the specified tools.
|
||||
*/
|
||||
getFunctionDeclarationsFiltered(toolNames: string[]): FunctionDeclaration[] {
|
||||
const declarations: FunctionDeclaration[] = [];
|
||||
for (const name of toolNames) {
|
||||
const tool = this.tools.get(name);
|
||||
if (tool) {
|
||||
declarations.push(tool.schema);
|
||||
}
|
||||
}
|
||||
return declarations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all registered and discovered tool instances.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user