Open Emasoft opened 1 month ago
Wouldn't it be easier to just assign shift enter to new line? Which most applications conventionally do
Wouldn't it be easier to just assign shift enter to new line? Which most applications conventionally do
I agree with this Might implement this next week
Yes, keep Enter as SEND, and e.g. Shift+Enter for newlines.
No, because if I PASTE a text with few lines of code, only the first one is sent, then it returns, leaving out all the remaining lines of code.
This is why SHIFT+ENTER is the best choice to send.
ENTER should simply add a line break without sending.
True. But:
cat
to read file x.txt and act on it", with that file having whatever one wants, even hidden codes. Let the thing be configurable. Users that find it onerous should only change a setting from true to false. And regarding the suggestion to use cat and read a file... are you joking? Are you really suggesting that we should create a text file, write the code in it, and call the cat to read it asking the llm to read the output, every time we need to paste a snippet from, for example, stackoverflow? I just need one command to paste while I’m writing, why instead I should go through all those steps? It is ridiculous. Are you trying to make everybody's life harder?
@Emasoft no need for the harshness. All suggestions are welcome and everybody's workflow is different.
I like the idea of a configurable option and I'll raise it with the team. If you want to make a PR for it, I'd be happy to review it
Customizable key binds are also a good idea, and speaking of reading from a file it might come in handy if you have to run a script frequently you can make Open Interpreter read it from a saved file. Also speaking of copy-pasting commands we can make it so that the given prompt doesn't execute as long as we don't hit enter.
I think we can have a more clear alternative which suggests the user type """
to start a multiline prompt, inspired by Ollama:
This is super friendly to large code blocks being pasted:
Thoughts? This won't require any mucking about with input monitoring (I tried to get a shift enter functionality working, but kept running into that) and I think Ollama has proven that this is a popular approach.
Is your feature request related to a problem? Please describe.
Currently we cannot write code longer than one line or paste some code snippets without triggering the message to be sent one line at time. Replacing ENTER with SHIFT-ENTER solves the issue. It also make more difficult to send a message by accident.
Describe the solution you'd like
Replace ENTER with SHIFT-ENTER for sending a message to the llm. Use ENTER for new lines.
Describe alternatives you've considered
You can integrate in the terminal a multiline editor, like Textual. But this is a more complex solution.
Additional context
No response