INNER CODE UNIT · Python
_refresh_status
ApodexAI/FrontierAgent · apodex/tui/app.py:714
def _refresh_status(self) -> None:
self.sink.tick()
self.transcript.refresh_process()
self._refresh_transcript_view()
self.activity.refresh_running()
self._refresh_sidebar_titles()
ctx = ""
if self.usage is not None and self._window:
status = getattr(self.usage, "context_status", None)
if callable(status):
ctx = str(status(self._window))
else:
pct = self.usage.context_pct_left(self._window)
if pct is not None:
ctx = f"{pct}% left"
self.status.show(
presentation=self.presentation, mode=self.session.mode,
ctx=ctx, tools=self._tools,