sturdy-dev / codereview.gpt

Reviews your Pull/Merge Requests using ChatGPT
MIT License
529 stars 63 forks source link

Basics of prompt modification in popup - #22 #32

Open ryan-at-kettle opened 1 year ago

ryan-at-kettle commented 1 year ago

The attached code enables basic prompt modification when running the extension.

ryan-at-kettle commented 1 year ago

This is a very basic version of prompt modification. Next potential steps after merging:

ryan-at-kettle commented 1 year ago

It looks like the last prompt, "All code changes have been provided. Please provide me with your code review based on all the changes, context & title provided," is nudging the output more than expected.

This needs more work. I will be updating this again later.

ryan-at-kettle commented 1 year ago

Okay, this has been updated to allow the additional prompts and toggling of prompt inputs. I'm comfortable merging this now. Note that this does not maintain a prompt history and may frustrate users.

nickveenhof commented 1 year ago

Cool. Let me test it

nickveenhof commented 1 year ago

When pressing run or run again in the modal, it does not switch back to the output of ChatGPT

image

Personally I'd prefer these prompt to be in the same spot as the rest of the settings. Otoh I like the easy of access to those prompts. Another recommendation would be a pencil item in the prompts tab, some visual cue or a description so that it is clear that these prompts can be edited.

Additionally, it's not quite clear where it adds specific context from the PR/MR. I'd prefer to keep the replacement tokens in the text so that people can also play with those positions.