From 35f1c6b76b808915386bc8ba93828b403159211b Mon Sep 17 00:00:00 2001 From: Glucksberg Date: Sun, 25 Jan 2026 16:43:03 +0000 Subject: [PATCH] fix(tts): restore inline menu args removed by LINE plugin PR PR #1630 (LINE plugin) accidentally removed the detailed TTS command definition with args and argsMenu, replacing it with a simplified version. This restores the original functionality from PR #1559. Fixes regression where /tts no longer showed the inline action menu on Telegram and other native command surfaces. Co-Authored-By: Claude Opus 4.5 --- src/auto-reply/commands-registry.data.ts | 67 ++---------------------- 1 file changed, 5 insertions(+), 62 deletions(-) diff --git a/src/auto-reply/commands-registry.data.ts b/src/auto-reply/commands-registry.data.ts index e0a3198c0..35c00892c 100644 --- a/src/auto-reply/commands-registry.data.ts +++ b/src/auto-reply/commands-registry.data.ts @@ -2,11 +2,7 @@ import { listChannelDocks } from "../channels/dock.js"; import { getActivePluginRegistry } from "../plugins/runtime.js"; import { listThinkingLevels } from "./thinking.js"; import { COMMAND_ARG_FORMATTERS } from "./commands-args.js"; -import type { - ChatCommandDefinition, - CommandCategory, - CommandScope, -} from "./commands-registry.types.js"; +import type { ChatCommandDefinition, CommandScope } from "./commands-registry.types.js"; type DefineChatCommandInput = { key: string; @@ -20,7 +16,6 @@ type DefineChatCommandInput = { textAlias?: string; textAliases?: string[]; scope?: CommandScope; - category?: CommandCategory; }; function defineChatCommand(command: DefineChatCommandInput): ChatCommandDefinition { @@ -42,7 +37,6 @@ function defineChatCommand(command: DefineChatCommandInput): ChatCommandDefiniti argsMenu: command.argsMenu, textAliases: aliases, scope, - category: command.category, }; } @@ -54,7 +48,6 @@ function defineDockCommand(dock: ChannelDock): ChatCommandDefinition { nativeName: `dock_${dock.id}`, description: `Switch to ${dock.id} for replies.`, textAliases: [`/dock-${dock.id}`, `/dock_${dock.id}`], - category: "docks", }); } @@ -131,21 +124,18 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "help", description: "Show available commands.", textAlias: "/help", - category: "status", }), defineChatCommand({ key: "commands", nativeName: "commands", description: "List all slash commands.", textAlias: "/commands", - category: "status", }), defineChatCommand({ key: "skill", nativeName: "skill", description: "Run a skill by name.", textAlias: "/skill", - category: "tools", args: [ { name: "name", @@ -166,7 +156,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "status", description: "Show current status.", textAlias: "/status", - category: "status", }), defineChatCommand({ key: "allowlist", @@ -174,7 +163,6 @@ function buildChatCommands(): ChatCommandDefinition[] { textAlias: "/allowlist", acceptsArgs: true, scope: "text", - category: "management", }), defineChatCommand({ key: "approve", @@ -182,7 +170,6 @@ function buildChatCommands(): ChatCommandDefinition[] { description: "Approve or deny exec requests.", textAlias: "/approve", acceptsArgs: true, - category: "management", }), defineChatCommand({ key: "context", @@ -190,29 +177,18 @@ function buildChatCommands(): ChatCommandDefinition[] { description: "Explain how context is built and used.", textAlias: "/context", acceptsArgs: true, - category: "status", }), defineChatCommand({ key: "tts", nativeName: "tts", description: "Control text-to-speech (TTS).", textAlias: "/tts", - category: "media", args: [ { name: "action", - description: "TTS action", + description: "on | off | status | provider | limit | summary | audio | help", type: "string", - choices: [ - { value: "on", label: "On" }, - { value: "off", label: "Off" }, - { value: "status", label: "Status" }, - { value: "provider", label: "Provider" }, - { value: "limit", label: "Limit" }, - { value: "summary", label: "Summary" }, - { value: "audio", label: "Audio" }, - { value: "help", label: "Help" }, - ], + choices: ["on", "off", "status", "provider", "limit", "summary", "audio", "help"], }, { name: "value", @@ -221,33 +197,19 @@ function buildChatCommands(): ChatCommandDefinition[] { captureRemaining: true, }, ], - argsMenu: { - arg: "action", - title: - "TTS Actions:\n" + - "• On – Enable TTS for responses\n" + - "• Off – Disable TTS\n" + - "• Status – Show current settings\n" + - "• Provider – Set voice provider (edge, elevenlabs, openai)\n" + - "• Limit – Set max characters for TTS\n" + - "• Summary – Toggle AI summary for long texts\n" + - "• Audio – Generate TTS from custom text\n" + - "• Help – Show usage guide", - }, + argsMenu: "auto", }), defineChatCommand({ key: "whoami", nativeName: "whoami", description: "Show your sender id.", textAlias: "/whoami", - category: "status", }), defineChatCommand({ key: "subagents", nativeName: "subagents", description: "List/stop/log/info subagent runs for this session.", textAlias: "/subagents", - category: "management", args: [ { name: "action", @@ -274,7 +236,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "config", description: "Show or set config values.", textAlias: "/config", - category: "management", args: [ { name: "action", @@ -302,7 +263,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "debug", description: "Set runtime debug overrides.", textAlias: "/debug", - category: "management", args: [ { name: "action", @@ -330,7 +290,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "usage", description: "Usage footer or cost summary.", textAlias: "/usage", - category: "options", args: [ { name: "mode", @@ -346,21 +305,18 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "stop", description: "Stop the current run.", textAlias: "/stop", - category: "session", }), defineChatCommand({ key: "restart", nativeName: "restart", - description: "Restart Moltbot.", + description: "Restart Clawdbot.", textAlias: "/restart", - category: "tools", }), defineChatCommand({ key: "activation", nativeName: "activation", description: "Set group activation mode.", textAlias: "/activation", - category: "management", args: [ { name: "mode", @@ -376,7 +332,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "send", description: "Set send policy.", textAlias: "/send", - category: "management", args: [ { name: "mode", @@ -393,7 +348,6 @@ function buildChatCommands(): ChatCommandDefinition[] { description: "Reset the current session.", textAlias: "/reset", acceptsArgs: true, - category: "session", }), defineChatCommand({ key: "new", @@ -401,14 +355,12 @@ function buildChatCommands(): ChatCommandDefinition[] { description: "Start a new session.", textAlias: "/new", acceptsArgs: true, - category: "session", }), defineChatCommand({ key: "compact", description: "Compact the session context.", textAlias: "/compact", scope: "text", - category: "session", args: [ { name: "instructions", @@ -423,7 +375,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "think", description: "Set thinking level.", textAlias: "/think", - category: "options", args: [ { name: "level", @@ -439,7 +390,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "verbose", description: "Toggle verbose mode.", textAlias: "/verbose", - category: "options", args: [ { name: "mode", @@ -455,7 +405,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "reasoning", description: "Toggle reasoning visibility.", textAlias: "/reasoning", - category: "options", args: [ { name: "mode", @@ -471,7 +420,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "elevated", description: "Toggle elevated mode.", textAlias: "/elevated", - category: "options", args: [ { name: "mode", @@ -487,7 +435,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "exec", description: "Set exec defaults for this session.", textAlias: "/exec", - category: "options", args: [ { name: "options", @@ -502,7 +449,6 @@ function buildChatCommands(): ChatCommandDefinition[] { nativeName: "model", description: "Show or set the model.", textAlias: "/model", - category: "options", args: [ { name: "model", @@ -518,14 +464,12 @@ function buildChatCommands(): ChatCommandDefinition[] { textAlias: "/models", argsParsing: "none", acceptsArgs: true, - category: "options", }), defineChatCommand({ key: "queue", nativeName: "queue", description: "Adjust queue settings.", textAlias: "/queue", - category: "options", args: [ { name: "mode", @@ -558,7 +502,6 @@ function buildChatCommands(): ChatCommandDefinition[] { description: "Run host shell commands (host-only).", textAlias: "/bash", scope: "text", - category: "tools", args: [ { name: "command",