diff --git a/README.md b/README.md index 4503eea..f02b2be 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,11 @@ This Visual Studio Code extension allows you to use the [unofficial ChatGPT API](https://github.com/transitive-bullshit/chatgpt-api) to generate natural language responses from OpenAI's [ChatGPT](https://chat.openai.com/chat) to your questions, right within the editor. + ### [Marketplace](https://marketplace.visualstudio.com/items?itemName=timkmecl.chatgpt), [Github](https://github.com/timkmecl/chatgpt-vscode) +Refactoring selected code using chatGPT + ## Features - Ask general questions or use code snippets from the editor to query ChatGPT - View its responses in a panel next to the editor @@ -34,13 +37,17 @@ Once you have obtained a session token, you can configure the extension to use i ## Using the Extension - To use the extension, open a text editor in Visual Studio Code and open the ChatGPT panel by clicking on the ChatGPT icon in the sidebar. This will open a panel with an input field where you can enter your prompt or question. By clicking enter, it will be sent to ChatGPT. Its response will be displayed below the input field in the sidebar (note that it may take some time for it to be calculated). +Writing new code using chatGPT + You can also select a code snippet in the editor and then enter a prompt in the side panel, or right-click and select "Ask ChatGPT". The selected code will be automatically appended to your query when it is sent to the AI. This can be useful for generating code snippets or getting explanations for specific pieces of code. +Refactoring selected code using chatGPT + To insert a code snippet from the AI's response into the editor, simply click on the code block in the panel. The code will be automatically inserted at the cursor position in the active editor. +chatGPT explaining selected code --- Please note that this extension is currently a proof of concept and may have some limitations or bugs. We welcome feedback and contributions to improve the extension. diff --git a/examples/create.png b/examples/create.png new file mode 100644 index 0000000..758d621 Binary files /dev/null and b/examples/create.png differ diff --git a/examples/explain.png b/examples/explain.png new file mode 100644 index 0000000..66da169 Binary files /dev/null and b/examples/explain.png differ diff --git a/examples/refactor.png b/examples/refactor.png new file mode 100644 index 0000000..21c01a5 Binary files /dev/null and b/examples/refactor.png differ