From 59a1e236df0e1637fb327f38ad0707b88f10c640 Mon Sep 17 00:00:00 2001 From: Kailigithub Date: Fri, 29 May 2026 11:16:40 +0800 Subject: [PATCH] fix(tui_v3): remove unused imports and fix duplicate dataclass import - Remove `select` and `signal` from the multi-import line (not used in tui_v3.py) - Remove duplicate `from dataclasses import dataclass` (already covered by the field import) - Remove unused `functools.lru_cache` and `typing.Callable` imports - Fix double blank line formatting --- frontends/tui_v3.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontends/tui_v3.py b/frontends/tui_v3.py index 84a05822..3820df39 100644 --- a/frontends/tui_v3.py +++ b/frontends/tui_v3.py @@ -6,12 +6,11 @@ """ from __future__ import annotations -import asyncio, atexit, json, locale, logging, os, queue, random, re, select, shutil, signal, subprocess +import asyncio, atexit, json, locale, logging, os, queue, random, re, shutil, subprocess import sys, tempfile, threading, time _IS_WINDOWS = os.name == 'nt' - # Make `frontends/` parent (project root) importable so `from agentmain import …` # works whether this file is run as `python -m frontends.tui_v3` or directly # via `python frontends/tui_v3.py`. @@ -22,16 +21,14 @@ sys.path.insert(0, _p) from agentmain import GeneraticAgent -from dataclasses import dataclass from dataclasses import dataclass, field -from functools import lru_cache + from io import StringIO from rich.cells import cell_len from rich.console import Console from rich.markdown import Markdown from rich.text import Text from rich.theme import Theme -from typing import Callable # ════════════════════════════════════════════════════════════════════════════ # i18n — minimal dict-based zh/en translation layer (inlined; was tui_v3_i18n.py)