feat: remove history command (#2063)
* feat: remove history command * Address code review Co-authored-by: Michael Bøcker-Larsen <247048+mblarsen@users.noreply.github.com> --------- Co-authored-by: Michael Bøcker-Larsen <247048+mblarsen@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,8 @@ local Utils = require("avante.utils")
|
||||
---@field provider_opts table | nil
|
||||
---@field on_select fun(item_ids: string[] | nil)
|
||||
---@field get_preview_content fun(item_id: string): (string, string) | nil
|
||||
---@field on_delete_item fun(item_id: string): (nil) | nil
|
||||
---@field on_action_cancel fun(): (nil) | nil
|
||||
|
||||
---@class avante.ui.Selector
|
||||
---@field provider avante.SelectorProvider
|
||||
@@ -23,6 +25,8 @@ local Utils = require("avante.utils")
|
||||
---@field on_select fun(item_ids: string[] | nil)
|
||||
---@field selected_item_ids string[] | nil
|
||||
---@field get_preview_content fun(item_id: string): (string, string) | nil
|
||||
---@field on_delete_item fun(item_id: string): (nil) | nil
|
||||
---@field on_action_cancel fun(): (nil) | nil
|
||||
local Selector = {}
|
||||
Selector.__index = Selector
|
||||
|
||||
@@ -45,6 +49,8 @@ function Selector:new(opts)
|
||||
o.on_select = opts.on_select
|
||||
o.selected_item_ids = opts.selected_item_ids or {}
|
||||
o.get_preview_content = opts.get_preview_content
|
||||
o.on_delete_item = opts.on_delete_item
|
||||
o.on_action_cancel = opts.on_action_cancel
|
||||
return o
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user