Skip to content
Closed
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
3 changes: 2 additions & 1 deletion aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,11 +1140,12 @@ async def _run_patched(self, with_message=None, preproc=True):
self.io.stop_spinner()

if user_message and self.run_one_completed and self.compact_context_completed:
if self.commands.is_command(user_message):
self.io.placeholder = "Running command..."
processing_task = asyncio.create_task(
self._processing_logic(user_message, preproc)
)
# Start spinner for processing task
self.io.start_spinner("Processing...")
user_message = None # Clear message after starting task
except KeyboardInterrupt:
if processing_task:
Expand Down
18 changes: 15 additions & 3 deletions aider/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,11 @@ def matching_commands(self, inp):
async def run(self, inp):
if inp.startswith("!"):
self.coder.event("command_run")
return await self.do_run("run", inp[1:])
self.io.placeholder = "Running command..."
try:
return await self.do_run("run", inp[1:])
finally:
self.io.placeholder = ""

res = self.matching_commands(inp)
if res is None:
Expand All @@ -325,11 +329,19 @@ async def run(self, inp):
if len(matching_commands) == 1:
command = matching_commands[0][1:]
self.coder.event(f"command_{command}")
return await self.do_run(command, rest_inp)
self.io.placeholder = f"Running {command}..."
try:
return await self.do_run(command, rest_inp)
finally:
self.io.placeholder = ""
elif first_word in matching_commands:
command = first_word[1:]
self.coder.event(f"command_{command}")
return await self.do_run(command, rest_inp)
self.io.placeholder = f"Running {command}..."
try:
return await self.do_run(command, rest_inp)
finally:
self.io.placeholder = ""
elif len(matching_commands) > 1:
self.io.tool_error(f"Ambiguous command: {', '.join(matching_commands)}")
else:
Expand Down