feature: Public API for companion review plugins?

Đang mở
#577 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
15/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
lua, neovim
Lĩnh vực
api, developer-experience

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Lua
Star
1.6k
Fork
104
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của esmuellert/codediff.nvim

Tất cả issue của esmuellert/codediff.nvim

Issue tương tự

Thêm issue về Lua

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.