主函数
()
| 2502 | } |
| 2503 | |
| 2504 | handler = handlers.get(intent["intent"], lambda: self.handle_unknown(text)) |
| 2505 | result = handler() |
| 2506 | |
| 2507 | print(f"Result: {safe_console_text(result, 200)}") |
| 2508 | return result |
| 2509 | |
| 2510 | |
| 2511 | def main(): |
| 2512 | """主函数""" |
| 2513 | import argparse |
| 2514 | |
| 2515 | parser = argparse.ArgumentParser(description="Master Coordinator - 主协调器") |
| 2516 | parser.add_argument("--user-id", type=str, default="user_001", help="用户 ID") |
| 2517 | parser.add_argument("--message", type=str, required=True, help="用户消息") |
| 2518 | parser.add_argument("--feishu-user-id", type=str, help="飞书用户 ID") |
| 2519 | parser.add_argument("--no-feishu", action="store_true", help="不发送飞书") |
| 2520 | |
| 2521 | args = parser.parse_args() |
| 2522 | |
| 2523 | coordinator = MasterCoordinator( |
| 2524 | user_id=args.user_id, |
| 2525 | feishu_user_id=args.feishu_user_id, |
| 2526 | send_to_feishu=not args.no_feishu, |
no test coverage detected