zbirenbaum / copilot.lua

Fully featured & enhanced replacement for copilot.vim complete with API for interacting with Github Copilot
MIT License
2.43k stars 64 forks source link

Update copilot.vim/dist #269

Closed github-actions[bot] closed 2 weeks ago

github-actions[bot] commented 4 months ago

Automated changes by create-pull-request GitHub action

nwiizo commented 2 months ago

@MunifTanjim @zbirenbaum Hello, as an avid user of copilot.lua, I've greatly benefited from the functionality it provides. I noticed the pull request #269 titled 'Update copilot.vim/dist' and believe that these updates could significantly improve the user experience. Could I kindly request a review of this pull request? Your attention to this matter would not only help in keeping the project up-to-date but also ensure the best possible experience for all users. Thank you for your continued efforts and contributions to this project.

alexpalyan commented 2 months ago

we need to update the file client.lua Here is diff:

diff --git a/lua/copilot/client.lua b/lua/copilot/client.lua
index 8c1111a..81be009 100644
--- a/lua/copilot/client.lua
+++ b/lua/copilot/client.lua
@@ -164,7 +164,7 @@ local function prepare_client_config(overrides)
     return
   end

-  local agent_path = vim.api.nvim_get_runtime_file("copilot/index.js", false)[1]
+  local agent_path = vim.api.nvim_get_runtime_file("copilot/dist/agent.js", false)[1]
   if vim.fn.filereadable(agent_path) == 0 then
     local err = string.format("Could not find agent.js (bad install?) : %s", agent_path)
     vim.notify("[Copilot] " .. err, vim.log.levels.ERROR)
@@ -190,6 +190,7 @@ local function prepare_client_config(overrides)
     cmd = {
       node,
       agent_path,
+      "--stdio",
     },
     root_dir = vim.loop.cwd(),
     name = "copilot",