From ca6c2e4d20e26cf982f1cdf9abda57d57627cf51 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 23 May 2026 08:37:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(gui):=20=E6=81=A2=E5=A4=8D=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E6=97=A5=E5=BF=97=20Tab=20=E6=90=9C=E7=B4=A2=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d759921 抽 _open_realtime_viewer_impl 时误删了紧随其后的 16 行 "搜索工具栏"块(log_search_frame / log_filter_var / log_search_var / log_search_entry),导致 gui_app 启动时在 L3964 报 NameError: name 'log_search_entry' is not defined。 恢复这 16 行到原位置,gui_app 可正常启动。 Co-Authored-By: Claude Opus 4.7 (1M context) --- gui/gui_app.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gui/gui_app.py b/gui/gui_app.py index 429a003..271f835 100644 --- a/gui/gui_app.py +++ b/gui/gui_app.py @@ -3789,6 +3789,22 @@ def main(): from gui.components.realtime_viewer import open_realtime_viewer open_realtime_viewer(root) + # 搜索工具栏 + log_search_frame = ttk.Frame(log_box) + log_search_frame.pack(fill=X, padx=10, pady=(10, 5)) + + # 关键字筛选(与行为日志一致) + log_filter_var = tk.StringVar(value="") + ttk.Label(log_search_frame, text="筛选:").pack(side=LEFT) + ttk.Entry(log_search_frame, textvariable=log_filter_var, width=16).pack( + side=LEFT, padx=(0, 8) + ) + + log_search_var = tk.StringVar(value="") + log_search_entry = ttk.Entry( + log_search_frame, textvariable=log_search_var, width=20 + ) + def refresh_run_log(): """从内存中读取最近若干运行日志并在界面中刷新(行为上与行为日志一致)""" try: