Skip to content

Commit

Permalink
Open-source extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gencay committed Mar 18, 2023
0 parents commit 8fb62af
Show file tree
Hide file tree
Showing 48 changed files with 29,012 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🐞 Bug Report
description: Create a bug report
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for using the extension and taking the time to fill out this bug report!
- type: textarea
attributes:
label: Describe the Bug
description: A clear description of what the bug is. Please make sure to list steps to reproduce your issue. Please share your OS, VS Code details as well. You could details of your VS Code via (Help->About)
placeholder: |
- Steps to reproduce the bug
- ...
- OS and version: [i.e. macOS Ventura (version 13)]
- VS Code details: [i.e. 1.76.0]
validations:
required: true
- type: textarea
attributes:
label: "Please tell us if you have customized any of the extension settings or whether you are using the defaults."
description: Please list whether you use `Browser Auto-login` or `OpenAI API Key` method. Which model you are using i.e. `gpt-3.5-turbo` and the parameters you may have customized in your settings. You could find all of the customized settings in your `Settings.json`
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here. Please provide screenshots or screen recordings if possible.
validations:
required: false
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/2.feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 💡 Feature Request
description: Suggest an idea
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for using the extension and considering suggesting an idea
- type: textarea
attributes:
label: Describe the feature
description: What would you like to see added / supported?
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💭 Join the Discord
url: https://discord.gg/GuEdNDHQaM
about: Ask questions and discuss with other community members
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
out
dist
node_modules
.vscode-test/
*.vsix
!node_modules/chatgpt/build/index.js
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"connor4312.esbuild-problem-matchers"
]
}
34 changes: 34 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
36 changes: 36 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"files.exclude": {
"out": false
},
"search.exclude": {
"out": true
},
"typescript.tsc.autoDetect": "off",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
"javascript.format.semicolons": "insert",
"typescript.format.semicolons": "insert",
"javascript.preferences.quoteStyle": "double",
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"typescript.preferences.quoteStyle": "double",
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch",
},
{
"type": "npm",
"script": "build",
"group": "build",
"problemMatcher": "$esbuild",
"label": "npm: build",
}
]
}
16 changes: 16 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.vscode/**
.vscode-test/**
node_modules/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
images/**
temp/**
!images/ai-logo.jpg
!images/openai-logo.svg
chatgpt-4.7.2
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--ignore-engines true
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2022, Ali Gençay

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<p>
Hi everyone - Thank you for your interest in this extension.

Unfortunately, with a sad heart, we made the hard decision to remove the extension from marketplace and discontinue this project for various reasons:

</p>
<ul>
<li>We were made aware that the extension was being used by some people, against its terms of use in the Disclaimer section and eventually violating OpenAI's <a href="https://openai.com/policies/terms-of-use">Terms of Use (c) Restrictions</a> via the Browser Autologin method. Such issues take the fun out of such hobby project, breaking its original motto 'Your best AI pair programmer'. We do not wish this extension to be affiliated with any such behaviour from now on.</li>
<li>Unfortunately, vs-code marketplace doesn't have a feature to <a href="https://github.com/microsoft/vsmarketplace/issues/235">remove previous versions</a>. Even if we unpublish the extension, old versions were going to remain online. We have no intention of providing such feature within this product any longer. If being able to remove old versions completely was an option, we would have definitely kept the extension alive since we know so many people love this extension and it became one of their daily interfaces to AI.</li>
<li>People were confusing this product to be official - though it's mentioned in every documentation possible that, it's only a hobby project that is developed with a couple hours per month/week without any affiliation to OpenAI. The designs(OpenAI logo + svg) remained from the earlier days as-is to keep the amateur, completely free-to-use, seamless integration feeling, which was one of the reasons that led people think it was official. Though most chatgpt tools/integrations, all around the stores(not only limited to vs-code) used the similar identities. It was a mistake huge mistage on our end to keep the OpenAI logos, ChatGPT identity since the beginning, and we apologize for any misunderstandings. However, we must note that **it has been never our intention to gain popularity with it nor capitalize on this.**</li>
<li>We put so much effort and sleepless nights in the beginning of the project to provide a seamless AI experience within vs-code, when GPT models were not as widespread as today. And from the testimonials we see, we know we achieved our goal to help you level up your developer experience.</li>
<li>---</li>
<li>You can download and run the project locally. The instructions to run it will be appended below.</li>
<li>**The Browser Autologin feature will not be published on this repository due to reasons listed above** to prevent from further Terms of Use violations. If you would like to use ChatGPT on web, please use the official web page to comply with the OpenAI's terms of use. We no longer want to be associated with it or provide a way to people to exploit the motto of this open source code. The rest of the code remained as-is with minimal changes for you to run the code out-of-the-box from this repository.</li>
<li>The source code will remain on the repo for a while so that people could learn from how this extension worked and ses what it did internally. Open sourcing the project has been the ultimate goal for us instead of trying to monetize this product.</li>
<li>---</li>
<li>Our sincere apologies to all, who believed in the future of this product and to those who improved their coding skills within their most loved IDE using the power of OpenAI technologies.</li>
<li>---</li>
<li>There are so many amazing projects on Visual Studio Code marketplace, which does the same job, that you could try out.</li>
<li>This extension was the most loved tool in the recent weeks for a reason. If you are interested in continuing the mission, feel free to do so using its source code. Let us know how it goes!</li>
<li>We will never publish this extension in any form to public again, but the source code is yours to use however you'd like.</li>
</ul>

### How to run

- Clone the repository to your local machine
- On the root directory, run `yarn` command to install the dependencies listed in `package.json`
- Within VS Code - run the project by simply hitting F5.
- You could also create a 'vsix' package from the source-code and <a href="https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix">install manually</a>.
Loading

0 comments on commit 8fb62af

Please sign in to comment.