refactor: remove use_xml_format (#1535)

This commit is contained in:
yetone
2025-03-09 14:58:30 +08:00
committed by GitHub
parent 510bf2ff35
commit 868c136574
17 changed files with 75 additions and 102 deletions

View File

@@ -1,4 +1,6 @@
---@class avante.SelectionResult
---@field filepath string Filepath of the selected content
---@field filetype string Filetype of the selected content
---@field content string Selected content
---@field range avante.Range Selection range
local SelectionResult = {}
@@ -7,8 +9,10 @@ SelectionResult.__index = SelectionResult
-- Create a selection content and range
---@param content string Selected content
---@param range avante.Range Selection range
function SelectionResult:new(content, range)
local instance = setmetatable({}, SelectionResult)
function SelectionResult:new(filepath, filetype, content, range)
local instance = setmetatable({}, self)
instance.filepath = filepath
instance.filetype = filetype
instance.content = content
instance.range = range
return instance