Expand description
ConversationProvider bridge: map Pi sessions to toolpath_convo::ConversationView.
Walks PiSession.entries in file order. Each Entry::Message becomes a
Turn; metadata-only entries like ModelChange / ThinkingLevelChange /
Label buffer and attach to the next message’s extra["pi"]. Compaction,
BranchSummary, Custom, and CustomMessage emit synthetic turns with
appropriate roles.
Tool-result correlation is a two-pass process: we record tool-call ids as
assistant turns are built, then in a second pass populate matching tool
invocations’ .result fields (and any sibling DelegatedWork.result).
Functions§
- session_
to_ view - Convert a PiSession into a provider-agnostic ConversationView.