Class HistoryNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IconThe standard pulse icon to visualize the live conversation feed.Fields inherited from class AbstractContextNode
agiPanel, children, declarationsTokens, historyTokens, instructionsTokens, ragTokens, status, userObject -
Constructor Summary
ConstructorsConstructorDescriptionHistoryNode(AgiPanel agiPanel, ContextManager userObject) Constructs a new HistoryNode. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalculates the token counts for this node's own content (excluding children).protected AbstractContextNode<?> createChildNode(Object obj) Creates a new child node for the given domain object.protected List<?> Fetches the current list of domain objects that should be represented as children of this node.Gets a detailed description of the node's purpose or content.getIcon()Gets an optional icon for this node by delegating to theIconProviderconfigured in the agi session.getName()Gets the human-readable display name for this node.booleanisActive()Checks if the underlying domain object is currently active in the context.protected voidUpdates the status string for this node.Methods inherited from class AbstractContextNode
equals, getAgi, getChildren, hashCode, refresh, refreshData, refreshTokens, toString
-
Field Details
-
ICON
The standard pulse icon to visualize the live conversation feed.
-
-
Constructor Details
-
HistoryNode
Constructs a new HistoryNode.- Parameters:
agiPanel- The parent agi panel.userObject- The context manager to wrap.
-
-
Method Details
-
getName
Gets the human-readable display name for this node.Implementation details: Returns the localized "History" label for the conversation branch.
- Specified by:
getNamein classAbstractContextNode<ContextManager>- Returns:
- The name to be displayed in the tree.
-
getIcon
Gets an optional icon for this node by delegating to theIconProviderconfigured in the agi session.Implementation details: Returns the standard
PulseIconto visualize the live conversation feed.- Overrides:
getIconin classAbstractContextNode<ContextManager>- Returns:
- The icon, or null if no specialized icon is available.
-
getDescription
Gets a detailed description of the node's purpose or content.Implementation details: Explains the contents of the history branch, spanning messages from all actors and tool interactions.
- Specified by:
getDescriptionin classAbstractContextNode<ContextManager>- Returns:
- The description string.
-
fetchChildObjects
Fetches the current list of domain objects that should be represented as children of this node.Implementation details: Retrieves the full list of
AbstractMessages from the context manager's memory.- Specified by:
fetchChildObjectsin classAbstractContextNode<ContextManager>- Returns:
- A list of domain objects.
-
createChildNode
Creates a new child node for the given domain object.Implementation details: Transforms each
AbstractMessagein the timeline into a navigableMessageNode.- Specified by:
createChildNodein classAbstractContextNode<ContextManager>- Parameters:
obj- The domain object to wrap.- Returns:
- A new AbstractContextNode, or null if the object type is not supported.
-
calculateLocalTokens
protected void calculateLocalTokens()Calculates the token counts for this node's own content (excluding children).Implementation details: Token counts for history are entirely aggregated from the constituent message nodes.
- Specified by:
calculateLocalTokensin classAbstractContextNode<ContextManager>
-
isActive
public boolean isActive()Checks if the underlying domain object is currently active in the context.Subclasses override this method to define their specific active-state policy, allowing for clean, polymorphic evaluation without dirty instanceof chains.
- Specified by:
isActivein classAbstractContextNode<ContextManager>- Returns:
trueif active,falseotherwise.
-
updateStatus
protected void updateStatus()Updates the status string for this node.Implementation details: Updates the status with a count of the current message stack depth.
- Specified by:
updateStatusin classAbstractContextNode<ContextManager>
-

