Expand description
experimental/pi-session-view.ts: Pi’s read-side views (tree, context messages, last assistant text, stats)
over a format-4 session converted to Pi entries ([super::pi_view]), with the shapes and numbers Pi reports.
Functions§
- entries
- The entries, without the header, in session order.
- fork_
messages get_fork_messages: every user message entry (any branch) with its text, when it has text.- last_
assistant_ text getLastAssistantText(): the newest assistant message that is not an empty abort, its text blocks joined.- messages
- Pi’s
session.messages: the model context at the leaf. - stats
getSessionStats(): totals over every entry, compacted and abandoned history included.- tree
- Pi’s
getTree():{entry, children, label?, labelTimestamp?}nodes.