'commit'
This commit is contained in:
@@ -23,14 +23,14 @@ logging.basicConfig(
|
|||||||
level=logging.INFO,
|
level=logging.INFO,
|
||||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||||
handlers=[
|
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()
|
logging.StreamHandler()
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
logger = logging.getLogger("T4_InputLlmText")
|
logger = logging.getLogger("T3_InputLlmText")
|
||||||
|
|
||||||
async def generate_and_input():
|
async def generate_and_input():
|
||||||
logger.info("开始执行 T4: 生成 LLM 回复并输入...")
|
logger.info("开始执行 T3: 生成 LLM 回复并输入...")
|
||||||
|
|
||||||
# 0. 清除旧截图
|
# 0. 清除旧截图
|
||||||
clean_screenshots_dir()
|
clean_screenshots_dir()
|
||||||
@@ -126,12 +126,12 @@ async def generate_and_input():
|
|||||||
success = perform_input_action(d, center_point, llm_text, auto_send=True)
|
success = perform_input_action(d, center_point, llm_text, auto_send=True)
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
logger.info("✅ T4 执行完成:文字已成功输入并点击发送。")
|
logger.info("✅ T3 执行完成:文字已成功输入并点击发送。")
|
||||||
else:
|
else:
|
||||||
logger.error("❌ T4 执行失败:输入动作未成功完成。")
|
logger.error("❌ T3 执行失败:输入动作未成功完成。")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"❌ T4 执行出错: {e}", exc_info=True)
|
logger.error(f"❌ T3 执行出错: {e}", exc_info=True)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
asyncio.run(generate_and_input())
|
asyncio.run(generate_and_input())
|
||||||
@@ -26,8 +26,8 @@ def run_cv_debug():
|
|||||||
if not os.path.exists(screenshot_dir):
|
if not os.path.exists(screenshot_dir):
|
||||||
os.makedirs(screenshot_dir)
|
os.makedirs(screenshot_dir)
|
||||||
|
|
||||||
image_path = os.path.join(screenshot_dir, "t6_live_shot.jpg")
|
image_path = os.path.join(screenshot_dir, "t4_live_shot.jpg")
|
||||||
output_path = os.path.join(screenshot_dir, "T6_debug_view.jpg")
|
output_path = os.path.join(screenshot_dir, "T4_debug_view.jpg")
|
||||||
|
|
||||||
d.screenshot(image_path)
|
d.screenshot(image_path)
|
||||||
print(f"✅ 截图已保存: {image_path}")
|
print(f"✅ 截图已保存: {image_path}")
|
||||||
Reference in New Issue
Block a user