Class MessageHistoryLoader
java.lang.Object
com.developer.nefarious.zjoule.plugin.core.functions.MessageHistoryLoader
Utility class for loading chat message history into a browser component.
The MessageHistoryLoader
retrieves stored messages from memory and renders
them in a browser using JavaScript functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
loadFromMemory
(org.eclipse.swt.browser.Browser browser) Loads chat message history from memory and displays it in the specified browser.
-
Method Details
-
loadFromMemory
public static void loadFromMemory(org.eclipse.swt.browser.Browser browser) Loads chat message history from memory and displays it in the specified browser.This method retrieves the message history from
MemoryMessageHistory
, escapes the content for safe rendering, and invokes JavaScript functions to add the messages to the browser UI.- User messages are added using
addUserMessage()
. - Assistant messages are added using
addBotMessage()
.
- Parameters:
browser
- theBrowser
instance where the messages will be displayed.
- User messages are added using
-