Skip to content
Merged
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
11 changes: 11 additions & 0 deletions lua/vectorcode/integrations/codecompanion/func_calling_tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ return check_cli_wrap(function(opts)
for _, ref in pairs(agent.chat.refs) do
if ref.source == cc_common.tool_result_source then
table.insert(existing_files, ref.id)
elseif type(ref.path) == "string" then
table.insert(existing_files, ref.path)
elseif ref.bufnr then
local fname = vim.api.nvim_buf_get_name(ref.bufnr)
if fname ~= nil then
local stat = vim.uv.fs_stat(fname)
if stat and stat.type == "file" then
table.insert(existing_files, fname)
end
end
end
end
if #existing_files > 1 then
Expand Down Expand Up @@ -295,6 +305,7 @@ return check_cli_wrap(function(opts)
agent.chat.references:add({
source = cc_common.tool_result_source,
id = file.path,
path = file.path,
opts = { visible = false },
})
end
Expand Down