opts: allow false to be passed as ask flag (#1897)

Co-authored-by: yetone <yetoneful@gmail.com>
This commit is contained in:
Perken
2025-05-06 09:19:25 -04:00
committed by GitHub
parent 2d6527197d
commit 23d8c8b24f

View File

@@ -2223,9 +2223,12 @@ function Sidebar:get_generate_prompts_options(request, cb)
local selected_filepaths = self.file_selector.selected_filepaths or {}
local ask = self.ask_opts.ask
if ask == nil then ask = true end
---@type AvanteGeneratePromptsOptions
local prompts_opts = {
ask = self.ask_opts.ask or true,
ask = ask,
project_context = vim.json.encode(project_context),
selected_filepaths = selected_filepaths,
recently_viewed_files = Utils.get_recent_filepaths(),