Skip to content
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

Feature Req: replace the cumbersome {} syntax for multiline input and use SHIFT-ENTER to send #2197

Open
Emasoft opened this issue Oct 30, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Emasoft
Copy link

Emasoft commented Oct 30, 2024

PROBLEM:
Multiline input In Aider is really cumbersome. The {} syntax is messy and many times one forgets about it and presses ENTER to write a new line, with the effect of sending an incomplete and easy-to-misunderstand message to the LLM, that would start to do its job in the wrong way messing many lines of code before we can stop it. Not only that, but the use of {} mixes with the {} in the javascript code, causing a mess.

SOLUTION:
Drop the {} syntax completely, and use SHIFT+ENTER to send the input to the LLM instead of ENTER. ENTER should simply add a line break without sending, allowing the user to write multiline input.
Why not use SHIFT+ENTER to send, you ask? The most common (and wrong) solution for implementing multiline input is to use SHIFT+ENTER to send a new line character or line break, leaving to the normal ENTER key the function to send the text. BUT THAT IS THE WRONG APPROACH. Because with that solution, if I PASTE a text with few lines of code, only the first line is sent, then it returns the control to the LLM, leaving out all the remaining lines of code. Sometimes those lines of code remain in the buffer and are sent one line at a time every time the prompt returns to the user, blocking the user interaction until all the LLM responses are done. A disaster.
This is why SHIFT+ENTER is the best choice to send, while ENTER should simply add a line break without sending. Simple and effective, since it also mitigates accidental sends.

@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and filing this issue. This doc may be helpful:

https://aider.chat/docs/usage/commands.html#entering-multi-line-chat-messages

Note that there is no portable way for a CLI tool to receive SHIFT+ENTER. Aider uses META+ENTER, which is often Esc ENTER in many terminal environments.

@paul-gauthier paul-gauthier added the question Further information is requested label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants