ui: fall back to global defaults when agentic flow has no tool policy

Passing empty disabled sets bypassed the global defaults and could
enable tools for callers that do not pass a policy yet.

Assisted-by: pi
This commit is contained in:
Aleksander Grygier
2026-08-26 20:34:06 +02:00
committed by GitHub
parent 38c4721fbd
commit 40d590623e
@@ -334,9 +334,10 @@ class AgenticStore {
}
}
// callers without an explicit policy fall back to the global defaults
const tools = toolsStore.getEnabledToolsForLLM(
new Set(toolPolicy?.disabledTools ?? []),
new Set(toolPolicy?.disabledToolCategories ?? [])
new Set(toolPolicy?.disabledTools ?? toolsStore.disabledTools),
new Set(toolPolicy?.disabledToolCategories ?? toolsStore.disabledToolCategories)
);
if (tools.length === 0) {