Skip to content

feat: update to latest copilot.vim/dist #1 #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added copilot/dist/compiled/linux/x64/node_sqlite3.node
Binary file not shown.
Binary file added copilot/dist/compiled/win32/x64/node_sqlite3.node
Binary file not shown.
1,001 changes: 531 additions & 470 deletions copilot/dist/language-server.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions copilot/dist/language-server.js.map

Large diffs are not rendered by default.

100,260 changes: 0 additions & 100,260 deletions copilot/dist/resources/cl100k/tokenizer_cushman002.json

This file was deleted.

100,001 changes: 0 additions & 100,001 deletions copilot/dist/resources/cl100k/vocab_cushman002.bpe

This file was deleted.

100,256 changes: 0 additions & 100,256 deletions copilot/dist/resources/cl100k_base.tiktoken

This file was deleted.

199,998 changes: 0 additions & 199,998 deletions copilot/dist/resources/o200k_base.tiktoken

This file was deleted.

Binary file added copilot/dist/tree-sitter-c_sharp.wasm
Binary file not shown.
Binary file modified copilot/dist/tree-sitter-go.wasm
Binary file not shown.
Binary file added copilot/dist/tree-sitter-java.wasm
Binary file not shown.
5 changes: 0 additions & 5 deletions copilot/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion lua/copilot/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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/language-server.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)
Expand Down
11 changes: 5 additions & 6 deletions lua/copilot/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function M.get_editor_info()
editorPluginInfo = {
name = "copilot.lua",
-- reflects version of github/copilot.vim
version = "1.13.0",
version = "1.43.0",
},
}
return info
Expand All @@ -30,7 +30,7 @@ local copilot_lua_version = nil
function M.get_copilot_lua_version()
if not copilot_lua_version then
local plugin_version_ok, plugin_version = pcall(function()
local plugin_dir = vim.fn.fnamemodify(M.get_copilot_path(), ":h:h")
local plugin_dir = M.get_plugin_path()
return vim.fn.systemlist(string.format("cd %s && git rev-parse HEAD", plugin_dir))[1]
end)
copilot_lua_version = plugin_version_ok and plugin_version or "dev"
Expand Down Expand Up @@ -279,11 +279,10 @@ function M.get_network_proxy()
}
end

---@deprecated
M.get_copilot_path = function()
local copilot_path = vim.api.nvim_get_runtime_file("copilot/index.js", false)[1]
M.get_plugin_path = function()
local copilot_path = vim.api.nvim_get_runtime_file("lua/copilot/init.lua", false)[1]
if vim.fn.filereadable(copilot_path) ~= 0 then
return copilot_path
return vim.fn.fnamemodify(copilot_path, ":h:h:h")
else
print("[Copilot] could not read" .. copilot_path)
end
Expand Down