feat(cli): add Pi session support - #310
Open
NihaalManaf wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds Pi Coding Agent as a session source. The provider discovers
~/.pi/agent/sessions/**/*.jsonl, honors Pi's documented directory overrides, and normalizes prompts, assistant responses, thinking, tool calls/results, errors, compactions, token usage, and exact recorded costs.It also adds Pi to CLI filters, telemetry detection, doctor validation, dashboard labels/colors, and user-facing documentation.
Type of change
Related issue
Closes #309
Test plan
pnpm test— 587 tests passpnpm build— no build errorsReal-data validation discovered and parsed 405 Pi session files. The existing trivial-session filter imported 392 sessions and 45,620 messages. Database validation found globally unique message IDs and no session/message count mismatches. The dashboard, Pi source filter, stats, API response, and doctor provider check all worked.
Notes for reviewer
[Image]; base64 image payloads are not copied into SQLite.