Skip to content

FR: Generate code and refactor it at the same time? #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
spyro2000 opened this issue Mar 23, 2023 · 1 comment
Open

FR: Generate code and refactor it at the same time? #20

spyro2000 opened this issue Mar 23, 2023 · 1 comment

Comments

@spyro2000
Copy link

Hello,

loving this plugin. But the code generated by GPT is often very ugly. That's not really a big problem as I normally directly run the 'refactor' action of CodeGPT over it. I wonder if it might be possible to do that in one step:

  • Insert the generated code at the position of the cursor in the editor
  • Afer that, pass the code through GPT again to refactor it

Thank you! :)

@timkmecl
Copy link
Owner

timkmecl commented Apr 9, 2023

Hi, you can customize the prompts used for the actions in the settings, It may be possible to get the desired behaviour by just chaining the two instructions one after another, try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants