mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: Move pipe_editor import and return user input in cmd_editor method
This commit is contained in:
parent
39bbfc56a4
commit
16a4f823bd
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue