Commit graph

15 commits

Author SHA1 Message Date
Paul Gauthier (aider)
3c775fd5de fix: Resolve Windows path handling and editor command test issues 2025-02-24 12:09:26 -08:00
Paul Gauthier (aider)
6ecf44c87a refactor: Remove unused shlex import from editor.py 2025-02-24 10:22:04 -08:00
Paul Gauthier
031e8cea6e feat: Add pipe_editor function for system editor interaction 2025-02-24 10:21:59 -08:00
Paul Gauthier
d65e3f73df refactor: Simplify editor discovery and command handling logic 2025-02-24 10:21:45 -08:00
Paul Gauthier (aider)
c8745afb37 fix: Preserve Windows paths in editor command parsing 2025-02-24 10:18:22 -08:00
Paul Gauthier
686a32cbc0 refactor: Remove debug dump call in pipe_editor function 2025-02-24 09:28:31 -08:00
Paul Gauthier (aider)
55d7397ff5 style: Organize imports and remove unused import 2025-02-24 09:22:40 -08:00
Paul Gauthier (aider)
3714d554df refactor: Update subprocess call to use shell=True with properly quoted command string 2025-02-24 09:22:34 -08:00
Paul Gauthier
0415de853b fix: Remove shell=True and add debug dump in pipe_editor 2025-02-24 09:22:28 -08:00
Daniel de Vries
8799cf95b4 subprocess now called with shell true 2025-02-14 11:47:45 -05:00
Paul Gauthier
a43772b21d refactor: Remove unused file_editor function from editor module 2024-11-21 10:01:08 -08:00
Paul Gauthier (aider)
2a1d2ef294 refactor: Update editor discovery to support custom editor and remove AIDER_EDITOR 2024-11-21 09:55:15 -08:00
Paul Gauthier (aider)
308c49b2d8 fix: Modify discover_editor to dynamically check platform system 2024-11-19 12:26:37 -08:00
Chad Phillips
8801fda972 formatting fixes 2024-11-04 10:10:37 -06:00
Chad Phillips
d8e9da35d6 add /editor command
Opens an editor for constructing a user prompt, using the currently defined chat mode.

The editor is determined as follows:

Look for the following environment variables, in order:

1. AIDER_EDITOR
2. VISUAL
3. EDITOR

If none of these are defined, use the following defaults:

Windows: notepad
OS X: vim
*nix: vi

If an editor is not found, a RuntimeError is raised.

Any arguments passed after the /editor command are inserted as content.

The temporary file used for editing has an .md extension, which can be leveraged for syntax highlighting.

NOTE: The editor used MUST block the process until the editor is closed -- the default editors all do this.
2024-11-03 20:18:57 -05:00