Add vterm and eat terminal backend support #235
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #[issue_number]
Overview
This PR adds support for vterm and eat terminal backends to aider.el, allowing users to choose their preferred terminal emulator for running aider sessions. Previously, aider.el only supported comint-mode. Now users can select from three options based on their preferences and requirements.
Motivation
As requested in the issue, many users prefer vterm or eat over comint for their terminal needs due to better terminal emulation, performance, or personal workflow preferences. This implementation provides that flexibility while maintaining full backward compatibility.
Changes
New Customization Variable
Added
aider-terminal-backendwith three options:'comint- Built-in Emacs comint-mode (default, no extra dependencies)'vterm- Requires emacs-libvterm'eat- Requires emacs-eatBackend Abstraction Layer
Created a clean protocol-based abstraction with the following functions:
aider--backend-available-p- Check if backend is availableaider--backend-require- Lazy load backend with error handlingaider--backend-create-buffer- Create terminal bufferaider--backend-send-input- Send commands to terminalaider--backend-check-proc- Check process statusaider--backend-setup-buffer- Configure buffer keybindingsAdded
aider--in-aider-buffer-phelper for backend-agnostic buffer detection.Updated Core Functions
aider--send-commandto dispatch via backend abstractionaider--create-aider-bufferfor multi-backend supportaider-clear-bufferto work with all backendsaider-file.elandaider-highlight-changes.elDocumentation
Updated both English and Chinese README files with:
Usage Example
Backward Compatibility
This change is fully backward compatible:
comint(no configuration change needed)Testing
Manual testing is recommended:
Implementation Notes
pcasefor clean backend dispatchvterm-send-string, eat usesprocess-send-string)declare-functiondeclarations to avoid byte-compilation warningsOriginal prompt
Fixes #234
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.