Skip to content

Commit b7fdb11

Browse files
authored
Update input.py
1 parent 8acb51a commit b7fdb11

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎python_agent_harness/tui/input.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _safe_patch_stdout():
4646

4747

4848
if TYPE_CHECKING:
49-
from ..session import Session
49+
from ..controller import Controller
5050

5151
SLASH_COMMANDS = [
5252
"/plan",
@@ -311,12 +311,12 @@ def _resolve_numbered_choice(answer: str, options: list[str]) -> str:
311311
class InputMixin:
312312
"""Input handling methods for the TUI.
313313
314-
Expects the host class to provide: ``session``, ``console``,
314+
Expects the host class to provide: ``_controller``, ``console``,
315315
``question``, ``prompt_session``, ``_data_event``.
316316
"""
317317

318318
if TYPE_CHECKING:
319-
session: Session
319+
_controller: Controller
320320
console: Console
321321
question: UiQuestion | None
322322
prompt_session: PromptSession
@@ -333,9 +333,9 @@ def _input_prompt(self) -> FormattedText:
333333
e.g. ``deepseek-ai/deepseek-flash-v4`` → ``deepseek-flash-v4``)
334334
so the active model stays visible while typing.
335335
"""
336-
model = self.session.model or ""
336+
model = self._controller.model or ""
337337
short = model.rsplit("/", 1)[-1] if "/" in model else model
338-
title = getattr(self.session.store, "title", None)
338+
title = getattr(self._controller.store, "title", None)
339339
if title:
340340
title = title.strip()
341341
if len(title) > 20:
@@ -425,7 +425,7 @@ def _ask_sync(self, q: UiQuestion) -> str:
425425
question is answered. A cancelled run returns an empty answer.
426426
"""
427427
self.question = q
428-
cancel = getattr(self.session, "cancel_event", None)
428+
cancel = self._controller.cancel_event
429429
while not q.event.wait(0.1):
430430
if cancel is not None and cancel.is_set():
431431
return ""

0 commit comments

Comments
 (0)