refactor(runner): simplify command help text generation

This commit is contained in:
2026-06-21 19:04:40 +08:00
parent c856c9b6a6
commit 1ecff5fdf7
+1 -4
View File
@@ -183,10 +183,7 @@ class CliRunner:
def _format_commands_help(self) -> str:
"""格式化命令帮助文本."""
lines = ["可用命令:"]
for cmd in self.graphs:
lines.append(f" {cmd}")
return "\n".join(lines)
return "可用命令:\n" + " | ".join(self.graphs.keys())
# ------------------------------------------------------------------ #
# 执行