-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix ui #4760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nanshaws
wants to merge
6
commits into
Aider-AI:main
Choose a base branch
from
nanshaws:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix ui #4760
+95
−32
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Seamless Confirmation: When responding to Aider's prompts (e.g., "Open URL for more info?") with a single-character response like 'y', pressing Enter now confirms the action immediately. Command Efficiency: Native Aider commands, such as /exit or /add, now behave like a standard terminal interface, executing instantly upon pressing Enter. Input Security: For standard chat messages, Enter serves as a safe "newline" to prevent the accidental transmission of incomplete prompts. Users must use Ctrl+G (or Alt+Enter) to explicitly send the message to the AI.
To maximize efficiency while maintaining safety, I have implemented a dual-path submission logic: Primary Path (Implicit): Users can now terminate messages with a semicolon (;) and press Enter. The UI will automatically strip the semicolon and submit the prompt. Secondary Path (Explicit): Retained Ctrl+G and added Alt+Enter as "Force Send" keys. These bypass all content checks and immediately push the buffer to the AI. Rationale: This hybrid approach provides the speed of a terminal (via semicolon/Enter) without losing the dedicated control offered by a physical hotkey.
Author
Issue: > Terminals lacking "Bracketed Paste" support simulate an Enter key event for every newline character during a paste operation. This causes premature submission of partial code snippets if an intermediate line ends with a semicolon.
This update enhances the io.py input logic by introducing a "Structural Balance" check for the Enter key.
Delimiter Matching: The input buffer now tracks the balance of curly braces {}, square brackets [], and parentheses ().
Safe Statement Termination: The semicolon (;) only triggers a submission when all delimiters are balanced, preventing premature execution during multi-line code pasting.
Consistent Command UX: Native Aider commands (/) and confirmation prompts (y/n) continue to execute instantly, maintaining a high-velocity workflow.
Manual Overrides: Ctrl+G and Alt+Enter are preserved as explicit submission keys to bypass structural checks when needed.
…ures' for tree-sitter >= 0.22.0 I encountered an AttributeError in repomap.py when running Aider with the latest tree-sitter (v0.25.2). This is due to the breaking changes introduced in tree-sitter v0.22.0 where the .captures() method was moved from the Query object to QueryCursor. I have implemented a backward-compatible fix in repomap.py that checks for the existence of these attributes before calling them. This ensures Aider works with both older and newer versions of the tree-sitter library.
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


The input UI interface has been changed, and the send button has been modified to prevent the copied code from the web from accidentally triggering the send button.
