|
|
@@ -48,6 +48,8 @@ class AssistantTUI(App):
|
|
|
self._seen_lower = 0
|
|
|
self._seen_epoch = 0
|
|
|
self._timer = None
|
|
|
+ self._last_seg_title = ""
|
|
|
+ self._last_inf_title = ""
|
|
|
|
|
|
def compose(self) -> ComposeResult:
|
|
|
yield Static(id="status")
|
|
|
@@ -58,9 +60,20 @@ class AssistantTUI(App):
|
|
|
yield Footer()
|
|
|
|
|
|
def _set_titles(self) -> None:
|
|
|
- self.query_one("#transcript", RichLog).border_title = "transcripts"
|
|
|
self.query_one("#command", Static).border_title = "command buffer"
|
|
|
- self.query_one("#chat", RichLog).border_title = "conversation / command output"
|
|
|
+ self._update_titles(self.state)
|
|
|
+
|
|
|
+ def _update_titles(self, state) -> None:
|
|
|
+ seg_title = f"transcripts [seg {state.queue_depth}]"
|
|
|
+ if seg_title != self._last_seg_title:
|
|
|
+ self.query_one("#transcript", RichLog).border_title = seg_title
|
|
|
+ self._last_seg_title = seg_title
|
|
|
+
|
|
|
+ inf_suffix = " · busy" if state.inference_in_flight else ""
|
|
|
+ inf_title = f"conversation / command output [inf {state.inference_depth}{inf_suffix}]"
|
|
|
+ if inf_title != self._last_inf_title:
|
|
|
+ self.query_one("#chat", RichLog).border_title = inf_title
|
|
|
+ self._last_inf_title = inf_title
|
|
|
|
|
|
def on_mount(self) -> None:
|
|
|
self._set_titles()
|
|
|
@@ -101,9 +114,10 @@ class AssistantTUI(App):
|
|
|
f"[{state.mode_style()} bold]{state.mode}[/] "
|
|
|
f"stt:{health} conn:{conn} speech:{speaking} "
|
|
|
f"worker_stall:{state.worker_stall_s:.1f}s "
|
|
|
- f"backlog:{state.queue_depth} phase:{state.phase}"
|
|
|
+ f"phase:{state.phase}"
|
|
|
)
|
|
|
self.query_one("#status", Static).update(status)
|
|
|
+ self._update_titles(state)
|
|
|
|
|
|
edited = " (edited)" if state.command_edited else ""
|
|
|
self.query_one("#command", Static).update(
|