Codex and Claude Opus 4.7
0d01dabb69
P2 §5.3: 23 处 importlib.import_module → 静态 from import
...
把剩余 5 个文件里所有动态导入 douyin_screenshot_manager 的 importlib 调用
替换为顶部静态 from import 模式:
- douyin/detection/douyin_pixel.py 7 处
- douyin/detection/douyin_detection.py 8 处
- douyin/fudai/douyin_fudai_finder.py 4 处
- douyin/fudai/core/fudai_attend.py 2 处
- gui/gui_app.py 2 处
douyin_screenshot_manager 只引用 douyin.core.path_config,与上述 5 个文件
无循环依赖。bin/run_cli.py 的剩余 1 处 importlib 是有意为之
(绕过 package __init__ 遮蔽),保留。
收益:
- 可读性 + IDE 跳转/类型提示
- 每次调用省去 ~100µs 的 import_module 开销(detection 模块在热路径上调用密集)
- 死代码减少 ~92 行(5 个文件合计 -115 / +23)
回归:140 .py 编译通过;importlib 残留只剩 bin/run_cli 故意 1 处;
5 个模块导入 + fudai_analyse + should_skip_fudai_by_config 业务链路正常;
test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 12:06:23 +08:00
Codex and Claude Opus 4.7
d5c9936c88
gui_app + base_interface: 内部错误 print → logger
...
gui/gui_app.py(8 处 sys.stderr print → _LOGGER):
- 配置读取失败、日志文件权限/写入错误(warning/error 级)
- pump_logs 内日志插入失败、循环异常、调度下次更新失败(error/warning 级)
- 顶部 import logging + 模块级 _LOGGER
douyin/core/fudai_modules/base_interface.py(2 处 print → _LOGGER):
- BaseFudaiMixin._safe_log 在主类无 _enhanced_log_kv 时的兜底改为 logger.info
- 顶部 import logging + 模块级 _LOGGER
保留为 stdout 的合理场景:
- bin/run_cli.py 的 [TEST]/[YANGHAO-ONLY] CLI 输出
- bin/manage_logs.py 的 CLI 工具输出
- gui/webgui_launcher.py: GUI 同时把 log 输出到控制台
- douyin/logging/internal_loggers.py: logger 模块自身的初始化失败兜底
- douyin/logging/douyin_logging{,_wrapper}.py: 日志系统内部的格式化输出
回归:140 .py 编译通过;test_filter_logging / check_web_gui_config_sync 通过;
gui.gui_app/web_gui/gui_core/base_interface 全部可加载,_LOGGER 名称正确。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 11:43:44 +08:00
Codex and Claude Opus 4.5
ba4c131b2d
refactor: 简化 gui_app.format_gui_log_line 为薄包装
...
原本 64 行的 fallback 实现实际上是死代码——
gui.components.log_viewer.format_gui_log_line 一直存在,
import 失败几乎不可能发生。
简化为薄包装函数,import 失败时返回原字符串。
文件行数:5857 -> 5804(减 53 行)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 09:42:27 +08:00
Codex and Claude Opus 4.5
8fe7ff0585
refactor: 根目录核心模块迁移到 douyin/core/ 和 douyin/logging/
...
将 4 个根目录核心模块迁移到合理位置:
- path_config.py -> douyin/core/path_config.py
- version.py -> douyin/core/version.py
- Underlying_Operations.py -> douyin/core/underlying_operations.py
- unified_logger.py -> douyin/logging/unified_logger.py
配套更新所有 import:
- path_config: 41 处 import 改为 douyin.core.path_config
- version: 4 处改为 douyin.core.version
- unified_logger: 5 处改为 douyin.logging.unified_logger
- Underlying_Operations: 14 处改为 douyin.core.underlying_operations
修复 path_config.PROJECT_ROOT 计算(向上 2 级而非当前目录)。
验证:python -m compileall 全项目通过。
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-05-21 00:23:14 +08:00
Codex
caa24ea8ca
保持Web端和桌面端参数同步
2026-05-20 20:32:23 +08:00
Your Name
6933c0b4fe
优化:调整参与按钮区域坐标,修正按钮覆盖范围
2026-01-25 20:50:16 +08:00
Your Name
272dcab91d
优化:调整参与按钮区域坐标,增强对部分机型底部按钮的覆盖;更新调试截图逻辑以使用新坐标
2026-01-25 16:58:15 +08:00
Your Name
4903e50ff2
优化:调整代码格式,增强可读性
2026-01-23 15:29:09 +08:00
Your Name
c79c50ffe4
优化:添加购物红包背景红色占比阈值配置,增强红包弹窗检测功能
2026-01-18 14:38:38 +08:00
Your Name
96c5cd50ec
优化:调整_mapping_tree_columns函数的格式,提升代码可读性
2026-01-18 13:42:20 +08:00
Your Name
eb23d2d8e6
GUI: 自动调整映射表列宽以适配内容
2026-01-17 22:00:14 +08:00
Your Name
272f3ddae0
GUI: 修复映射表容器,避免列挤压并修复滚动条问题
2026-01-17 21:40:20 +08:00
Your Name
3ce0aa73dd
feat: 优化当前直播间标题获取逻辑,提升匹配准确性
2026-01-17 19:34:57 +08:00
Your Name
3488624b8f
feat: 优化预约逻辑,增强映射表记录功能,提升用户体验
2026-01-17 18:46:13 +08:00
Your Name
db75248b98
feat: 优化滑动重置回退延迟,从2秒减少到0.1秒;完善预约系统二次回退机制
2026-01-16 21:54:09 +08:00
Your Name
54f9b39d2e
feat: 优化滑动重置和返回键回退逻辑,完善预约系统二次回退机制
2026-01-16 21:53:05 +08:00
Your Name
ca77862a86
feat: 添加滑动坐标配置功能,优化滑动操作的灵活性
2026-01-16 19:18:37 +08:00
Your Name
7c839c5d39
feat: 优化直播间标题识别逻辑,增强缓存管理和错误处理
2026-01-16 16:15:40 +08:00
Your Name
3723c39a58
feat: 优化福袋详情记录逻辑,提升代码可读性
2026-01-16 03:44:53 +08:00
Your Name
df65adfe4e
feat: 更新配置文件以启用调试捕获,调整福袋相关坐标,优化预约处理逻辑,增强界面显示信息
2026-01-16 03:04:11 +08:00
Your Name
362b7c841c
fix: 修复代码格式问题,提升可读性
2026-01-16 02:31:34 +08:00
Your Name
0862a92dc5
feat: 优化 diagnose_stage_from_current_screen 函数的调用格式,提升代码可读性
2026-01-15 23:04:53 +08:00
Your Name
d2c5ca57e8
feat: 更新房间状态管理,优化直播间标题记录逻辑,移除过时的房间位置映射文件
2026-01-15 23:03:56 +08:00
Your Name
d1f675073f
feat: 更新房间位置映射表,修改标题为海宁齐总
2026-01-15 16:19:08 +08:00
Your Name
504410f7b9
feat: 优化映射表加载与导出功能,确保数据一致性与可视化更新
2026-01-15 16:18:10 +08:00
Your Name
2358682216
feat: 添加持久化映射加载和状态文件序列化功能,优化 GUI 显示
2026-01-15 14:25:54 +08:00
Your Name
a84836a6c7
refactor: 优化代码格式,提升可读性
2026-01-15 01:12:20 +08:00
Your Name
df96e5fc83
feat: 添加确保输入框获得焦点的选项,优化文本粘贴功能
2026-01-15 01:10:54 +08:00
Your Name
54f3b35a26
Refactor code structure for improved readability and maintainability
2026-01-11 23:31:38 +08:00
Your Name
2f01200887
feat: 更新高价值房间数据,调整房间信息和时间戳;优化红包弹窗检测函数,增加返回详细信息参数
2026-01-09 16:35:23 +08:00
Your Name
0830c08fca
feat: 更新高价值房间数据,调整房间信息和检测耗时
2026-01-09 15:09:06 +08:00
Your Name
fb0c07c91a
Add shopping red packet detection tests and sample image
...
- Implemented a test script for shopping red packet detection using pixel analysis and OCR.
- Created a sample image to simulate a shopping red packet for testing purposes.
- Added functions to test pixel detection, coordinate definitions, and OCR keyword matching.
- Included detailed print statements for test results and summaries.
2026-01-08 20:37:49 +08:00
Your Name
b3011dd9ce
feat: Implement high-value room revisit feature and enhance fudai tracking
...
- Added tracking for previously seen fudai in Runner and ProcRunner classes to avoid duplicate recognition.
- Extracted room title during fudai recognition for better tracking.
- Updated high_value_rooms.json with new room entries and adjusted total count.
- Introduced new GUI elements for configuring icon coordinates in webui.
- Created comprehensive documentation for the high-value room revisit functionality.
- Added tests for delay settings and icon detection logic to ensure functionality.
- Implemented a tool for analyzing step times in logs to identify performance bottlenecks.
2026-01-08 14:27:38 +08:00
Your Name
5738d29bd6
feat: 添加预约回退功能完整测试脚本和错误场景测试脚本
2026-01-08 00:15:00 +08:00
Your Name
93d47a16d6
Refactor reservation preemption handling and logging
...
- Removed the reservation preempt minimum value from the Runner and GUI components.
- Updated logging mechanism to streamline log message handling and improve readability.
- Introduced a new method for appending log lines in the Runner class.
- Cleaned up related GUI elements and configuration options in web interface.
- Deleted obsolete simulation scripts related to reservation preemption checks.
2026-01-07 21:24:10 +08:00
Your Name
eb96d6869e
feat: 优化日志搜索功能,增强用户体验和性能
2026-01-07 19:31:26 +08:00
Your Name
c6b6745e3e
feat: 优化日志记录格式,增强循环次数和运行时间限制的可读性
2026-01-07 19:06:10 +08:00
Your Name
c6eb76845f
feat: 优化代码格式,提升可读性和一致性
2026-01-06 22:39:58 +08:00
Your Name
68295e564e
feat: 优化配置和日志提取逻辑,增强用户体验和数据准确性
2026-01-06 22:39:27 +08:00
Your Name
a962a164e4
feat: 优化日志监控配置代码格式,提升可读性
2026-01-06 17:06:40 +08:00
Your Name
2c9513ebd4
feat: 添加日志监控阈值配置选项,优化日志管理功能
2026-01-06 17:04:45 +08:00
Your Name
dcded08796
feat: enhance swipe and back navigation logic
...
- Adjusted configuration for reset after swipes to 10 seconds and added action to go back.
- Updated flow control to skip back action if a recent reset was triggered within 5 seconds.
- Implemented a mechanism to enable back navigation when consecutive misses reach a threshold.
- Added GUI options to enable or disable back navigation on misses, ensuring consistency with user settings.
- Introduced new diagnostic tools for runtime flag checks and screenshot diagnostics.
- Created PowerShell scripts for restoring Start Menu shortcuts and performing system health checks.
- Added tests for swipe operations and back navigation to validate new logic.
2026-01-06 16:55:00 +08:00
Your Name
0c3a763d63
feat: 调整连续无福袋退出阈值和启用返回键回退配置,优化界面布局
2026-01-05 23:27:00 +08:00
Your Name
5e94990275
feat: 添加启用返回键回退的配置选项,优化无福袋处理逻辑
2026-01-05 22:57:01 +08:00
Your Name
551951dc01
feat: 优化设备刷新和实时查看按钮的创建方式,提高代码可读性
2026-01-05 22:37:17 +08:00
Your Name
43e39f4db6
feat: 添加工具以查找重复的异常处理,增强代码质量检查;新增验证 GUI 回退方式的自检脚本
2026-01-05 21:32:50 +08:00
Your Name
8838b62e61
feat: 调整高价值福袋预约参数,增加提前参与时间和提高最低奖品价值
2026-01-04 15:07:49 +08:00
Your Name
0b50017c25
feat: 优化函数调用安全性,确保实时查看功能的稳定性
2026-01-04 10:15:31 +08:00
Your Name
b215e79a26
feat: 优化实时查看功能的实现,确保函数调用安全性
2026-01-04 10:12:28 +08:00
Your Name
f7da7b78aa
feat: 更新预约状态管理逻辑,优化首次运行时的队列恢复机制
2026-01-04 09:51:11 +08:00