CopilotC-Nvim / CopilotChat.nvim

Chat with GitHub Copilot in Neovim
https://copilotc-nvim.github.io/CopilotChat.nvim/
GNU General Public License v3.0
1.79k stars 87 forks source link

Could not open file on CopilotChat: when running nvim from Git-Bash #430

Open andrea-reale opened 1 month ago

andrea-reale commented 1 month ago

The following error only occurs when running NeoVim in a GitBash shell. It does not happen when running NeoVim on Powershell. Maybe I am missing some required config? Or maybe it's just a matter of path-separator craze?

When I send any prompt to :CopilotChat while running NeoVim from a GitBash shell, I get the following error:

Error executing luv callback:
...-data\plugged\CopilotChat.nvim/lua/CopilotChat/utils.lua:72: Could not open file: \sd9c.
stack traceback:
        [C]: in function 'error'
        ...-data\plugged\CopilotChat.nvim/lua/CopilotChat/utils.lua:72: in function 'temp_file'
        ...ata\plugged\CopilotChat.nvim/lua/CopilotChat/copilot.lua:429: in function 'on_done'
        ...ata\plugged\CopilotChat.nvim/lua/CopilotChat/copilot.lua:337: in function '_user_on_exit'
        ...Local\nvim-data\plugged\plenary.nvim/lua/plenary/job.lua:241: in function '_shutdown'
        ...Local\nvim-data\plugged\plenary.nvim/lua/plenary/job.lua:48: in function <...Local\nvim-data\plugged\plenary.nvim/lua/plenary/job.lua:39>   

Neovim version information:

> nvim --version
NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1703942320
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe /MD /Zi /O2 /Ob1  -W3 -wd4311 -wd4146 -DUNIT_TESTING -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602 -DMSWIN -DINCLUDE_GENERATED_DECLARATIONS -ID:/a/neovim/neovim/.deps/usr/include/luajit-2.1 -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include -ID:/a/neovim/neovim/build/cmake.config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include

   system vimrc file: "$VIM\sysinit.vim"
  fall-back for $VIM: "C:/Program Files (x86)/nvim/

CopilotChat at commit 9333944fde installed via VimPlug

deathbeam commented 1 week ago

Could you recheck this on latest version? And if it still do not works, can you check :CopilotChatDebugInfo? It now contains also temp directory name