INNER CODE UNIT · Python

_should_show_llm_degraded

pikpikcu/airecon · airecon/tui/app.py:358

    def _should_show_llm_degraded(self, llm_ok: bool) -> bool:
        return bool(
            llm_ok and self._processing and self._is_llm_degraded_active()
        )

    def _mark_llm_degraded(self, reason: str = "") -> None:
        if not self._processing:
            return
        self._llm_degraded_until = max(
            self._llm_degraded_until,
            time.monotonic() + self._LLM_DEGRADED_SECONDS,
        )
        if reason:
            logger.warning(
                "Marking LLM status degraded due to recovery event: %s", reason
            )
        try:
            self.query_one("#status-bar", StatusBar).set_status(llm_degraded=True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…