Skip to content

Commit 018646c

Browse files
authored
fix(nvim): correct the tool schema and make all fields required. Fix #133. (#141)
* fix(nvim): correct the tool schema. Fix #133. * add `default` field in tool schema. * remove `minimum`. * remove `default`
1 parent dfff649 commit 018646c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lua/vectorcode/integrations/codecompanion/func_calling_tool.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ return check_cli_wrap(function(opts)
7070
action.options.query = { action.options.query }
7171
end
7272
vim.list_extend(args, action.options.query)
73+
if action.options.project_root == "" then
74+
action.options.project_root = nil
75+
end
7376
if action.options.project_root ~= nil then
7477
action.options.project_root = vim.fs.normalize(action.options.project_root)
7578
if
@@ -160,14 +163,14 @@ return check_cli_wrap(function(opts)
160163
},
161164
project_root = {
162165
type = "string",
163-
description = "Project path to search within (must be from 'ls' results)",
166+
description = "Project path to search within (must be from 'ls' results). Use empty string for the current project.",
164167
},
165168
},
166-
required = { "query" },
169+
required = { "query", "count", "project_root" },
167170
additionalProperties = false,
168171
},
169172
},
170-
required = { "command" },
173+
required = { "command", "options" },
171174
additionalProperties = false,
172175
},
173176
strict = true,

0 commit comments

Comments
 (0)