Class MessageHistoryLoader

java.lang.Object
com.developer.nefarious.zjoule.plugin.core.functions.MessageHistoryLoader

public abstract class MessageHistoryLoader extends Object
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 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 - the Browser instance where the messages will be displayed.