Idea:
- Select some code.
- Click/Press something to mark it as example.
- Select some other code and click/Press something to apply the pattern seen in the example to the code.
In general the point is to replace typing requests with UI. To be quicker than explaining to the AI “Use this as an example to apply to that”. It is a very common AI request for me that can be automated and also improved via better internal (hidden; maybe long) prompting.
Additional use cases:
Maybe in the clipboard I have code from the internet and I want to apply a pattern in my code to the one in the clipboard before/after pasting it.
Additional features:
Add some common settings like:
- (checkbox) follow only the style when applying the pattern, not the logic (it’s different in the new code) or vice versa. (then some magic prompting happens to squeeze the most out of the request)
- (checkbox) follow only the naming style of variables