FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Prevent unneed LM calls during /run by ErichBSchulz · Pull Request #67 · cecli-dev/cecli · GitHub

Repository navigation

Closed
3 changes: 2 additions & 1 deletion aider/coders/base_coder.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL