-
Notifications
You must be signed in to change notification settings - Fork 80
/
package.json
276 lines (276 loc) · 8.15 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
{
"name": "chatgpt",
"displayName": "ChatGPT: write and improve code using AI",
"description": "Use ChatGPT and GPT4 right inside the IDE to enhance and automate your coding with AI-powered assistance (unofficial)",
"version": "1.1.2",
"publisher": "timkmecl",
"icon": "resources/extensionIcon.png",
"license": "MIT",
"repository": {
"url": "https://github.com/timkmecl/chatgpt-vscode"
},
"engines": {
"vscode": "^1.73.0"
},
"categories": [
"Other"
],
"keywords": [
"chatgpt",
"openai",
"gpt3",
"gpt4",
"copilot",
"ai",
"explain",
"find bugs",
"explain ",
"refactor"
],
"activationEvents": [
"onView:chatgpt.chatView",
"onCommand:chatgpt.ask",
"onCommand:chatgpt.explain",
"onCommand:chatgpt.refactor",
"onCommand:chatgpt.optimize",
"onCommand:chatgpt.findProblems",
"onCommand:chatgpt.documentation"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "chatgpt.ask",
"title": "Ask ChatGPT"
},
{
"command": "chatgpt.explain",
"title": "ChatGPT: Explain selection"
},
{
"command": "chatgpt.refactor",
"title": "ChatGPT: Refactor selection"
},
{
"command": "chatgpt.findProblems",
"title": "ChatGPT: Find problems"
},
{
"command": "chatgpt.optimize",
"title": "ChatGPT: Optimize selection"
},
{
"command": "chatgpt.documentation",
"title": "ChatGPT: Write documentation"
},
{
"command": "chatgpt.resetConversation",
"title": "Reset ChatGPT conversation"
},
{
"command": "chatgpt.tryAgain",
"title": "Retry ChatGPT request"
}
],
"menus": {
"editor/context": [
{
"command": "chatgpt.ask",
"when": "editorTextFocus",
"group": "chatgpt-menu-group@1"
},
{
"command": "chatgpt.explain",
"when": "editorHasSelection",
"group": "chatgpt-menu-group@2"
},
{
"command": "chatgpt.refactor",
"when": "editorHasSelection",
"group": "chatgpt-menu-group@3"
},
{
"command": "chatgpt.findProblems",
"when": "editorHasSelection",
"group": "chatgpt-menu-group@4"
},
{
"command": "chatgpt.optimize",
"when": "editorHasSelection",
"group": "chatgpt-menu-group@5"
},
{
"command": "chatgpt.documentation",
"when": "editorHasSelection",
"group": "chatgpt-menu-group@6"
}
],
"commandPalette": [
{
"command": "chatgpt.ask"
},
{
"command": "chatgpt.explain",
"when": "editorHasSelection"
},
{
"command": "chatgpt.refactor",
"when": "editorHasSelection"
},
{
"command": "chatgpt.findProblems",
"when": "editorHasSelection"
},
{
"command": "chatgpt.optimize",
"when": "editorHasSelection"
},
{
"command": "chatgpt.documentation",
"when": "editorHasSelection"
},
{
"command": "chatgpt.resetConversation"
}
]
},
"viewsContainers": {
"activitybar": [
{
"id": "chatgpt",
"title": "ChatGPT",
"icon": "resources/icon.png"
}
]
},
"views": {
"chatgpt": [
{
"type": "webview",
"id": "chatgpt.chatView",
"name": "ChatGPT"
}
]
},
"configuration": {
"title": "chatGPT",
"type": "object",
"properties": {
"chatgpt.apiKey": {
"markdownDescription": "OpenAI API key from [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)",
"type": "string",
"order": 0
},
"chatgpt.apiUrl": {
"markdownDescription": "OpenAI API URL or other custom API URL. Defaults to [https://api.openai.com/v1](https://api.openai.com/v1)",
"type": "string",
"default": "https://api.openai.com/v1",
"order": 1
},
"chatgpt.model": {
"type": "string",
"enum": [
"gpt-3.5-turbo",
"gpt-4"
],
"default": "gpt-3.5-turbo",
"description": "Which GPT model to use",
"order": 1
},
"chatgpt.pasteOnClick": {
"type": "boolean",
"default": true,
"description": "Paste the code from a codeblock inside the response into the editor when you click on it",
"order": 2
},
"chatgpt.promptPrefix.explain": {
"type": "string",
"default": "Explain what this code does: ",
"description": "The prompt prefix used for explaining the selected code",
"order": 3
},
"chatgpt.promptPrefix.refactor": {
"type": "string",
"default": "Refactor this code and explain what's changed: ",
"description": "The prompt prefix used for refactoring the selected code",
"order": 4
},
"chatgpt.promptPrefix.findProblems": {
"type": "string",
"default": "Find problems with the following code, fix them and explain what was wrong (Do not change anything else, if there are no problems say so): ",
"description": "The prompt prefix used for finding problems in the selected code",
"order": 5
},
"chatgpt.promptPrefix.documentation": {
"type": "string",
"default": "Write documentation for the following code: ",
"description": "The prompt prefix used for writing documentation for the selected code",
"order": 7
},
"chatgpt.promptPrefix.optimize": {
"type": "string",
"default": "Optimize the following code if there is anything to improve, if not say so: ",
"description": "The prompt prefix used for optimizing the selected code",
"order": 6
},
"chatgpt.keepConversation": {
"type": "boolean",
"default": true,
"description": "Keep the conversation going by using the same conversation ID for all requests (allows follow-up questions)",
"order": 8
},
"chatgpt.timeoutLength": {
"type": "number",
"default": "120",
"description": "How long should the request wait for a response before timing out (in seconds)",
"order": 9
},
"chatgpt.selectedInsideCodeblock": {
"type": "boolean",
"default": true,
"description": "Append selected code as a codeblock (```...code...```) instead of plain text",
"order": 10
},
"chatgpt.codeblockWithLanguageId": {
"type": "boolean",
"default": true,
"description": "Append language id of the selected code to the codeblock (```language...code...```)",
"order": 11
}
}
}
},
"scripts": {
"vscode:prepublish": "yarn run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "yarn run compile-tests && yarn run compile && yarn run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"update-package-lock": "npm install --package-lock-only"
},
"devDependencies": {
"@types/glob": "^8.0.0",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/vscode": "^1.73.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"@vscode/test-electron": "^2.2.0",
"eslint": "^8.28.0",
"glob": "^8.0.3",
"mocha": "^10.1.0",
"ts-loader": "^9.4.1",
"typescript": "^4.9.3",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0"
},
"dependencies": {
"chatgpt": "^5.2.2",
"gpt3-tokenizer": "^1.1.5",
"node-fetch": "^3.3.0"
}
}