chore: move cancel command to menu footer
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user