From 7722ae890585be5dbe7dbd577e031f639a9eda28 Mon Sep 17 00:00:00 2001 From: banteg <4562643+banteg@users.noreply.github.com> Date: Fri, 2 Jan 2026 17:16:03 +0400 Subject: [PATCH] chore: move cancel command to menu footer --- src/takopi/bridge.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/takopi/bridge.py b/src/takopi/bridge.py index 0e50699..8173822 100644 --- a/src/takopi/bridge.py +++ b/src/takopi/bridge.py @@ -81,16 +81,16 @@ def _strip_engine_command( def _build_bot_commands(router: AutoRouter) -> list[dict[str, str]]: - commands: list[dict[str, str]] = [ - {"command": "cancel", "description": "cancel run"} - ] - seen = {"cancel"} + commands: list[dict[str, str]] = [] + seen: set[str] = set() for engine in router.engine_ids: cmd = engine.lower() if cmd in seen: continue commands.append({"command": cmd, "description": f"start {cmd}"}) seen.add(cmd) + if "cancel" not in seen: + commands.append({"command": "cancel", "description": "cancel run"}) return commands