From 58c47815393d9a1d8db4dc5e24712f7bdc0e2add Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Thu, 16 Apr 2026 03:59:08 +0200 Subject: [PATCH] fix(prompt): use correct variable in select_prompt Replaces usage of the undefined 'prompts' variable with 'prompt_list' in the select_prompt function. This ensures the correct prompt data is used when invoking the ask method, preventing potential runtime errors. Closes #1554 --- lua/CopilotChat/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/CopilotChat/init.lua b/lua/CopilotChat/init.lua index 1b7d0570..b5052845 100644 --- a/lua/CopilotChat/init.lua +++ b/lua/CopilotChat/init.lua @@ -378,7 +378,7 @@ function M.select_prompt(config) end, }, function(choice) if choice then - M.ask(prompts[choice.name].prompt, vim.tbl_extend('force', prompts[choice.name], config or {})) + M.ask(prompt_list[choice.name].prompt, vim.tbl_extend('force', prompt_list[choice.name], config or {})) end end) end