feat(file_selector): support customized file selector method (#1204)

This commit is contained in:
guanghechen
2025-02-11 13:49:00 +08:00
committed by GitHub
parent 0bfbd39ebc
commit 6d116fac36
2 changed files with 11 additions and 1 deletions

View File

@@ -5,6 +5,11 @@
local Utils = require("avante.utils")
---@class avante.file_selector.IParams
---@field public title string
---@field public filepaths string[]
---@field public handler fun(filepaths: string[]|nil): nil
---@class avante.CoreConfig: avante.Config
local M = {}
---@class avante.Config
@@ -327,7 +332,7 @@ M._defaults = {
},
--- @class AvanteFileSelectorConfig
file_selector = {
--- @alias FileSelectorProvider "native" | "fzf" | "mini.pick" | "snacks" | "telescope" | string
--- @alias FileSelectorProvider "native" | "fzf" | "mini.pick" | "snacks" | "telescope" | string | fun(params: avante.file_selector.IParams): nil
provider = "native",
-- Options override for custom providers
provider_opts = {},