I wrote a VSCode extension that allows you to use ChatGPT within the context of your code You can click on code blocks to paste them into the editor, or use a selected code snippet as a reference. The extension is on GitHub if you want to check it out