We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfd1e22 commit 8a5cda1Copy full SHA for 8a5cda1
1 file changed
lua/CopilotChat/functions.lua
@@ -48,10 +48,16 @@ local function filter_schema(tbl)
48
return tbl
49
end
50
51
+ if utils.empty(tbl.properties) then
52
+ return nil
53
+ end
54
+
55
local result = {}
56
for k, v in pairs(tbl) do
- if type(v) ~= 'function' and k ~= 'examples' then
- result[k] = type(v) == 'table' and filter_schema(v) or v
57
+ if not utils.empty(v) then
58
+ if type(v) ~= 'function' and k ~= 'examples' then
59
+ result[k] = type(v) == 'table' and filter_schema(v) or v
60
61
62
63
return result
0 commit comments