refactor(history): change HistoryMessage:new() to accept role and item
Change the constructor to accept role and a single content item instead of raw AvanteLLMMessage instance. This will help when we will start changing message.content from being a string or a list of tables to just a string or a single table.
This commit is contained in:
@@ -263,10 +263,7 @@ When you're done, provide a clear and concise summary of what you found.]]):gsub
|
||||
.. elapsed_time
|
||||
.. "s)"
|
||||
if session_ctx.on_messages_add then
|
||||
local message = History.Message:new({
|
||||
role = "assistant",
|
||||
content = "\n\n" .. summary,
|
||||
}, {
|
||||
local message = History.Message:new("assistant", "\n\n" .. summary, {
|
||||
just_for_display = true,
|
||||
})
|
||||
session_ctx.on_messages_add({ message })
|
||||
|
||||
Reference in New Issue
Block a user