Skip to content

Commit d11175f

Browse files
author
Zhe Yu
committed
fix(nvim): Use correct tool opts getter for summary system prompt
1 parent 8ca6d9e commit d11175f

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

lua/codecompanion/_extensions/vectorcode/init.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ local logger = vc_config.logger
1515
---@type VectorCode.CodeCompanion.ExtensionOpts|{}
1616
local default_extension_opts = {
1717
tool_opts = {
18-
-- NOTE: the default opts are defined in the source code files of the tools.
19-
ls = {},
20-
query = {},
21-
vectorise = {},
22-
files_ls = {},
23-
files_rm = {},
18+
-- NOTE: the other default opts are defined in the source code files of the tools.
19+
-- `include_in_toolbox` is here so that the extension setup works as expected.
20+
21+
ls = { include_in_toolbox = true },
22+
query = { include_in_toolbox = true },
23+
vectorise = { include_in_toolbox = true },
24+
files_ls = { include_in_toolbox = false },
25+
files_rm = { include_in_toolbox = false },
2426
},
2527
tool_group = { enabled = true, collapse = true, extras = {} },
2628
}

lua/vectorcode/integrations/codecompanion/query_tool.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,8 @@ local function generate_summary(result, summarise_opts, cmd, callback)
237237

238238
local system_prompt = summarise_opts.system_prompt
239239
if type(system_prompt) == "function" then
240-
system_prompt = system_prompt(
241-
cc_common.get_query_tool_opts().summarise.system_prompt --[[@as string]]
242-
)
240+
system_prompt =
241+
system_prompt(get_query_tool_opts().summarise.system_prompt --[[@as string]])
243242
end
244243

245244
assert(

0 commit comments

Comments
 (0)