Copilot agent throwing errors with foreign characters
Hello there,
I have noticed that suggestions containing foreign characters are causing the copilot node process to throw errors:
[ERROR][2022-06-21 10:47:21] .../vim/lsp/rpc.lua:420 "rpc" "node" "stderr" "[ERROR] [streamChoices] [2022-06-21T08:47:21.693Z] Invalid streamingData\n"
[ERROR][2022-06-21 10:47:21] .../vim/lsp/rpc.lua:420 "rpc" "node" "stderr" "[ERROR] [streamChoices] [2022-06-21T08:47:21.693Z] Invalid streamingData joinedText:[{\n \"א'\", \"ב'\", \"ג'\", \"ד'\", \"ה'\", \"ו'\", \"ש'\",\n}\n] not a substring of joinedTokens:[ {\n \"א'\", \"ב'\", \"bytes:\\xd7bytes:\\x92'\", \"bytes:\\xd7bytes:\\x93'\", \"ה'\", \"ו'\", \"ש'\",\n}\n]\n"
Where is the js code coming from?
I have noticed this too, but I think it's an upstream issue. I'll see if I can trace down the cause and make an issue post in neovim.
This is (was?) not a neovim specific issue. I found reports of it happening in other editors as well a while after seeing this issue. It might be possible to suppress these messages, but that might come at the risk of also suppressing legitimate errors...
For example, if you search for 'invalid streamingData' in the post about Visual Studio here: https://github.com/community/community/discussions/15606 you can see the same type of error occuring.
11:11:45.579 [ERROR] [streamChoices] [2022-04-21T09:11:45.544Z] Invalid streamingData
11:11:45.579 [ERROR] [streamChoices] [2022-04-21T09:11:45.544Z] Invalid streamingData,joinedText:[TODO: Add more methods to add more properties to the DemandVariant.
Since it's outside the scope of this plugin and possibly even neovim itself to address this, I'm going to close this issue for now.