Skip to content

Commit 8b57d8b

Browse files
authored
Update render.py
1 parent b9a92b6 commit 8b57d8b

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

‎python_agent_harness/tui/render.py‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import math
1212
import re
1313
import time
14-
from typing import Any
14+
from typing import TYPE_CHECKING, Any
1515

1616
from rich.cells import cell_len
17-
from rich.console import Group
17+
from rich.console import Console, Group
1818
from rich.markdown import Markdown
1919
from rich.panel import Panel
2020
from rich.table import Table
@@ -24,6 +24,12 @@
2424
from ..diffrender import render_diff
2525
from ..prompts import _is_mode_reminder_text
2626

27+
if TYPE_CHECKING:
28+
import threading
29+
30+
from ..agent_session import AgentSession
31+
from .input import UiQuestion
32+
2733
SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
2834

2935
# message-body colors - distinct from tool colors (tool calls are magenta,
@@ -166,6 +172,23 @@ class RenderMixin:
166172
``_round_times``, ``_run_start``.
167173
"""
168174

175+
if TYPE_CHECKING:
176+
session: AgentSession
177+
console: Console
178+
stream_text: str
179+
lock: threading.Lock
180+
question: UiQuestion | None
181+
agent_running: bool
182+
status: str
183+
_current_tool: str
184+
round_start: int
185+
round_user_text: str
186+
_data_event: threading.Event
187+
_history_cache: list[Any] | None
188+
_history_dirty: bool
189+
_round_times: list[float]
190+
_run_start: float | None
191+
169192
# ------------------------------------------------------------------
170193
# rendering
171194
# ------------------------------------------------------------------

0 commit comments

Comments
 (0)