fix(gateway): add codex runtime telegram alias
This commit is contained in:
@@ -123,7 +123,8 @@ COMMAND_REGISTRY: list[CommandDef] = [
|
|||||||
CommandDef("model", "Switch model for this session", "Configuration",
|
CommandDef("model", "Switch model for this session", "Configuration",
|
||||||
aliases=("provider",), args_hint="[model] [--provider name] [--global]"),
|
aliases=("provider",), args_hint="[model] [--provider name] [--global]"),
|
||||||
CommandDef("codex-runtime", "Toggle codex app-server runtime for OpenAI/Codex models",
|
CommandDef("codex-runtime", "Toggle codex app-server runtime for OpenAI/Codex models",
|
||||||
"Configuration", args_hint="[auto|codex_app_server]"),
|
"Configuration", aliases=("codex_runtime",),
|
||||||
|
args_hint="[auto|codex_app_server]"),
|
||||||
CommandDef("gquota", "Show Google Gemini Code Assist quota usage", "Info",
|
CommandDef("gquota", "Show Google Gemini Code Assist quota usage", "Info",
|
||||||
cli_only=True),
|
cli_only=True),
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ class TestResolveCommand:
|
|||||||
assert resolve_command("gateway").name == "platforms"
|
assert resolve_command("gateway").name == "platforms"
|
||||||
assert resolve_command("set-home").name == "sethome"
|
assert resolve_command("set-home").name == "sethome"
|
||||||
assert resolve_command("reload_mcp").name == "reload-mcp"
|
assert resolve_command("reload_mcp").name == "reload-mcp"
|
||||||
|
assert resolve_command("codex_runtime").name == "codex-runtime"
|
||||||
assert resolve_command("tasks").name == "agents"
|
assert resolve_command("tasks").name == "agents"
|
||||||
|
|
||||||
def test_topic_is_gateway_command(self):
|
def test_topic_is_gateway_command(self):
|
||||||
@@ -251,6 +252,12 @@ class TestTelegramBotCommands:
|
|||||||
assert "queue" in names
|
assert "queue" in names
|
||||||
assert "steer" in names
|
assert "steer" in names
|
||||||
|
|
||||||
|
def test_hyphenated_codex_runtime_is_exposed_as_underscore_command(self):
|
||||||
|
"""Telegram autocomplete exposes /codex-runtime as /codex_runtime."""
|
||||||
|
names = {name for name, _ in telegram_bot_commands()}
|
||||||
|
assert "codex_runtime" in names
|
||||||
|
assert "codex-runtime" not in names
|
||||||
|
|
||||||
|
|
||||||
class TestSlackSubcommandMap:
|
class TestSlackSubcommandMap:
|
||||||
def test_returns_dict(self):
|
def test_returns_dict(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user