aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-18 20:33:23 +0200
committerDanilo M. <danix@danix.xyz>2026-09-18 20:33:23 +0200
commit3842a4e777a4b8882c6b4cea33ff46a82a29ed0c (patch)
treebe9bc8f11ce33d7dea47571a59b52fa59f13f06e
parentf40274657bef103f6ac132b3e0f029221044f155 (diff)
downloadllamachat-3842a4e777a4b8882c6b4cea33ff46a82a29ed0c.tar.gz
llamachat-3842a4e777a4b8882c6b4cea33ff46a82a29ed0c.zip
fix: keep Stop reachable during capture and refresh it on listing failure
-rw-r--r--llamachat/ui.py8
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(