diff --git a/extensions/mattermost/src/mattermost/slash-commands.test.ts b/extensions/mattermost/src/mattermost/slash-commands.test.ts index 123d79846a5e..182fce74dc48 100644 --- a/extensions/mattermost/src/mattermost/slash-commands.test.ts +++ b/extensions/mattermost/src/mattermost/slash-commands.test.ts @@ -108,6 +108,15 @@ describe("slash-commands", () => { ).toEqual(["oc_model", "oc_models"]); }); + it("registers the queue command mapped to the core /queue directive", () => { + const queueSpec = DEFAULT_COMMAND_SPECS.find((spec) => spec.trigger === "oc_queue"); + expect(queueSpec?.originalName).toBe("queue"); + const triggerMap = new Map([["oc_queue", "queue"]]); + expect(resolveCommandText("oc_queue", " collect drop:summarize ", triggerMap)).toBe( + "/queue collect drop:summarize", + ); + }); + it("normalizes callback path in slash config", () => { const config = resolveSlashCommandConfig({ callbackPath: "api/channels/mattermost/command" }); expect(config.callbackPath).toBe("/api/channels/mattermost/command"); diff --git a/extensions/mattermost/src/mattermost/slash-commands.ts b/extensions/mattermost/src/mattermost/slash-commands.ts index 89a10d51f920..9536c4f1b2ea 100644 --- a/extensions/mattermost/src/mattermost/slash-commands.ts +++ b/extensions/mattermost/src/mattermost/slash-commands.ts @@ -172,6 +172,13 @@ export const DEFAULT_COMMAND_SPECS: MattermostCommandSpec[] = [ autoComplete: true, autoCompleteHint: "[on|off]", }, + { + trigger: "oc_queue", + originalName: "queue", + description: "Adjust active-run queue behavior", + autoComplete: true, + autoCompleteHint: "[steer|followup|collect|interrupt] [debounce:2s] [cap:N] [drop:old|new|summarize]", + }, ]; // ─── Command registration ────────────────────────────────────────────────────