feat: add 'add' command completions to /read-only command

This commit is contained in:
Paul Gauthier (aider) 2024-10-03 10:54:26 -07:00
parent 33b45b68e2
commit 6093a4c2bb

View file

@ -614,6 +614,16 @@ class Commands:
selected_style=completion.selected_style,
)
# Add completions from the 'add' command
add_completions = self.completions_add()
for completion in add_completions:
if completion.startswith(after_command):
yield Completion(
text=completion,
start_position=adjusted_start_position,
display=completion,
)
def completions_add(self):
files = set(self.coder.get_all_relative_files())
files = files - set(self.coder.get_inchat_relative_files())