stuhlmueller / gpt.el

A simple Emacs package for calling instruction-following language models
MIT License
68 stars 10 forks source link

Copilot-like features #20

Open AnselmC opened 3 weeks ago

AnselmC commented 3 weeks ago

I think it'd be great if we'd have copilot-like features in emacs. Is this something you'd like to be part of gpt.el or do you want to keep its scope limited to a chat-interface?

I briefly hacked the following together and would either create a PR here or create a separate package for this:

copilot

stuhlmueller commented 3 weeks ago

Depends on how simple and general the implementation is - hoping to keep this package pretty small. There are already lots of other complex emacs packages around gpt usage. Not tied to the chat interface though.

AnselmC commented 3 weeks ago

Ok. Created a draft here: https://github.com/stuhlmueller/gpt.el/pull/21 Let me know if this would fit or not

stuhlmueller commented 2 weeks ago

Thank you - haven't had time to review yet, but in the meantime another related feature that came to mind that could be useful is inline transformations. You select a region, press a button, enter an instruction, and it inserts the LLM-transformed region into the current buffer as a preview, asking you to accept/reject.

AnselmC commented 2 weeks ago

Yeah that sounds like a cool feature, I'll give it a try :)

I've been also experimenting with having a single gpt-dwim command that lets you choose between Chat and Complete (could easily add Transform). And if you give it a prefix you can set some parameters: gpt-dwim:

image

C-u + gpt-dwim:

image image image
AnselmC commented 2 weeks ago

something like this?

https://github.com/user-attachments/assets/2529a525-1813-4ced-a78f-15f5c98bdb5e