codereview.gpt icon indicating copy to clipboard operation
codereview.gpt copied to clipboard

Basics of prompt modification in popup - #22

Open ryan-at-kettle opened this issue 1 year ago • 5 comments

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

ryan-at-kettle avatar Apr 12 '23 17:04 ryan-at-kettle

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

  • Allow configuration of default prompt parts in the extension configuration (this would enable language localization by users).
  • Allow specifying which prompt parts can be modified in the live modification popup in the settings panel.
  • Allow toggling of live modification and automatic runs in the popup in the settings panel.
  • Allow configurable variables in live and settings for things like language, the programming language version, and so on.

ryan-at-kettle avatar Apr 12 '23 17:04 ryan-at-kettle

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 avatar Apr 12 '23 19:04 ryan-at-kettle

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.

ryan-at-kettle avatar Apr 13 '23 00:04 ryan-at-kettle

Cool. Let me test it

nickveenhof avatar Apr 18 '23 08:04 nickveenhof

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.

nickveenhof avatar Apr 18 '23 08:04 nickveenhof