From 26746335c4ab8d914fc8172dd5e303bd43362b36 Mon Sep 17 00:00:00 2001 From: Yuyao Huang Date: Wed, 1 Apr 2026 14:50:30 +0800 Subject: [PATCH] refactor(commands): rename status command to list and update related references feat(feishu): update card schema to 2.0 and simplify approval card structure docs(feishu): add documentation for card json schema 2.0 changes --- bot/commands.py | 36 +-- bot/feishu.py | 40 +-- docs/feishu/card_json_schema_2.md | 281 ++++++++++++++++++ .../card_json_schema_2_breaking_changes.md | 239 +++++++++++++++ orchestrator/agent.py | 4 +- tests/test_commands.py | 24 +- tests/test_sdk_migration.py | 20 +- 7 files changed, 585 insertions(+), 59 deletions(-) create mode 100644 docs/feishu/card_json_schema_2.md create mode 100644 docs/feishu/card_json_schema_2_breaking_changes.md diff --git a/bot/commands.py b/bot/commands.py index 378e7e6..e38357e 100644 --- a/bot/commands.py +++ b/bot/commands.py @@ -85,7 +85,7 @@ async def handle_command(user_id: str, text: str) -> Optional[str]: if cmd in (P+"new", P+"n"): return await _cmd_new(user_id, args) - elif cmd in (P+"status", P+"list", P+"ls", P+"l"): + elif cmd in (P+"list", P+"ls", P+"l", P+"status"): return await _cmd_status(user_id) elif cmd in (P+"close", P+"c"): return await _cmd_close(user_id, args) @@ -443,7 +443,7 @@ async def _cmd_nodes(user_id: str, args: str) -> str: """List nodes or switch active node.""" from config import ROUTER_MODE if not ROUTER_MODE: - return "Not in router mode. Run standalone.py for multi-host support." + return "Not in router mode." from router.nodes import get_node_registry registry = get_node_registry() @@ -476,29 +476,25 @@ def _cmd_help() -> str: """Show help.""" from config import COMMAND_PREFIX as P return f"""**Commands:** (prefix: `{P}`) -{P}new [msg] [--idle N] [--perm MODE] - Create session -{P}status - Show sessions and current mode -{P}close [n] - Close session (active or by number) -{P}switch - Switch to session by number -{P}perm [conv_id] - Set permission mode (default/edit/plan/bypass/auto) -{P}stop - Interrupt the current task -{P}progress - Show task progress -{P}direct - Direct mode: messages → Claude Code (no LLM overhead) +{P}new [msg] [--idle N] [--perm MODE] - Create session (alias: {P}n) +{P}list - Show sessions and current mode (alias: {P}ls, {P}l, {P}status) +{P}close [n] - Close session (active or by number) (alias: {P}c) +{P}switch - Switch to session by number (alias: {P}s) +{P}perm [conv_id] - Set permission mode (alias: {P}perm) +{P}stop - Interrupt the current task (alias: {P}interrupt) +{P}progress - Show task progress (alias: {P}p) +{P}direct - Direct mode: messages → Claude Code {P}smart - Smart mode: messages → LLM routing (default) -{P}shell - Run shell command (bypasses LLM) +{P}shell - Run shell command {P}remind