WX-Game1/final_review_gate.py

53 lines
1.7 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
交互式审查门控脚本
用于RIPER-5协议中的条件性交互式步骤审查
"""
import sys
import os
def main():
print("=== 交互式审查门控已启动 ===")
print("当前审查项目WebRequestManager图片下载功能实现和FriendItemComponent重构")
print("")
print("可用操作:")
print("1. 输入具体的修改建议或问题")
print("2. 输入 'TASK_COMPLETE''完成''下一步' 来结束审查")
print("3. 输入 'QUIT''退出' 来终止脚本")
print("")
while True:
try:
user_input = input("USER_REVIEW_SUB_PROMPT: ").strip()
if not user_input:
continue
# 检查结束关键字
end_keywords = ['TASK_COMPLETE', '完成', '下一步', 'QUIT', '退出']
if user_input.upper() in [kw.upper() for kw in end_keywords]:
if user_input.upper() in ['QUIT', '退出']:
print("审查门控已终止")
sys.exit(1)
else:
print("审查门控正常结束")
sys.exit(0)
# 输出用户输入供AI处理
print(f"收到用户输入: {user_input}")
except KeyboardInterrupt:
print("\n审查门控被用户中断")
sys.exit(1)
except EOFError:
print("\n审查门控遇到EOF正常结束")
sys.exit(0)
except Exception as e:
print(f"审查门控发生错误: {e}")
sys.exit(1)
if __name__ == "__main__":
main()