gencay / vscode-chatgpt Goto Github PK
View Code? Open in Web Editor NEWAn unofficial Visual Studio Code - OpenAI ChatGPT integration
License: ISC License
An unofficial Visual Studio Code - OpenAI ChatGPT integration
License: ISC License
Another question, @gencay: Interacting with the extension in the left side pane feels awfully crammed. Can I have the extension interact in the main pane?
Since some region is blocked by openai, maybe add a proxy config to let all the traffic using a proxy?
Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.
An error occurred. If the issue persists try 'ChatGPT: Clear session.'
I get the above error codes. I've refreshed and cleared many times.
With the auto-login settings, can you add the isGoogleLogin
option, from the chatgpt-api?
From chatgpt-api readme:
Alternatively, if your OpenAI account uses Google Auth, you shouldn't encounter any of the more complicated Recaptchas — and can avoid using these third-party providers. To use Google auth, make sure your OpenAI account is using Google and then set isGoogleLogin to true whenever you're passing your email and password. For example:
const api = new ChatGPTAPIBrowser({ email: process.env.OPENAI_EMAIL, password: process.env.OPENAI_PASSWORD, isGoogleLogin: true })
The captcha is already in the human mouse pointer movement. If you auto-fill it by machine, it triggers another harder graphical captcha (since mouse-captcha failed), and also need to click "Next".
It's faster (and less disrupting) to just do 2 clicks :)
Hi,
I tried building the extension from source but I saw the version in package.json was still on v1.6.2 instead of the v2.5.1 like on the VSCode marketplace. When building with the old package.json I got a Node <= 18 error, so I had to manually extract it from the gencay.vscode-chatgpt-2.5.1.vsix to run it properly.
Nevertheless, the login button does not appear for me.
My guess is that ./src/chatgpt-view-provider.ts and ./src/extension.ts are outdated too, or am I missing something here? Can we get the latest source files that correspond with v2.5.1?
ps. Similar issue pertains for v2.0.0 in Releases for me.
pps. Wonderful code btw!
When code execution fails, it could automatically take the error message & traceback and ask GPT to suggest a fix. Could be a setting to toggle this to run automatically or have it manually triggered on demand.
Would be a great alternative to just asking what's wrong with a piece of code.
Hey. Thank you very much for this really good made extension.
Unfortunately I don't know, how to make it work with remote workspace with a extension "Remote - SSH". Is there any chance to fix this? Maybe it would be enough to set your extension to run only from the local machine in order to have access to the local browser when connected to the remote workspace. At the moment it forces me to install and activate your extension on my remote server (via Remote - SSH) without the ability to use it only from the local machine.
I hope this is somehow possible, because it's the only thing that makes it impossible for me to use it at the moment...
Thank you. ;)
I have several suggestions:
Allow us to use the API key which is consistent and how we are supposed to use the ChatGPT API.
Example of curl using the api
curl https://api.openai.com/v1/completions \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer [api-key]" \
-d '{
"model": "text-davinci-003",
"prompt": "$query",
"max_tokens": 4000,
"temperature": 0.9
REFERENCE: https://beta.openai.com/docs/api-reference/authentication
Use the official OpenAI API to generate code or natural language responses from OpenAI's GPT3/GPT3.5 to your questions, right within the editor
I think currently only Mac and Windows are supported. Can you add support for Linux as well? For example, a browser can be run on Linux like this: /usr/bin/firefox. Thank you in advance.
I am able to log in, and send "regular" messages and get responses, but when I try to run stuff such as optimizing code, explaining code or make unit tests, I always get the same error :
"An error occured. If this issue persists please clear your session token with ChatGPT: Reset session
command. As a last resort try restarting your VS-Code and retry logging in. Error: SyntaxError: Unexpected non-whitespace character after JSON at position 4"
When I go onto the created window, I actually can see that the conversation was created and ChatGPT did answer.
I tried restarting, re logging many, many times and at different times, but I always get this error.
Please stop using an unofficial API.
Hi!
After every question I need to redo the login process due to 429 error - when starting chrome it doesn't open up my default login so I need to redo my whole google login process again.
Is there any way to fix this? I've tried to remove all users from chrome in order to make my gmail account default but it still just opens up as a new login
Can I make the extension work with other browsers, e.g., Edge?
Options to add multiple code prompts
Right now, you have to press "Ask" using the mouse. Would be nice if you can press enter to send the message, and use shift+enter to add new lines, just like the message box on chat.openai.com works.
Another suggestion is to keep the current behavior but send the message using shift+enter.
This is incredibly useful for correcting mistakes but also as a form of retrying when the bot fails to respond.
Can we store the session information globally so that all VS Code windows have access to the same session?
EDIT: I looked into the code and it looks like it already uses the global state but for me if i open another window it still opens chrome again perhaps there is another issue somewhere?
Limit to Request 1 request per 45 seconds ?
I noticed that when the browser launches to log in I get the warning: "You are using an unsupported command-line flag: --no-sandbox. Stability and security will suffer".
I've always understood this to be a very bad thing for security. I imagine this is necessary for the authentication functionality to work? I'd appreciate it if someone could expound on why that is.
Might it make sense to put a warning about this in the README/docs? Maybe its fine if you just use that browser instance for ChatGPT only, but it might be helpful to inform users to make sure they don't do anything else in that window unless they're feeling very lucky. =)
Thanks folks!
Great extension!
I have one feature request as I keep copying and pasting the content of the chat to markdown file - it would be great to be able to save entire content of the chat to a markdown file.
API authorization method
I realized the ChatGPTAPI error 429 happens quite often from within extension - usually after previous timed out request. It rarely happens from the Web UI.
Usually the fix is reloading window (VS Code) - so it doesn't seem that it really is error 429 - does it cache the error?
I entered the API Key in the settings and chose it as the method and even after restarting the session and reopening the application itself I am getting the following error:
An error occurred. If this issue persists please clear your session token with ChatGPT: Reset session command and/or restart your Visual Studio Code. If you still experience issues, it may be due to outage on https://openai.com/ services.
It seems like the extension is resetting the conversation between every question. Is it possible to have the same behavior as the web based chat has, where you can ask follow up questions?
So there is an issue with ChatGPT which is due to character cap it often stops the code in the middle, sometimes in the middle of the line. In which case we have to ask it to continue and repeat the missing lines.
Would make life a lot easier if this would be possible to implement and we could copy/paste just one big code section instead of trying to merge and rewrite code parts from 2+ consecutive responses.
Thanks!
Awesome job on this extension, especially solving the authentication issues 🎉
My workflow for ChatGPT is to highlight a block of code and then ask it something usually very specific, either to make a change or to explain one very specific thing. So I only rarely use the default prompts.
Currently in this extension I have to paste the context into the 'Ask anything'. Ideally it would include highlighted code.
as title, query is still slow, so it would be great to send notification when it response
I use Google Chrome and my Google account to authenticate. However, with each new session, my auth got reset. Google Chrome launched as a brand new browser. Is there any fix for this?
The conversation window should show syntax highlighting of code blocks.
Also, thanks for a great extension!
Each time a response is received, the conversation window should scroll to the bottom
Unrelated to this issue: I know I am spamming issues right now, but I think it's wise to have them as separate issues instead of a big one. I am definitely willing to look at some of these and contribute, but would like to know your opinions first.
When opening a browser in a dev container, the error Unable to login. Make sure to login and keep your browser open. This error may also be due to OpenAI servers down or that it's throttling the requests. Error: Error Failed to launch the browser process !spawn /opt/yandex/browser/yandex-browser ENOENT TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
. If you install it in the "Chrome" container, then it swears on the X server. Maybe somehow you can make it so that when the browser leaves the dev container, the browser is in the system, and not in the container?
When I click login, it shows:
ChatGPT is at capacity right now
[Get notified when we're back]
Set my Chromium path to /mnt/c/Program Files/Google/Chrome/Application/chrome.exe
, and after hitting login button I get:
I believe in such case tmp path should be on mounted C drive, maybe make it configurable?
I do realize it might be an exotic way to use VS Code for you, but it's the only way I use it and your extension seems to be the only way to use ChatGPT from inside VS Code at all :P
I keep getting "An error occured. If this issue persists please clear your session token with ChatGPT: Reset session
command. As a last resort try restarting your VS-Code and retry logging in. Error:Error Request failed with status code 400"
Done reset session, retry, exit vscode, changing keys, no avail.
We’re using Gitpod for development, and it uses VS Code Browser.
You can’t install directly Plugins from the Microsoft VSCode marketplace. Instead, you need to install the Plugins from the Open VSX Registry. For that to work, the Plugin creator, need to publish their Plugin to this Open source registry.
The publishing seems quite easy - the only thing is, you need to create an account there to publish: Publishing Extensions · eclipse/openvsx Wiki · GitHub
Github Action: GitHub - HaaLeo/publish-vscode-extension: GitHub action to publish your VS Code Extension to the Open VSX Registry or Visual Studio Marketplace.
In addition to:
I'd like to be able to select a block of code, and ask ChatGPT to add comments to the code, via the right-click context menu.
Or better yet, in the extension options, allow for the user to add their own prompts.
I know the workaround is just to edit one of the defaults to send a different prompt, but it would be nicer to have the option to customize all the prompts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.