chatgpt-vscode icon indicating copy to clipboard operation
chatgpt-vscode copied to clipboard

Upgraded to use chatgpt-api v1.0, no more need to log in to extension via browser

Open timkmecl opened this issue 1 year ago • 1 comments

The project is updated to use the new v1.4.0 version of the unofficil ChatGPT API. Therefore the authentication is no longer done by logging in via browser (which was a problem when used in wsl), but instead via obtaining a session token from ChatGPT and pasting it into VSCode extension settings, as described in the new README.md. The response from ChatGPT is displayed word by word as it is received, as on the website.

List of changes

  • chatgpt-api v1.4.0
  • Session token read from vsc settings for authentication
  • Response displayed word by word
  • Response remains in the panel even after closing and reopening
  • Error message displayed for invalid session token
  • README.md updated to reflect the new state, expanded
  • Added installation guide and instructions
  • Comments added to the code
  • When no active selection, only the query writen by the user is sent

timkmecl avatar Dec 05 '22 20:12 timkmecl

After the latest commit solves issues #1, #4 and #6.

timkmecl avatar Dec 06 '22 18:12 timkmecl

Thank you so much! Sorry that the PR took me some time to merge - I got sick basically right after tweeting about this repo 😅

mpociot avatar Dec 09 '22 00:12 mpociot