mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
noop
This commit is contained in:
parent
ee73e8eb41
commit
fcacc3c139
1 changed files with 8 additions and 8 deletions
|
@ -28,6 +28,13 @@ class Commands:
|
|||
|
||||
return commands
|
||||
|
||||
def get_command_completions(self, cmd_name, partial):
|
||||
cmd_completions_method_name = f"completions_{cmd_name}"
|
||||
cmd_completions_method = getattr(self, cmd_completions_method_name, None)
|
||||
if cmd_completions_method:
|
||||
for completion in cmd_completions_method(partial):
|
||||
yield completion
|
||||
|
||||
def do_run(self, cmd_name, args):
|
||||
cmd_method_name = f"cmd_{cmd_name}"
|
||||
cmd_method = getattr(self, cmd_method_name, None)
|
||||
|
@ -36,13 +43,6 @@ class Commands:
|
|||
else:
|
||||
self.console.print(f"Error: Command {cmd_name} not found.")
|
||||
|
||||
def get_command_completions(self, cmd_name, partial):
|
||||
cmd_completions_method_name = f"completions_{cmd_name}"
|
||||
cmd_completions_method = getattr(self, cmd_completions_method_name, None)
|
||||
if cmd_completions_method:
|
||||
for completion in cmd_completions_method(partial):
|
||||
yield completion
|
||||
|
||||
def run(self, inp):
|
||||
words = inp.strip().split()
|
||||
if not words:
|
||||
|
@ -57,7 +57,7 @@ class Commands:
|
|||
if matching_commands[0] == "/help":
|
||||
self.help()
|
||||
else:
|
||||
self.do_run(matching_commands[0][1:], rest_inp)
|
||||
return self.do_run(matching_commands[0][1:], rest_inp)
|
||||
elif len(matching_commands) > 1:
|
||||
self.console.print("[red]Ambiguous command: ', '.join(matching_commands)}")
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue