From ac6c76d530672ce4516c393ca02eb4f22ef60311 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 28 Aug 2024 15:57:06 -0700 Subject: [PATCH] fix /model completions --- aider/io.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/io.py b/aider/io.py index 093b6403e..37b1e13fe 100644 --- a/aider/io.py +++ b/aider/io.py @@ -106,9 +106,10 @@ class AutoCompleter(Completer): partial = words[-1].lower() matches, _, _ = self.commands.matching_commands(cmd) - if len(matches) != 1: + if len(matches) == 1: + cmd = matches[0] + elif cmd not in matches: return - cmd = matches[0] if cmd not in self.command_completions: candidates = self.commands.get_completions(cmd)