From c745d0dc38d268a8a51791052fd371aa735a2c23 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 27 Sep 2024 16:21:18 -0700 Subject: [PATCH] wip --- aider/commands.py | 8 +++++--- aider/io.py | 7 ++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index be50dfbe0..bcaae1202 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -583,14 +583,16 @@ class Commands: path_completer = PathCompleter( only_directories=False, get_paths=lambda: [self.coder.root], - file_filter=lambda fname: ( - self.coder.repo is None or not self.coder.repo.ignored_file(fname) - ), + # file_filter=lambda fname: ( + # self.coder.repo is None or not self.coder.repo.ignored_file(fname) + # ), ) word_before_cursor = document.get_word_before_cursor(WORD=True) + dump(word_before_cursor) for completion in path_completer.get_completions(document, complete_event): + dump(completion) if completion.text.startswith(word_before_cursor): yield completion diff --git a/aider/io.py b/aider/io.py index 66e35082b..debfe6088 100644 --- a/aider/io.py +++ b/aider/io.py @@ -5,7 +5,12 @@ from dataclasses import dataclass from datetime import datetime from pathlib import Path -from prompt_toolkit.completion import Completer, Completion, ThreadedCompleter +from prompt_toolkit.completion import ( + Completer, + Completion, + PathCompleter, + ThreadedCompleter, +) from prompt_toolkit.cursor_shapes import ModalCursorShapeConfig from prompt_toolkit.enums import EditingMode from prompt_toolkit.history import FileHistory