From 34271dd87706b845bb7200b0ec87b8e4c1251398 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Tue, 29 Jul 2025 18:04:42 +0200 Subject: [PATCH] fix: check for explicit uri input properly Previous check for empty schema broke this, the check should be done only after input type is checked Signed-off-by: Tomas Slusny --- lua/CopilotChat/functions.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/CopilotChat/functions.lua b/lua/CopilotChat/functions.lua index c9d8488b..dbcf5bcd 100644 --- a/lua/CopilotChat/functions.lua +++ b/lua/CopilotChat/functions.lua @@ -129,14 +129,14 @@ end ---@param schema table? ---@return table function M.parse_input(input, schema) - if not schema or not schema.properties then - return {} - end - if type(input) == 'table' then return input end + if not schema or not schema.properties then + return {} + end + local parts = vim.split(input or '', INPUT_SEPARATOR) local result = {} local prop_names = sorted_propnames(schema)