From 16a4f823bd774e2d0e340507a70892de2c5d8ff9 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 19 Nov 2024 12:30:41 -0800 Subject: [PATCH] refactor: Move pipe_editor import and return user input in cmd_editor method --- aider/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index ce85ec58e..37441390a 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -14,6 +14,7 @@ from prompt_toolkit.completion import Completion, PathCompleter from prompt_toolkit.document import Document from aider import models, prompts, voice +from aider.editor import pipe_editor from aider.format_settings import format_settings from aider.help import Help, install_help_extra from aider.llm import litellm @@ -1368,11 +1369,10 @@ class Commands: def cmd_editor(self, initial_content=""): "Open an editor to write a prompt" - from aider.editor import pipe_editor user_input = pipe_editor(initial_content, suffix="md") self.io.display_user_input(user_input) - self._generic_chat_command(user_input, self.coder.edit_format) + return user_input def expand_subdir(file_path):