流程节点完善
This commit is contained in:
@@ -12,6 +12,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
from modules.interactive_test import run_interactive_test
|
||||
from modules.batch_runner import run_batch_test
|
||||
from modules.json_visualizer import run_json_visualization
|
||||
from modules.stage_debugger import run_stage_debug_single, run_stage_debug_batch
|
||||
|
||||
def clear_screen():
|
||||
os.system('cls' if os.name == 'nt' else 'clear')
|
||||
@@ -51,6 +52,34 @@ def run_legacy_module(module_name, args=None):
|
||||
|
||||
input("\n按回车键返回菜单...")
|
||||
|
||||
def _run_stage_debug_menu():
|
||||
"""Stage 分阶段调试子菜单"""
|
||||
while True:
|
||||
print_header()
|
||||
print("Stage 分阶段调试")
|
||||
print("-" * 60)
|
||||
print("1. 单条指令调试 - 输入指令,选择 Stage,查看该 Stage 输出")
|
||||
print("2. 批量指令调试 - 从文件读取指令,批量运行到选定 Stage")
|
||||
print("0. 返回主菜单")
|
||||
print("-" * 60)
|
||||
sub = input("请选择 [0-2]: ").strip()
|
||||
if sub == "1":
|
||||
try:
|
||||
run_stage_debug_single()
|
||||
except Exception as e:
|
||||
print(f"❌ 运行出错: {e}")
|
||||
input("\n按回车键返回...")
|
||||
elif sub == "2":
|
||||
try:
|
||||
run_stage_debug_batch()
|
||||
except Exception as e:
|
||||
print(f"❌ 运行出错: {e}")
|
||||
input("\n按回车键返回...")
|
||||
elif sub == "0":
|
||||
break
|
||||
else:
|
||||
print("❌ 无效选项")
|
||||
|
||||
def menu_drone_upload():
|
||||
print("\n[3] 上传任务到无人机")
|
||||
print("说明: 将生成的任务文件上传到无人机 (Ground Station Client)。")
|
||||
@@ -84,10 +113,12 @@ def main():
|
||||
print("3. 上传任务到无人机 (Drone Uploader)")
|
||||
print("4. LLM 服务连通性测试 (LLM Tester)")
|
||||
print("5. JSON 文件可视化 (Visualize JSON File)")
|
||||
print("6. Stage 分阶段调试 (Stage Debug)")
|
||||
print(" - 单条/批量运行到指定 Stage,查看中间输出")
|
||||
print("0. 退出")
|
||||
print("-" * 60)
|
||||
|
||||
choice = input("请输入选项 [0-5]: ").strip()
|
||||
choice = input("请输入选项 [0-6]: ").strip()
|
||||
|
||||
if choice == '1':
|
||||
try:
|
||||
@@ -111,7 +142,10 @@ def main():
|
||||
|
||||
elif choice == '5':
|
||||
run_json_visualization()
|
||||
|
||||
|
||||
elif choice == '6':
|
||||
_run_stage_debug_menu()
|
||||
|
||||
elif choice == '0':
|
||||
print("\n👋 再见!")
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user