mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
chore: Adjust spinner text and spinner timing
This commit is contained in:
parent
97379aa02f
commit
34409311a3
2 changed files with 3 additions and 3 deletions
|
@ -344,7 +344,7 @@ class GitRepo:
|
||||||
|
|
||||||
commit_message = None
|
commit_message = None
|
||||||
for model in self.models:
|
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):
|
with WaitingSpinner(spinner_text):
|
||||||
num_tokens = model.token_count(messages)
|
num_tokens = model.token_count(messages)
|
||||||
max_tokens = model.info.get("max_input_tokens") or 0
|
max_tokens = model.info.get("max_input_tokens") or 0
|
||||||
|
|
|
@ -179,8 +179,8 @@ class WaitingSpinner:
|
||||||
|
|
||||||
def _spin(self):
|
def _spin(self):
|
||||||
while not self._stop_event.is_set():
|
while not self._stop_event.is_set():
|
||||||
time.sleep(self.delay)
|
|
||||||
self.spinner.step()
|
self.spinner.step()
|
||||||
|
time.sleep(self.delay)
|
||||||
self.spinner.end()
|
self.spinner.end()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
@ -192,7 +192,7 @@ class WaitingSpinner:
|
||||||
"""Request the spinner to stop and wait briefly for the thread to exit."""
|
"""Request the spinner to stop and wait briefly for the thread to exit."""
|
||||||
self._stop_event.set()
|
self._stop_event.set()
|
||||||
if self._thread.is_alive():
|
if self._thread.is_alive():
|
||||||
self._thread.join(timeout=0.1)
|
self._thread.join(timeout=self.delay)
|
||||||
self.spinner.end()
|
self.spinner.end()
|
||||||
|
|
||||||
# Allow use as a context-manager
|
# Allow use as a context-manager
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue