feat: Implement 30-minute timeout protection and unify path configurations
- Introduced a 30-minute timeout mechanism to prevent the script from getting stuck in invalid states, with configurable timeout settings. - Unified path configurations across the project to enhance maintainability and avoid hardcoded paths. - Updated documentation and flowcharts to reflect the new timeout feature and improved path management. - Fixed issues with template and screenshot path configurations to ensure consistency across the project.
This commit is contained in:
1 parent
686dde5cc0
commit
26df350755
64 files changed
+7568
-414
No files matched your search
@@ -0,0 +1,45 @@
|
||||
"""行为日志查看组件
|
||||
|
||||
包含行为日志显示、搜索等功能的GUI组件。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable, Tuple
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
from tkinter.scrolledtext import ScrolledText
|
||||
|
||||
try:
|
||||
from ttkbootstrap.scrolled import ScrolledText as TBSrolledText
|
||||
ScrolledText = TBSrolledText
|
||||
except ImportError:
|
||||
from tkinter.scrolledtext import ScrolledText
|
||||
|
||||
|
||||
def create_actions_log_viewer(
|
||||
parent: Any
|
||||
):
|
||||
"""创建行为日志查看器组件。
|
||||
|
||||
参数:
|
||||
parent: 父容器
|
||||
|
||||
返回:
|
||||
(actions_log_text, refresh_actions_log_func)
|
||||
"""
|
||||
actions_log_text = ScrolledText(parent)
|
||||
actions_log_text.pack(fill="both", expand=True, padx=10, pady=10)
|
||||
|
||||
try:
|
||||
actions_log_text.configure(font=("Consolas", 10))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def refresh_actions_log() -> None:
|
||||
"""刷新行为日志。"""
|
||||
# TODO: 从原文件迁移函数实现
|
||||
pass
|
||||
|
||||
return actions_log_text, refresh_actions_log
|
||||
|
||||
Reference in new issue
Block a user