INNER CODE UNIT · Python

_budget_bar

VisionForge-OU/foreman · src/foreman/tui/app.py:230

    def _budget_bar(self, iid: str, w) -> str:
        return f"[b]{iid}[/b]  status={w.status}  cost=${w.cost:.4f}  turns={w.turns}\n" + ("─" * 40)

    def on_list_view_selected(self, event: ListView.Selected) -> None:
        if event.item is None:
            return
        self.selected = event.item.name
        self._update_log()

    def on_list_view_highlighted(self, event: ListView.Highlighted) -> None:
        # Arrow-key navigation moves the highlight — follow it in the log pane.
        if event.item is not None and event.item.name:
            self.selected = event.item.name
            self._update_log()

    def action_next_worker(self) -> None:
        lv = self.query_one("#wlist", ListView)
        n = len(lv.children)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…