Tiny pi extension for discussing the last assistant response by opening it in your external editor and sending only the resulting diff back to the model.
- finds the last completed assistant answer on the current branch
- opens that answer directly in your external editor (
$VISUAL/$EDITOR). - edits a tracked file inside a temporary git repo, so editor git integrations can highlight your changes while you write
- computes a compact unified diff with small context hunks
- populates the diff into your next prompt so you can quickly revise it before sending
The model sees only the touched parts plus a bit of surrounding context.
Use /discuss when it is your turn after the model yapped.
The last answer of the model will be opened in the editor of your choice, where you can give direct feedback to specific parts of the answer. You do not need a special annotation syntax. Just edit naturally.
Example:
This approach uses a cache in memory.
+Why not persist this to disk as well?-The API should retry forever.
+Retrying forever seems risky. Cap it and explain the failure mode.Then close the editor, revise and send.
- Tested on
pi0.69.x (nice), but probably works on way older versions. gitin$PATH.$VISUALor$EDITORset to an editor command that waits for the file to close.