Open roblourens opened 2 months ago
Here's one experience to compare with, but I'm not sure it's right for chat input.
In the terminal when you have a commands in the history that wrap over multiple lines and you press up the cursor is placed at the end of the line. If you hit up again you go to the next previous command. This is definitely the experience I expect.
The caveat, is that the terminal does not allow you to use the up and down arrows to navigate within a command, you can only use forward and back within a command.
Following this approach would make your experience consistent with one other experience that is commonly used, but like I said above, I can't say for sure this is the right experience in a "rich" UX like VS Code.
GitHub.com Copilot Chat For alternative experience, Chat at github.com does navigate up through the text with the up arrow, so you have to hit the arrow enough times to go through the lines of your prompt, and then it jumps to the first position before navigating you to the next previous prompt.
I definitely don't like this approach in a chat pain because I often put a lot of text or code in the chat pain, making the keyboard navigation of the prompts extremely tedious.
I agree that the terminal approach doesn't feel right for us. But after playing with a bit, I don't really hate what github.com does. On mac, you can press cmd+up to go to the top of the input, so navigating past a long message can just be cmd+up, up. But on Windows I think the equivalent is ctrl+home, which is not very ergonomic. You can also just hold down up, if that helps?
Pulling from the other thread where @roblourens shared: We could say that the cursor goes to the end of the prompt, but then you have to move it to the top of the prompt in order to keep navigating history. A little annoying but I might like that better.
I agree - I'd feel most efficient with cursor at the end, even with the slight extra work to keep navigating. A few extra clicks to navigate history feels worth it when compared with the slightly jarring adjustment I have each time I want to go to edit a prompt I grabbed from the history and my cursor is at the beginning.
From https://github.com/microsoft/vscode-copilot-release/issues/1208#issuecomment-2192043062
When navigating chat history, we should put the cursor at the end of the prompt, or the end of the first line, and probably allow navigating when the cursor is in the first line even if it's not at the start of the input.
It's tricky because if you navigate up to a prompt that is wrapped on multiple lines, you want to be able to press up once to navigate again, so I think that putting the cursor at the very end of a multiline prompt doesn't work. Or, we put the cursor at the very end and you have to move the cursor to the top to navigate back again.
And I'm not actually sure I can find out from the editor how the line is wrapped to know where the end of the first line is...