Changeset 0.13.1 (#65)

This commit is contained in:
2026-02-25 23:56:27 +00:00
parent 8292a6efa8
commit 113b98ace4
24 changed files with 1565 additions and 24 deletions

View File

@@ -36,6 +36,22 @@ func AllDefinitions() []ToolDef {
return defs
}
// AllDefinitionsFiltered returns tool definitions excluding any names in the
// disabled set. Used when the frontend sends a disabled_tools list.
func AllDefinitionsFiltered(disabled map[string]bool) []ToolDef {
if len(disabled) == 0 {
return AllDefinitions()
}
defs := make([]ToolDef, 0, len(registry))
for _, t := range registry {
def := t.Definition()
if !disabled[def.Name] {
defs = append(defs, def)
}
}
return defs
}
// ── Execution ───────────────────────────────
// ExecuteCall runs a single tool call and returns a ToolResult.