Would be nice if the copilot would also help in code refactoring work #10114
-
This would increase the effectiveness of the Copilot even more as in only creating code but also deleting it and replacing it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
There needs to be a feature to make prompt templates, e.g.
So you would select a piece of code, enter your prompt, and we can cycle through ways to rewrite the original code that the model spat out. You can do a LOT with this, like "remove the error checking" and it will work 99% of the time if it's self-documenting and everything. Game-changing, in many ways, I can't imagine what the community would come up with. It can fix exceptions and non-compiling code as well, "Rewrite the code to fix <COMPILE_ERROR>". Some times it needs to be started with the first couple of words of the original code. You can probably even direct its attention by summarizing data into a pseudocode context block, like the code in external files, but telling only the symbol names with pseudocode:
|
Beta Was this translation helpful? Give feedback.
-
Copilot labs is not avaliable now. |
Beta Was this translation helpful? Give feedback.
There needs to be a feature to make prompt templates, e.g.
So you would select a piece of code, enter your prompt, and we can cycle through ways to rewrite the original code that the model spat out. You can do a LOT with this, like "remove the error checking" and it will work 99% of the time if it's self-documenting and everything. Game-changing, in many ways, I can't imagine what the community would come up with. It can fix exceptions and non-compiling code as well, "Rewrite the code to fix <COMPILE_ERROR>".
Some times it needs to be started with the first couple of words of the original code.
You can probably even direct …