emacs-openai / codegpt

Use GPT-3 inside Emacs
GNU General Public License v3.0
88 stars 12 forks source link

Add custom user predefined actions (#2) #4

Closed Artawower closed 1 year ago

Artawower commented 1 year ago

I wonder how to use this patch? If you add (add-to-list 'codegpt-action-alist '("JSDoc" . "Write JSDoc for this method")), would it work?

Sure!

https://user-images.githubusercontent.com/16963833/216793251-4ad62c00-cf8d-4d82-89a4-d9cf4bc72331.mov

Artawower commented 1 year ago

BTW, do you think it is possible to format the provided code from openai? Because now it looks like a solid line without line breaks

jcs090218 commented 1 year ago

Sure!

👍

BTW, do you think it is possible to format the provided code from openai? Because now it looks like a solid line without line breaks

I think this is caused by

https://github.com/emacs-openai/codegpt/blob/46f73c641e27e1f8f20e7a509ba45691463ad408/codegpt.el#L81

We will need to by pass that operation to make the code remain untouch.

Artawower commented 1 year ago

Corrected the call of standard functions, there was an error with the extraction of the standard function due to unnecessary car-safe

jcs090218 commented 1 year ago

Code LGTM! Thanks!