INNER CODE UNIT · Python

_request_workspace_diff

ApodexAI/FrontierAgent · apodex/tui/app.py:740

    def _request_workspace_diff(self) -> None:
        """Refresh journal-backed diff data without blocking the UI thread."""
        if self._workspace_diff_pending:
            return
        journal = getattr(self.session, "journal", None)
        if journal is None:
            self._store_workspace_diff([], "")
            return
        self._workspace_diff_pending = True
        self._read_workspace_diff(journal)

    @work(exclusive=True, group="workspace-diff", thread=True)
    def _read_workspace_diff(self, journal: Any) -> None:
        stats: list[tuple[str, int, int]] = []
        diff_text = ""
        failure = ""
        try:
            # One pass: the header counts and the hunks they describe have to

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…