feat: Add get_raw_completions method to Commands class

This commit is contained in:
Paul Gauthier (aider) 2024-09-27 16:05:40 -07:00
parent 6c2c3942bf
commit ee4de6bd1c

View file

@ -163,6 +163,11 @@ class Commands:
def is_command(self, inp):
return inp[0] in "/!"
def get_raw_completions(self, cmd):
cmd = cmd.replace("-", "_")
raw_completer = getattr(self, f"completions_raw_{cmd}", None)
return raw_completer
def get_completions(self, cmd):
assert cmd.startswith("/")
cmd = cmd[1:]