From fc60336c18b479ab374a2472993ee90e2f3ccb72 Mon Sep 17 00:00:00 2001 From: Shadow Date: Mon, 16 Feb 2026 14:17:41 -0600 Subject: [PATCH] Discord: add native exec options --- CHANGELOG.md | 1 + src/auto-reply/commands-args.ts | 22 ++++++++++++++++++++++ src/auto-reply/commands-registry.data.ts | 23 +++++++++++++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2539747ac8..fd5ed56e37e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Docs: https://docs.openclaw.ai ### Changes +- Discord: expose native `/exec` command options (host/security/ask/node) so Discord slash commands get autocomplete and structured inputs. Thanks @thewilloftheshadow. - Cron/Gateway: separate per-job webhook delivery (`delivery.mode = "webhook"`) from announce delivery, enforce valid HTTP(S) webhook URLs, and keep a temporary legacy `notify + cron.webhook` fallback for stored jobs. (#17901) Thanks @advaitpaliwal. - iOS/Talk: add a `Voice Directive Hint` toggle for Talk Mode prompts so users can disable ElevenLabs voice-switching instructions to save tokens when not needed. (#18250) Thanks @zeulewan. - iOS/Talk: add a `Background Listening` toggle that keeps Talk Mode active while the app is backgrounded (off by default for battery safety). Thanks @zeulewan. diff --git a/src/auto-reply/commands-args.ts b/src/auto-reply/commands-args.ts index cc1fa541189..6acd22a4cdb 100644 --- a/src/auto-reply/commands-args.ts +++ b/src/auto-reply/commands-args.ts @@ -90,8 +90,30 @@ const formatQueueArgs: CommandArgsFormatter = (values) => { return parts.length > 0 ? parts.join(" ") : undefined; }; +const formatExecArgs: CommandArgsFormatter = (values) => { + const host = normalizeArgValue(values.host); + const security = normalizeArgValue(values.security); + const ask = normalizeArgValue(values.ask); + const node = normalizeArgValue(values.node); + const parts: string[] = []; + if (host) { + parts.push(`host=${host}`); + } + if (security) { + parts.push(`security=${security}`); + } + if (ask) { + parts.push(`ask=${ask}`); + } + if (node) { + parts.push(`node=${node}`); + } + return parts.length > 0 ? parts.join(" ") : undefined; +}; + export const COMMAND_ARG_FORMATTERS: Record = { config: formatConfigArgs, debug: formatDebugArgs, queue: formatQueueArgs, + exec: formatExecArgs, }; diff --git a/src/auto-reply/commands-registry.data.ts b/src/auto-reply/commands-registry.data.ts index a799d1358ff..70b993f670a 100644 --- a/src/auto-reply/commands-registry.data.ts +++ b/src/auto-reply/commands-registry.data.ts @@ -529,12 +529,31 @@ function buildChatCommands(): ChatCommandDefinition[] { category: "options", args: [ { - name: "options", - description: "host=... security=... ask=... node=...", + name: "host", + description: "sandbox, gateway, or node", + type: "string", + choices: ["sandbox", "gateway", "node"], + }, + { + name: "security", + description: "deny, allowlist, or full", + type: "string", + choices: ["deny", "allowlist", "full"], + }, + { + name: "ask", + description: "off, on-miss, or always", + type: "string", + choices: ["off", "on-miss", "always"], + }, + { + name: "node", + description: "Node id or name", type: "string", }, ], argsParsing: "none", + formatArgs: COMMAND_ARG_FORMATTERS.exec, }), defineChatCommand({ key: "model",