Merge pull request #2234 from thehunmonkgroup/main

add /editor command
This commit is contained in:
paul-gauthier 2024-11-19 12:22:37 -08:00 committed by GitHub
commit f1306d3301
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 177 additions and 6 deletions

View file

@ -1366,6 +1366,14 @@ class Commands:
report_github_issue(issue_text, title=title, confirm=False)
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)
def expand_subdir(file_path):
if file_path.is_file():