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, parent, ragTokens, status, userObjectModifier and TypeFieldDescriptionprotected final AgiPanelThe parent agi panel.protected List<AbstractContextNode<?>> The cached list of child nodes.protected intCached declaration token count (including children).protected intCached history token count (including children).protected intCached instruction token count (including children).protected AbstractContextNode<?> The parent node in the context tree hierarchy.protected intCached RAG token count (including children).protected StringCached status string.protected final ContextManagerThe underlying domain object. -
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
bubbleUpTotals, equals, getAgi, getChildren, getTreePath, hashCode, refresh, refreshData, refreshTokens, toStringModifier and TypeMethodDescriptionfinal voidRecalculates local tokens for this node, re-aggregates child totals, and bubbles the updated counts up through its ancestor chain without triggering a full-tree recalculation pass.booleanEquality is based on the underlying userObject and the node class.getAgi()Gets the parent agi session.final List<AbstractContextNode<?>> Gets the list of child nodes for this node.Constructs the Swing TreePath from the root down to this node.inthashCode()final voidrefresh()Refreshes the node's state, including its child list and token counts.final voidRecursively recalculates token counts and status for this node and its descendants.final voidDeprecated.toString()Returns the display name of the node.
-
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>
-


AbstractContextNode.refresh()instead for a unified update.