Skip to content

jkuball/pi-discuss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-discuss

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.

What it does

  • 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.

Usage

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.

Requirements

  • Tested on pi 0.69.x (nice), but probably works on way older versions.
  • git in $PATH.
  • $VISUAL or $EDITOR set to an editor command that waits for the file to close.

About

inline-answers for your clanker from the cozyness of your editor

Topics

Resources

License

Stars

Watchers

Forks

Contributors