Skip to content

v0.3.0

Choose a tag to compare

@heyhuynhgiabuu heyhuynhgiabuu released this 02 May 09:02
· 65 commits to main since this release

v0.3.0

This release adds a full interactive local Git review workflow to pi-diff, alongside the existing write/edit diff rendering.

Highlights

  • Added /review-diff, an interactive Pi TUI overlay for reviewing local Git changes.
  • Added keyboard-driven navigation across changed files, hunks, preview content, and drafted comments.
  • Added a fixed-height focused hunk preview with scroll position, selection marker, and page/home/end navigation.
  • Added line-anchored draft comments with edit, delete, approve, dismiss, approve-all, and submit flows.
  • Added live auto-refresh and manual refresh while the review overlay is open.
  • Added session persistence so reopening /review-diff restores the latest review state in the current Pi session.
  • Added review_git_diff, review_git_comment, and review_git_comments tooling for agent-readable, non-destructive markdown review context.
  • Added pi-diff-review CLI export for using the same Git review context outside Pi TUI.
  • Added /review-diff-agent prompt companion for text-based agent review.

New commands and tools

/review-diff
/review-diff --base main
/review-diff-agent
review_git_diff({})
review_git_diff({ base: "main" })
review_git_diff({ file: "src/index.ts" })
review_git_diff({ file: "src/index.ts", hunkId: "src/index.ts:10:12" })
review_git_comment({ file: "src/index.ts", line: 42, body: "This needs a regression test." })
review_git_comments({})
pi-diff-review
pi-diff-review --base main
pi-diff-review --raw

Review overlay controls

  • Tab cycles focus between files, hunks, preview, and comments.
  • ↑↓ / Ctrl+j / Ctrl+k navigate the focused region.
  • PageUp / PageDown page through the focused region or preview viewport.
  • Home / End jump to the start/end.
  • [ / ] jump between files.
  • o loads the selected file/line into Pi as review context.
  • y copies the selected file/line/hunk reference.
  • c, e, x create/edit/delete comments.
  • a, d, A approve/dismiss/approve-all comments.
  • r refreshes the diff.
  • s submits approved comments back to Pi.
  • Esc / q closes the overlay.

Other changes

  • Added structured Git diff parsing/model/session layers for review state.
  • Added markdown export support for changed files, hunk metadata, changed-line numbers, and raw diff inclusion.
  • Added screenshot asset and README documentation for the new review workflow.
  • Added broad test coverage for review commands, tools, Git parsing, export, model/session behavior, TUI navigation, and hunk/file previews.

Compatibility notes

  • review_git_diff is read-only and never stages, commits, reverts, discards, or edits files.
  • /review-diff is an extension command, not a prompt template. Pi resolves extension commands before prompt templates, so a prompt with the same name would be shadowed.

Full Changelog: v0.2.2...v0.3.0