feat(skill): add per-agent filtering to skill tool description (#6000)

This commit is contained in:
Mohammad Alhashemi
2025-12-23 04:14:33 +03:00
committed by GitHub
parent 44fd0eee64
commit 3a54ab68d1
6 changed files with 219 additions and 87 deletions

View File

@@ -583,7 +583,7 @@ export namespace SessionPrompt {
mergeDeep(await ToolRegistry.enabled(input.agent)),
mergeDeep(input.tools ?? {}),
)
for (const item of await ToolRegistry.tools(input.model.providerID)) {
for (const item of await ToolRegistry.tools(input.model.providerID, input.agent)) {
if (Wildcard.all(item.id, enabledTools) === false) continue
const schema = ProviderTransform.schema(input.model, z.toJSONSchema(item.parameters))
tools[item.id] = tool({