diff --git a/aider/coder.py b/aider/coder.py index 05c2a4a64..71d178099 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -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) diff --git a/aider/commands.py b/aider/commands.py index 4725602db..b5ccffbef 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -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()