mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
wip
This commit is contained in:
parent
9c5ef0b41a
commit
c745d0dc38
2 changed files with 11 additions and 4 deletions
|
@ -583,14 +583,16 @@ class Commands:
|
||||||
path_completer = PathCompleter(
|
path_completer = PathCompleter(
|
||||||
only_directories=False,
|
only_directories=False,
|
||||||
get_paths=lambda: [self.coder.root],
|
get_paths=lambda: [self.coder.root],
|
||||||
file_filter=lambda fname: (
|
# file_filter=lambda fname: (
|
||||||
self.coder.repo is None or not self.coder.repo.ignored_file(fname)
|
# self.coder.repo is None or not self.coder.repo.ignored_file(fname)
|
||||||
),
|
# ),
|
||||||
)
|
)
|
||||||
|
|
||||||
word_before_cursor = document.get_word_before_cursor(WORD=True)
|
word_before_cursor = document.get_word_before_cursor(WORD=True)
|
||||||
|
dump(word_before_cursor)
|
||||||
|
|
||||||
for completion in path_completer.get_completions(document, complete_event):
|
for completion in path_completer.get_completions(document, complete_event):
|
||||||
|
dump(completion)
|
||||||
if completion.text.startswith(word_before_cursor):
|
if completion.text.startswith(word_before_cursor):
|
||||||
yield completion
|
yield completion
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,12 @@ from dataclasses import dataclass
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
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.cursor_shapes import ModalCursorShapeConfig
|
||||||
from prompt_toolkit.enums import EditingMode
|
from prompt_toolkit.enums import EditingMode
|
||||||
from prompt_toolkit.history import FileHistory
|
from prompt_toolkit.history import FileHistory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue