Skip to content

Commit 4102b17

Browse files
author
Zhe Yu
committed
chore(nvim): Remove include_stderr option and log tool options
1 parent 47d8a02 commit 4102b17

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

lua/vectorcode/integrations/codecompanion/common.lua

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ local logger = vc_config.logger
77
local default_query_options = {
88
max_num = { chunk = -1, document = -1 },
99
default_num = { chunk = 50, document = 10 },
10-
include_stderr = false,
1110
use_lsp = false,
1211
ls_on_start = false,
1312
no_duplicate = true,
1413
chunk_mode = false,
1514
}
1615

1716
---@type VectorCode.CodeCompanion.LsToolOpts
18-
local default_ls_options = { use_lsp = false, include_stderr = false }
17+
local default_ls_options = { use_lsp = false }
1918

2019
---@type VectorCode.CodeCompanion.VectoriseToolOpts
21-
local default_vectorise_options = { use_lsp = false, include_stderr = false }
20+
local default_vectorise_options = { use_lsp = false }
2221

2322
return {
2423
tool_result_source = "VectorCodeToolResult",
@@ -34,13 +33,27 @@ return {
3433
---@param opts VectorCode.CodeCompanion.LsToolOpts|{}|nil
3534
---@return VectorCode.CodeCompanion.LsToolOpts
3635
get_ls_tool_opts = function(opts)
37-
return vim.tbl_deep_extend("force", default_ls_options, opts or {})
36+
opts = vim.tbl_deep_extend("force", default_ls_options, opts or {})
37+
logger.info(
38+
string.format(
39+
"Loading `vectorcode_ls` with the following opts:\n%s",
40+
vim.inspect(opts)
41+
)
42+
)
43+
return opts
3844
end,
3945

4046
---@param opts VectorCode.CodeCompanion.VectoriseToolOpts|{}|nil
4147
---@return VectorCode.CodeCompanion.VectoriseToolOpts
4248
get_vectorise_tool_opts = function(opts)
43-
return vim.tbl_deep_extend("force", default_vectorise_options, opts or {})
49+
opts = vim.tbl_deep_extend("force", default_vectorise_options, opts or {})
50+
logger.info(
51+
string.format(
52+
"Loading `vectorcode_vectorise` with the following opts:\n%s",
53+
vim.inspect(opts)
54+
)
55+
)
56+
return opts
4457
end,
4558

4659
---@param opts VectorCode.CodeCompanion.QueryToolOpts|{}|nil
@@ -76,6 +89,12 @@ return {
7689
"max_num should be an integer or a table: {chunk: integer, document: integer}"
7790
)
7891
end
92+
logger.info(
93+
string.format(
94+
"Loading `vectorcode_query` with the following opts:\n%s",
95+
vim.inspect(opts)
96+
)
97+
)
7998
return opts
8099
end,
81100

lua/vectorcode/types.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@
6969

7070
--- This class defines the options available to the CodeCompanion tool.
7171
---@class VectorCode.CodeCompanion.ToolOpts
72-
--- Whether the stderr should be provided back to the chat
73-
---@field include_stderr boolean?
7472
--- Whether to use the LSP backend. Default: `false`
7573
---@field use_lsp boolean?
7674

0 commit comments

Comments
 (0)