fix: respect disabled_tools config in agent prompts (fixes #2742)
- Check disabled_tools for 'question' in tool-config-handler permission logic - Strip Question tool code examples from Prometheus prompts when disabled - Pass disabled_tools through prometheus agent config builder pipeline - Add tests for disabled_tools question permission handling
This commit is contained in:
@@ -44,7 +44,9 @@ export function applyToolConfig(params: {
|
||||
|
||||
const isCliRunMode = process.env.OPENCODE_CLI_RUN_MODE === "true";
|
||||
const configQuestionPermission = getConfigQuestionPermission();
|
||||
const isQuestionDisabledByPlugin = params.pluginConfig.disabled_tools?.includes("question") ?? false;
|
||||
const questionPermission =
|
||||
isQuestionDisabledByPlugin ? "deny" :
|
||||
configQuestionPermission === "deny" ? "deny" :
|
||||
isCliRunMode ? "deny" :
|
||||
"allow";
|
||||
|
||||
Reference in New Issue
Block a user