feat: register remaining commands with platform menus
Telegram: add /insights, /update, /reload_mcp (underscore variant since Telegram BotCommand names don't allow hyphens). Discord: add /insights (with days parameter), /reload-mcp. Also add reload_mcp as an alias for reload-mcp in the gateway command dispatcher so Telegram's underscore form works, and add resume/provider to the _known_commands set for hook emission.
This commit is contained in:
@@ -710,8 +710,8 @@ class GatewayRunner:
|
||||
# Emit command:* hook for any recognized slash command
|
||||
_known_commands = {"new", "reset", "help", "status", "stop", "model",
|
||||
"personality", "retry", "undo", "sethome", "set-home",
|
||||
"compress", "usage", "insights", "reload-mcp", "update",
|
||||
"title"}
|
||||
"compress", "usage", "insights", "reload-mcp", "reload_mcp",
|
||||
"update", "title", "resume", "provider"}
|
||||
if command and command in _known_commands:
|
||||
await self.hooks.emit(f"command:{command}", {
|
||||
"platform": source.platform.value if source.platform else "",
|
||||
@@ -759,7 +759,7 @@ class GatewayRunner:
|
||||
if command == "insights":
|
||||
return await self._handle_insights_command(event)
|
||||
|
||||
if command == "reload-mcp":
|
||||
if command in ("reload-mcp", "reload_mcp"):
|
||||
return await self._handle_reload_mcp_command(event)
|
||||
|
||||
if command == "update":
|
||||
|
||||
Reference in New Issue
Block a user