From 2b42d76e3fb92935bf2c39354b979df3386b14d6 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 10 May 2023 10:03:10 -0700 Subject: [PATCH] show the files at the chat prompt --- aider/getinput.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aider/getinput.py b/aider/getinput.py index 85bc4fb11..9db89baaa 100644 --- a/aider/getinput.py +++ b/aider/getinput.py @@ -31,12 +31,12 @@ class FileContentCompleter(Completer): yield Completion(word, start_position=-len(last_word)) -def canned_input(): +def canned_input(show_prompt): console = Console() input_line = input() - console.print("> ", end="", style="green") + console.print(show_prompt, end="", style="green") for char in input_line: console.print(char, end="", style="green") time.sleep(random.uniform(0.01, 0.15)) @@ -46,8 +46,11 @@ def canned_input(): def get_input(history_file, fnames): + show = ' '.join(fnames) + show += "\n> " + if not sys.stdin.isatty(): - return canned_input() + return canned_input(show_prompt) inp = "" multiline_input = False @@ -58,8 +61,6 @@ def get_input(history_file, fnames): completer_instance = FileContentCompleter(fnames) if multiline_input: show = ". " - else: - show = "> " line = prompt( show,