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)