Skip to content

Commit 5058ffa

Browse files
committed
check query for nil
1 parent a9df299 commit 5058ffa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/vectorcode/integrations/codecompanion/func_calling_tool.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ return check_cli_wrap(function(opts)
6060

6161
if action.command == "query" then
6262
local args = { "query", "--pipe", "-n", tostring(action.options.count) }
63+
if action.options.query == nil then
64+
return {
65+
status = "error",
66+
data = "Missing argument: option.query, please refine the tool argument.",
67+
}
68+
end
6369
if type(action.options.query) == "string" then
6470
action.options.query = { action.options.query }
6571
end

0 commit comments

Comments
 (0)