Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aider/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from packaging import version

__version__ = "0.88.6.dev"
__version__ = "0.88.7.dev"
safe_version = __version__

try:
Expand Down
13 changes: 8 additions & 5 deletions aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,6 @@ def show_pretty(self):

return True

def _stop_waiting_spinner(self):
"""Stop and clear the waiting spinner if it is running."""
self.io.stop_spinner()

def get_abs_fnames_content(self):
for fname in list(self.abs_fnames):
content = self.io.read_text(fname)
Expand Down Expand Up @@ -1281,6 +1277,7 @@ async def _processing_logic(self, user_message, preproc):
finally:
self.run_one_completed = True
self.compact_context_completed = True
self.io.stop_spinner()

def copy_context(self):
if self.auto_copy_context:
Expand Down Expand Up @@ -1994,7 +1991,7 @@ async def send_message(self, inp):
self.mdstream = None

# Ensure any waiting spinner is stopped
self._stop_waiting_spinner()
self.io.start_spinner("Processing Answer...")

self.partial_response_content = self.get_multi_response_content_in_progress(True)
self.remove_reasoning_content()
Expand Down Expand Up @@ -2064,7 +2061,13 @@ async def send_message(self, inp):
try:
if self.partial_response_tool_calls:
tool_calls = []
tool_id_set = set()

for tool_call_dict in self.partial_response_tool_calls:
# LLM APIs sometimes return duplicates and that's annoying
if tool_call_dict.get("id") in tool_id_set:
continue

tool_calls.append(
ChatCompletionMessageToolCall(
id=tool_call_dict.get("id"),
Expand Down
9 changes: 8 additions & 1 deletion aider/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ def __init__(
# Spinner state
self.spinner_running = False
self.spinner_text = ""
self.last_spinner_text = ""
self.spinner_frame_index = 0
self.spinner_last_frame_index = 0
self.unicode_palette = "░█"
Expand Down Expand Up @@ -493,14 +494,17 @@ def _spinner_supports_unicode(self) -> bool:
except Exception:
return False

def start_spinner(self, text):
def start_spinner(self, text, update_last_text=True):
"""Start the spinner."""
self.stop_spinner()

if self.prompt_session:
self.spinner_running = True
self.spinner_text = text
self.spinner_frame_index = self.spinner_last_frame_index

if update_last_text:
self.last_spinner_text = text
else:
self.fallback_spinner = Spinner(text)
self.fallback_spinner.step()
Expand Down Expand Up @@ -1115,6 +1119,7 @@ async def _confirm_ask(
else:
# Ring the bell if needed
self.ring_bell()
self.start_spinner("Awaiting Confirmation...", False)

while True:
try:
Expand Down Expand Up @@ -1157,7 +1162,9 @@ async def _confirm_ask(
break
res = res.lower()
good = any(valid_response.startswith(res) for valid_response in valid_responses)

if good:
self.start_spinner(self.last_spinner_text)
break

error_message = f"Please answer with one of: {', '.join(valid_responses)}"
Expand Down