Class: Pikuri::Agent::Event::HistoryLoaded

Inherits:
Data
  • Object
show all
Defined in:
lib/pikuri/agent/event.rb

Overview

A saved conversation was restored by Pikuri::Agent#load_history!. Always follows a Reset, which is the part that clears display state — this one says the conversation is not empty after all, and carries what a listener needs to stop lying about it.

tokens is the last assistant message's usage as recorded when the conversation was exported, so a running context readout can pick up where it left off instead of showing 0 against 40k of restored history. nil when the history holds no assistant turn, or was exported without usage.

Instance Attribute Summary collapse

Instance Attribute Details

#messagesInteger (readonly)

Returns how many messages were restored.

Returns:

  • (Integer)

    how many messages were restored



164
# File 'lib/pikuri/agent/event.rb', line 164

HistoryLoaded = Data.define(:messages, :tokens)

#tokensTokens? (readonly)

Returns usage of the last restored assistant message.

Returns:

  • (Tokens, nil)

    usage of the last restored assistant message



164
# File 'lib/pikuri/agent/event.rb', line 164

HistoryLoaded = Data.define(:messages, :tokens)