diff --git a/src/auto-reply/commands-registry.data.ts b/src/auto-reply/commands-registry.data.ts index d6b031d1b81..3cb2e4ff9f9 100644 --- a/src/auto-reply/commands-registry.data.ts +++ b/src/auto-reply/commands-registry.data.ts @@ -320,8 +320,7 @@ function buildChatCommands(): ChatCommandDefinition[] { args: [ { name: "action", - description: - "spawn | cancel | steer | close | sessions | status | set-mode | set | cwd | permissions | timeout | model | reset-options | doctor | install | help", + description: "Action to run", type: "string", choices: [ "spawn", diff --git a/src/auto-reply/commands-registry.test.ts b/src/auto-reply/commands-registry.test.ts index acf81b48dce..918310278c9 100644 --- a/src/auto-reply/commands-registry.test.ts +++ b/src/auto-reply/commands-registry.test.ts @@ -109,6 +109,23 @@ describe("commands registry", () => { expect(findCommandByNativeName("tts", "discord")).toBeUndefined(); }); + it("keeps discord native command specs within slash-command limits", () => { + const native = listNativeCommandSpecsForConfig( + { commands: { native: true } }, + { provider: "discord" }, + ); + for (const spec of native) { + expect(spec.name).toMatch(/^[a-z0-9_-]{1,32}$/); + expect(spec.description.length).toBeGreaterThan(0); + expect(spec.description.length).toBeLessThanOrEqual(100); + for (const arg of spec.args ?? []) { + expect(arg.name).toMatch(/^[a-z0-9_-]{1,32}$/); + expect(arg.description.length).toBeGreaterThan(0); + expect(arg.description.length).toBeLessThanOrEqual(100); + } + } + }); + it("keeps ACP native action choices aligned with implemented handlers", () => { const acp = listChatCommands().find((command) => command.key === "acp"); expect(acp).toBeTruthy();