feat: add project_root in AskOptions so that project root can be specified from api (#2652)

This commit is contained in:
brook hong
2025-08-30 18:07:59 +08:00
committed by GitHub
parent f70c4b8b88
commit 9008fc4f41
4 changed files with 6 additions and 4 deletions

View File

@@ -112,10 +112,12 @@ end
---@field without_selection? boolean whether to open a new chat without selection
---@field sidebar_pre_render? fun(sidebar: avante.Sidebar)
---@field sidebar_post_render? fun(sidebar: avante.Sidebar)
---@field project_root? string optional project root
---@param opts? AskOptions
function M.ask(opts)
opts = opts or {}
Config.ask_opts = opts
if type(opts) == "string" then
Utils.warn("passing 'ask' as string is deprecated, do {question = '...'} instead", { once = true })
opts = { question = opts }