Open kripper opened 4 months ago
Thanks for trying aider and filing this issue.
Pasting in tabs works just fine in my local Mac environment. There may be a problem with your terminal environment?
$ aider
Aider v0.26.2-dev
Model: gpt-4-1106-preview using udiff edit format
Git repo: .git with 0 files
Repo-map: using 1024 tokens
Use /help to see in-chat commands, run with --help to see cmd line args
───────────────────────────────────────────────────────────────────────────────────────────────
> what seperator is used in the following text: hello^Iworld^I!
cola^Icolb^Icolc
The separator used in the provided text is a tab character, often represented as \t in many
programming languages. This character is used to separate columns in tab-delimited text files
or strings.
Pasting in tabs works just fine in my local Mac environment. There may be a problem with your terminal environment?
Hi. I tested on Windows.
I noticed the issue on the standard terminal, and then debugged the input inside visual code. There was no \t
.
Did you try tabs or spaces?
I believe the tabs are ingested by PromptSession
for the commands autocompleter (with the tab key).
How does the stdin reader on Mac distinguish between pasted tabs and tabs pressed on the keyboard if both are merely tabs on stdin?
There is also another use case where pasting multiline text that does not begin with {
is required.
I pasted tabs, worked fine. It looks like you are running aider inside the VSCode terminal, which is known to not be a fully functional terminal. That could be part of the issue.
Also, using {
to start a multi-line paste is not intended to handle "text that starts with {". It's intended as a way to wrap any multi-line text you wish to enter into the chat.
I tested again in a normal cmd.exe
window and confirmed that the tabs are lost.
In general pressing the tab key doesn't generate any output.
It does only autocomplete commands after entering /
.
What are you trying to accomplish? Why are you trying to type bare tabs into the chat window?
What are you trying to accomplish? Why are you trying to type bare tabs into the chat window?
Yes. I have a prompt containing a JSON indented with tabs and I'm doing copy/paste. It could also be a prompt with python code.
As I mentioned above, pasting in tabs works just fine in my local Mac environment. There may be a problem with your terminal environment? Especially if you're in the VS Code terminal.
Also, JSON doesn't need tabs?
Another solution could be to make a file with the JSON and /add
it to the chat and then reference it in your chat. "Use the JSON in foo.json to do blah blah blah".
I'm testing inside a normal cmd.exe
window on Windows 10.
If you are testing on a Mac, I guess pasting tabs only works on Mac.
I prefer clean and general solutions. That's why I also mentioned pasting python code where tabs are important.
I will be using the /block
command I implemented in https://github.com/paul-gauthier/aider/pull/504/files
Thanks.
I see no way to copy & paste blocks containing tabs into the prompt. Multiline mode doesn't work either.
session.prompt()
is ignoring the tabs (they get lost and the context gets corrupted).