mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +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:
|
||||
return
|
||||
|
||||
if inp.startswith("/"):
|
||||
if self.commands.is_command(inp):
|
||||
return self.commands.run(inp)
|
||||
|
||||
return self.send_new_user_message(inp)
|
||||
|
|
|
@ -10,6 +10,10 @@ class Commands:
|
|||
self.io = io
|
||||
self.coder = coder
|
||||
|
||||
def is_command(self, inp):
|
||||
if inp[0] == '/':
|
||||
return True
|
||||
|
||||
def help(self):
|
||||
"Show help about all commands"
|
||||
commands = self.get_commands()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue