mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
Added a method to check if input is a command.
This commit is contained in:
parent
891d5b2263
commit
4cbdb9b9ad
2 changed files with 5 additions and 1 deletions
|
@ -228,7 +228,7 @@ class Coder:
|
||||||
if not inp:
|
if not inp:
|
||||||
return
|
return
|
||||||
|
|
||||||
if inp.startswith("/"):
|
if self.commands.is_command(inp):
|
||||||
return self.commands.run(inp)
|
return self.commands.run(inp)
|
||||||
|
|
||||||
return self.send_new_user_message(inp)
|
return self.send_new_user_message(inp)
|
||||||
|
|
|
@ -10,6 +10,10 @@ class Commands:
|
||||||
self.io = io
|
self.io = io
|
||||||
self.coder = coder
|
self.coder = coder
|
||||||
|
|
||||||
|
def is_command(self, inp):
|
||||||
|
if inp[0] == '/':
|
||||||
|
return True
|
||||||
|
|
||||||
def help(self):
|
def help(self):
|
||||||
"Show help about all commands"
|
"Show help about all commands"
|
||||||
commands = self.get_commands()
|
commands = self.get_commands()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue