refactor: 移除未使用的导入和优化代码风格

本次提交主要包含以下代码重构和风格优化:
- 从多个文件中移除了未被使用的导入,例如 `Dict`, `Any`, `List`, `os`, `threading` 等,以保持代码的整洁性。
- 统一了测试脚本中的输出格式,移除了不必要的 f-string,使代码更加简洁。
- 清理了部分冗余的类型提示,提升了代码的可读性。
This commit is contained in:
minecraft1024a
2025-08-22 14:19:21 +08:00
committed by Windpicker-owo
parent 0a9d0f5405
commit 283c69e89b
6 changed files with 6 additions and 10 deletions

View File

@@ -10,7 +10,7 @@
import asyncio
import time
from typing import List, Dict, Any
from typing import List
class MockMessage:
@@ -129,7 +129,7 @@ async def test_message_driven_logic():
)
# 统计结果
print(f"\n=== 测试结果 ===")
print("\n=== 测试结果 ===")
print(f"思考循环次数: {chat_loop.thinking_cycles}")
print(f"状态检查次数: {chat_loop.status_checks}")
print(f"思考/检查比例: {chat_loop.thinking_cycles}/{chat_loop.status_checks}")
@@ -163,7 +163,7 @@ async def test_no_message_scenario():
if not has_new_messages:
await asyncio.sleep(1.0)
print(f"无消息运行结果:")
print("无消息运行结果:")
print(f" 思考循环: {chat_loop.thinking_cycles}")
print(f" 状态检查: {chat_loop.status_checks}")