fix(tools): gate generate_image behind setting and tool whitelist
generate_image was registered as a custom tool and force-activated via the alwaysInclude list in createAgentSession, so it survived --no-tools (empty toolNames) and any explicit whitelist that omitted it. There was also no generate_image.enabled setting, so /settings had no toggle. Add a generate_image.enabled setting and only register the tool when enabled and either no whitelist is given or it names generate_image. Fixes #5305
This commit is contained in:
@@ -3528,6 +3528,16 @@ export const SETTINGS_SCHEMA = {
|
||||
description: "Enable the tts tool for on-device (Kokoro) or xAI Grok Voice speech-file synthesis",
|
||||
},
|
||||
},
|
||||
"generate_image.enabled": {
|
||||
type: "boolean",
|
||||
default: true,
|
||||
ui: {
|
||||
tab: "tools",
|
||||
group: "Available Tools",
|
||||
label: "Generate Image",
|
||||
description: "Enable the generate_image tool for text-to-image generation and editing",
|
||||
},
|
||||
},
|
||||
|
||||
"inspect_image.enabled": {
|
||||
type: "boolean",
|
||||
|
||||
Reference in New Issue
Block a user