Bug: Spamming arrow keys while prompting causes a crash
What happened?
While it's running, pressing arrow keys causes the prompt to glitch out and error, along with a bunch of gibberish control character output.
https://github.com/github/gh-copilot/assets/14863373/130b1818-82a4-4da2-8a2d-cc0de18d1a32
Versions
v0.5.2-beta
Relevant terminal output
See video above
@asportnoy : Thanks for opening up this issue and being an early adopter! 🙇 I won't lie, my first thought was "Yeah, my cat likes to help as a copilot, too!" when I saw this. 🤣
All of that aside, I think there is something deeper in the prompter library we use — go-survey/survey — when the extension is loading up. I was able to reproduce this locally — thanks for the video! — so can follow up on what is happening and what can be done about it.
For me the arrow keys do not crash it but Option + arrow keys do.
@asportnoy @asmeurer : Thank you for your patience on delayed follow up with holiday! The team has been able to reproduce this behavior thanks to the above recording 👍.
Aside from confirming in https://github.com/github/gh-copilot/issues/3#issuecomment-1802431493 where the issue is, efforts to work around it haven't been effective. There's been discussions about replacing that dependency, which might give us options in the future. However for now, I think this will remain open a little bit until we can prioritize this along with the other enhancements being planned. 🙇