Interface ContextListener

All Known Implementing Classes:
ChatPanel, ConversationPanel

public interface ContextListener
A listener interface for receiving notifications about changes in the conversation context.

Implementations can be registered with a Chat instance to react to new messages, pruning operations, or context resets.

Author:
anahata
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Fired whenever the context has changed in any way (messages added, removed, or modified).
    void
    Fired when the entire context is cleared, usually on a chat restart.
  • Method Details

    • contextChanged

      void contextChanged(Chat source)
      Fired whenever the context has changed in any way (messages added, removed, or modified).

      The listener is responsible for completely redrawing its view or updating its state based on the new context state.

      Parameters:
      source - The Chat instance where the change occurred.
    • contextCleared

      void contextCleared(Chat source)
      Fired when the entire context is cleared, usually on a chat restart.
      Parameters:
      source - The Chat instance that was cleared.