Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lua/CopilotChat/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ local function sorted_propnames(schema)
return prop_names
end

local function filter_schema(tbl)
local function filter_schema(tbl, root)
if type(tbl) ~= 'table' then
return tbl
end

if utils.empty(tbl.properties) then
if root and utils.empty(tbl.properties) then
return nil
end

Expand Down Expand Up @@ -139,7 +139,7 @@ function M.parse_schema(tool)
end

if schema then
schema = filter_schema(schema)
schema = filter_schema(schema, true)
end

return schema
Expand Down
Loading