This commit is contained in:
HuangHai
2026-01-26 09:29:40 +08:00
parent 711b5e091e
commit 16b4d30f91
3 changed files with 8 additions and 8 deletions

View File

@@ -23,14 +23,14 @@ logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler(os.path.join(log_dir, "T4_InputLlmText.log"), encoding='utf-8'),
logging.FileHandler(os.path.join(log_dir, "T3_InputLlmText.log"), encoding='utf-8'),
logging.StreamHandler()
]
)
logger = logging.getLogger("T4_InputLlmText")
logger = logging.getLogger("T3_InputLlmText")
async def generate_and_input():
logger.info("开始执行 T4: 生成 LLM 回复并输入...")
logger.info("开始执行 T3: 生成 LLM 回复并输入...")
# 0. 清除旧截图
clean_screenshots_dir()
@@ -126,12 +126,12 @@ async def generate_and_input():
success = perform_input_action(d, center_point, llm_text, auto_send=True)
if success:
logger.info("✅ T4 执行完成:文字已成功输入并点击发送。")
logger.info("✅ T3 执行完成:文字已成功输入并点击发送。")
else:
logger.error("❌ T4 执行失败:输入动作未成功完成。")
logger.error("❌ T3 执行失败:输入动作未成功完成。")
except Exception as e:
logger.error(f"❌ T4 执行出错: {e}", exc_info=True)
logger.error(f"❌ T3 执行出错: {e}", exc_info=True)
if __name__ == "__main__":
asyncio.run(generate_and_input())

View File

@@ -26,8 +26,8 @@ def run_cv_debug():
if not os.path.exists(screenshot_dir):
os.makedirs(screenshot_dir)
image_path = os.path.join(screenshot_dir, "t6_live_shot.jpg")
output_path = os.path.join(screenshot_dir, "T6_debug_view.jpg")
image_path = os.path.join(screenshot_dir, "t4_live_shot.jpg")
output_path = os.path.join(screenshot_dir, "T4_debug_view.jpg")
d.screenshot(image_path)
print(f"✅ 截图已保存: {image_path}")