mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-13 04:04:44 +00:00
feat(skill): add per-agent filtering to skill tool description (#6000)
This commit is contained in:
committed by
GitHub
parent
44fd0eee64
commit
3a54ab68d1
@@ -115,7 +115,7 @@ export namespace ToolRegistry {
|
||||
return all().then((x) => x.map((t) => t.id))
|
||||
}
|
||||
|
||||
export async function tools(providerID: string) {
|
||||
export async function tools(providerID: string, agent?: Agent.Info) {
|
||||
const tools = await all()
|
||||
const result = await Promise.all(
|
||||
tools
|
||||
@@ -130,7 +130,7 @@ export namespace ToolRegistry {
|
||||
using _ = log.time(t.id)
|
||||
return {
|
||||
id: t.id,
|
||||
...(await t.init()),
|
||||
...(await t.init({ agent })),
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user