View git diffs and re-prompt the agent. Invoke with /git.
This shows your modified files according to git status. You can:
- select some files and stage a
gitcommand with them - press
dto enter the diff viewer
Press l from the modified-file list or the clean-tree prompt to browse the latest 100 commits. The right panel shows the selected commit's added and removed line totals and changed files. Use ↑/↓ to select a commit, d/u to page, g to return to the top, and Enter to view that commit's patch. Escape returns from the patch to the log, then returns to the modified-file list or exits /git from the clean-tree log.
Quickly page through a diff and tell the agent how dumb it is. Two panes: a diff viewer and a prompt editor.
─────────────────────────────────────────────────────────────────────────────────────────────────────
Diff (ws hidden) │ extensions/git/README.md│ ▶ Prompt
─────────────────────────────────────────────────────────────────│═══════════════════════════════════
diff --git a/extensions/git/README.md b/extensions/git/README.md│extensions/git/README.md
index 98732cf6..bfdc10cd 100644 │
--- a/extensions/git/README.md │Really? No. Try it again.
+++ b/extensions/git/README.md │
@@ -11,14 +11,14 @@ This shows your modified files according ...│
│
## Diff viewer │
│
-View the diff and use another pane to ask `pi` for changes w...│
+Quickly page through a diff and tell the agent how dumb it i...│
│
### Features │
│
-- hide tests │
-- hide certain diffs like `package-lock.json` │
+- option: hide tests │
─────────────────────────────────────────────────────────────────────────────────────────────────────
enter send · opt+enter follow-up · \+enter newline · tab complete · ↑↓ history · ^C clear · esc ...
- syntax-highlighted diffs via delta (when installed)
- option: hide whitespace
- option: hide tests
- option: hide files on demand like
package-lock.json - jump to the next / previous file
- open the current file at the diff cursor's source line with
e - move the gutter cursor with
↑/↓, pressvto select lines, then presspto quote them with file line numbers and diff prefixes - full prompt editor with auto-completion and history
For example, if PIE_GIT_EDITOR="nvim --remote", pressing e on source line 12 invokes nvim --remote '/absolute/path/to/file:12'.
Install delta for syntax-highlighted diffs. When delta is on your PATH, the diff viewer uses it automatically. Without it, diffs fall back to git's built-in coloring.
The agent will suggest a commit message and you can edit it before committing.
Because adding selected files is difficult on the command line, this feature lets you write a command like git commit {} where {} is replaced with selected files. The command only runs after you press enter.
This is a pi extension. Run /pie-kumar303-config to install it.