diff options
| -rw-r--r-- | llamachat/ui.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llamachat/ui.py b/llamachat/ui.py index 17e36b1..3b7fe84 100644 --- a/llamachat/ui.py +++ b/llamachat/ui.py @@ -918,6 +918,7 @@ class ChatWindow(QMainWindow): previous = self.model_box.currentText() available, listing_problems, modalities = self.client.models() self.modalities = modalities + self._update_record_button() if not available: self.show_status( "; ".join(listing_problems) or "No models available", error=True @@ -947,7 +948,6 @@ class ChatWindow(QMainWindow): else: self.hide_status() self.update_cost() - self._update_record_button() def current_model(self) -> str: return self.model_box.currentData() or self.model_box.currentText() @@ -1260,10 +1260,12 @@ class ChatWindow(QMainWindow): # -- recording -------------------------------------------------------- def _update_record_button(self) -> None: - """Show the record control only for an audio-capable model.""" + """Show the record control for an audio-capable model, or while recording.""" if not hasattr(self, "record_button"): return # still building the window - can = self.recorder is not None and self.current_info().audio is True + can = self.recording or ( + self.recorder is not None and self.current_info().audio is True + ) self.record_button.setVisible(can) self.record_button.setText("Stop" if self.recording else "Record") self.record_button.setIcon( |
