chore: Adjust spinner text and spinner timing

This commit is contained in:
Paul Gauthier 2025-05-10 07:21:21 -07:00 committed by Paul Gauthier (aider)
parent 97379aa02f
commit 34409311a3
2 changed files with 3 additions and 3 deletions

View file

@ -344,7 +344,7 @@ class GitRepo:
commit_message = None
for model in self.models:
spinner_text = f"Waiting for {model.name} to generate commit message"
spinner_text = f"Generating commit message with {model.name}"
with WaitingSpinner(spinner_text):
num_tokens = model.token_count(messages)
max_tokens = model.info.get("max_input_tokens") or 0

View file

@ -179,8 +179,8 @@ class WaitingSpinner:
def _spin(self):
while not self._stop_event.is_set():
time.sleep(self.delay)
self.spinner.step()
time.sleep(self.delay)
self.spinner.end()
def start(self):
@ -192,7 +192,7 @@ class WaitingSpinner:
"""Request the spinner to stop and wait briefly for the thread to exit."""
self._stop_event.set()
if self._thread.is_alive():
self._thread.join(timeout=0.1)
self._thread.join(timeout=self.delay)
self.spinner.end()
# Allow use as a context-manager