codereview.gpt
codereview.gpt copied to clipboard
Basics of prompt modification in popup - #22
The attached code enables basic prompt modification when running the extension.
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.
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.
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.
Cool. Let me test it
When pressing run or run again in the modal, it does not switch back to the output of ChatGPT
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.