feature: Public API for companion review plugins?

Aperta
#577 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
lua, neovim

Direzione di ricerca

This is an API design question, not a bug report. Start with the existing CodeDiffOpen, CodeDiffClose and CodeDiffFileSelect events and the public navigation functions the issue mentions, and check which of the three requested capabilities (reading the active comparison, jumping to a line or range, and a ready/refresh event) they already cover. Done means a maintainer decides the public surface, and the issue has no comments or decision yet, so wait for that before writing code.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I have a fork with AI summaries for what changed and why, plus line-by-line explanations of selected code. I'd like to move those into a separate companion plugin and add a guided review that walks through related changes in order, using CodeDiff as the diff viewer.

The main thing I'm trying to figure out is how to do that without depending on CodeDiff's internal modules. Right now my changes use session state, diff buffers, and refresh internals.

Would you be open to a small public API that lets a companion plugin:

  • Read the active comparison: repository, revisions, selected file, old/new buffers, and changed ranges.
  • Select a file and jump to a line or range on either side of the diff.
  • Get an event after the diff is ready or refreshed, so explanations can be updated or cleared when the code changes.

I saw the existing CodeDiffOpen, CodeDiffClose, and CodeDiffFileSelect events and the public navigation functions. Is there already a supported way to cover the rest, or would adding a few extension points make sense? Of course, I'm happy to help work on this api, I don't expect you to just do it for me.

The companion would handle the AI connection, prompts, explanations, and tour state. CodeDiff would handle displaying the diff. I'd like to get your thoughts on the approach before building more around the internals.

Lingua principale
Lua
Stelle
1.6k
Fork
104
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di esmuellert/codediff.nvim

Tutte le issue di esmuellert/codediff.nvim

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.