refactor: Update input handling to set and use placeholder text

This commit is contained in:
Paul Gauthier 2024-11-21 18:34:24 -08:00 committed by Paul Gauthier (aider)
parent 13cb6a315c
commit 2c12234604
2 changed files with 3 additions and 2 deletions

View file

@ -1367,7 +1367,8 @@ class Commands:
user_input = pipe_editor(initial_content, suffix="md", editor=self.editor)
self.io.user_input(user_input, log_only=False)
self.io.add_to_input_history(user_input)
return user_input
if user_input.strip():
self.io.set_placeholder(user_input.rstrip())
def expand_subdir(file_path):

View file

@ -429,7 +429,7 @@ class InputOutput:
try:
if self.prompt_session:
# Use placeholder if set, then clear it
default = self.placeholder
default = self.placeholder or ""
self.placeholder = None
line = self.prompt_session.prompt(