chore: move cancel command to menu footer

This commit is contained in:
banteg
2026-01-02 17:16:03 +04:00
parent 03658f3187
commit 7722ae8905
+4 -4
View File
@@ -81,16 +81,16 @@ def _strip_engine_command(
def _build_bot_commands(router: AutoRouter) -> list[dict[str, str]]: def _build_bot_commands(router: AutoRouter) -> list[dict[str, str]]:
commands: list[dict[str, str]] = [ commands: list[dict[str, str]] = []
{"command": "cancel", "description": "cancel run"} seen: set[str] = set()
]
seen = {"cancel"}
for engine in router.engine_ids: for engine in router.engine_ids:
cmd = engine.lower() cmd = engine.lower()
if cmd in seen: if cmd in seen:
continue continue
commands.append({"command": cmd, "description": f"start {cmd}"}) commands.append({"command": cmd, "description": f"start {cmd}"})
seen.add(cmd) seen.add(cmd)
if "cancel" not in seen:
commands.append({"command": "cancel", "description": "cancel run"})
return commands return commands