mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
feat: add --apply-clipboard-edits switch for direct clipboard editing
This commit is contained in:
parent
c67e63bc09
commit
8bc0d5544d
2 changed files with 10 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
|||
#ai: add a --apply-clipboard-edits switch which sets the edit-format to the main models editor format and acts as if "--msg /paste" was provided as an arg!
|
||||
|
||||
import configparser
|
||||
import json
|
||||
|
@ -776,6 +775,10 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
coder.apply_updates()
|
||||
return
|
||||
|
||||
if args.apply_clipboard_edits:
|
||||
args.edit_format = main_model.editor_edit_format
|
||||
args.message = "/paste"
|
||||
|
||||
if "VSCODE_GIT_IPC_HANDLE" in os.environ:
|
||||
args.pretty = False
|
||||
io.tool_output("VSCode terminal detected, pretty output has been disabled.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue