refactor(utils): remove history_messages_to_messages() function

Utils.history_messages_to_messages() is not used anywhere, remove it.
This commit is contained in:
Dmitry Torokhov
2025-07-14 09:03:45 -07:00
committed by yetone
parent d7c48075a5
commit 06d9d8cec3

View File

@@ -1475,18 +1475,6 @@ end
function M.get_timestamp() return tostring(os.date("%Y-%m-%d %H:%M:%S")) end
---@param history_messages avante.HistoryMessage[]
---@return AvanteLLMMessage[]
function M.history_messages_to_messages(history_messages)
local messages = {}
for _, history_message in ipairs(history_messages) do
if history_message.just_for_display then goto continue end
table.insert(messages, history_message.message)
::continue::
end
return messages
end
function M.uuid()
local template = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
return string.gsub(template, "[xy]", function(c)