-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.json
348 lines (348 loc) · 11.3 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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
{
"name": "quick-chatgpt",
"displayName": "Quick ChatGPT: Using ChatGPT to improve code quality",
"description": "Extension that allows you to use OpeanAI's ChatGPT inside the vscode",
"version": "0.7.0",
"publisher": "hqzhon",
"icon": "resources/extensionIcon.png",
"license": "MIT",
"repository": {
"url": "https://github.com/hqzhon/chatgpt-vscode-plugin"
},
"engines": {
"vscode": "^1.73.0"
},
"categories": [
"Other"
],
"keywords": [
"copilot",
"openai",
"chatgpt",
"ai",
"explain",
"find bugs",
"explain ",
"refactor"
],
"activationEvents": [],
"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.conversationId",
"title": "Set ChatGPT conversation ID"
},
{
"command": "chatgpt.resetConversation",
"title": "Reset ChatGPT conversation"
},
{
"command": "chatgpt.translate",
"title": "ChatGPT: Translate selection"
},
{
"command": "chatgpt.addComments",
"title": "ChatGPT: Comment selection"
},
{
"command": "chatgpt.clearHistory",
"title": "Clear History"
},
{
"command": "chatgpt.settings",
"title": "Settings"
}
],
"menus": {
"view/title": [
{
"command": "chatgpt.clearHistory",
"when": "view == chatgpt.chatView"
},
{
"command": "chatgpt.settings",
"when": "view == chatgpt.chatView"
}
],
"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.translate",
"when": "editorHasSelection",
"group": "chatgpt-menu-group@6"
},
{
"command": "chatgpt.addComments",
"when": "editorHasSelection",
"group": "chatgpt-menu-group@7"
}
],
"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.conversationId"
},
{
"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": {
"type": "string",
"markdownDescription": "chatgpt api key,[documentation](https://platform.openai.com/account/api-keys)",
"order": 1
},
"chatgpt.model": {
"type": "string",
"default": "gpt-3.5-turbo",
"enum": [
"gpt-3.5-turbo",
"gpt-4"
],
"markdownDescription": "OpenAI models to use for your prompts.[documentation](https://platform.openai.com/docs/models/models)",
"order": 2
},
"chatgpt.temperature": {
"type": "number",
"default": 0.3,
"markdownDescription": "What sampling temperature to use. Higher values means the model will take more risks. \n Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.[documentation](https://beta.openai.com/docs/api-reference/completions/create#completions/create-temperature) \n - 0: Get more precise answers \n - 0.5: Get more balanced answers \n - 0.9: Get more creative answers",
"order": 3
},
"chatgpt.top_p": {
"type": "number",
"default": 0.8,
"markdownDescription": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.[documentation](https://platform.openai.com/docs/api-reference/completions/create#completions/create-top_p)",
"order": 4
},
"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": 5
},
"chatgpt.promptPrefix.explain": {
"type": "string",
"default": "Explain what this code does: ",
"description": "The prompt prefix used for explaining the selected code",
"order": 6
},
"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": 7
},
"chatgpt.promptPrefix.findProblems": {
"type": "string",
"default": "Find problems with the following code, fix them and explain what was wrong (Do not change anything else): ",
"description": "The prompt prefix used for finding problems in the selected code",
"order": 8
},
"chatgpt.promptPrefix.optimize": {
"type": "string",
"default": "Optimize the following code: ",
"description": "The prompt prefix used for optimizing the selected code",
"order": 9
},
"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": 10
},
"chatgpt.timeoutLength": {
"type": "number",
"default": 60,
"description": "How long should the request wait for a response before timing out (in seconds)",
"order": 11
},
"chatgpt.selectedInsideCodeblock": {
"type": "boolean",
"default": true,
"description": "Append selected code as a codeblock (```...code...```) instead of plain text",
"order": 12
},
"chatgpt.maxTokens": {
"type": "number",
"default": 2048,
"markdownDescription": "⚠️ If you receive an HTTP 400 Bad Request, lower your maxTokens setting to allow completion to fulfill your request ⚠️ \n The maximum number of tokens to generate in the completion. Choose this number carefully considering the your preferred model's allowed max number of tokens.[documentation](https://platform.openai.com/docs/api-reference/completions/create#completions/create-max_tokens)",
"order": 13
},
"chatgpt.promptPrefix.translate": {
"type": "string",
"default": "Translate the following content into {0}, including code comments, excluding code logic and code print log info,and return markdown code format ",
"description": "The prompt prefix used for translate code",
"order": 14
},
"chatgpt.promptPrefix.translateLanguage": {
"type": "string",
"default": "中文 (Chinese)",
"enum": [
"العربية (Arabic)",
"বাংলা (Bengali)",
"Português (Portuguese)",
"中文 (Chinese)",
"Čeština (Czech)",
"Dansk (Danish)",
"Nederlands (Dutch)",
"English (English)",
"Suomi (Finnish)",
"Français (French)",
"Deutsch (German)",
"Ελληνικά (Greek)",
"עברית (Hebrew)",
"Magyar (Hungarian)",
"हिन्दी (Hindi)",
"Bahasa Indonesia (Indonesian)",
"Italiano (Italian)",
"日本語 (Japanese)",
"한국어 (Korean)",
"Bahasa Melayu (Malay)",
"Norsk (Norwegian)",
"فارسی (Persian)",
"Polski (Polish)",
"Русский (Russian)",
"Español (Spanish)",
"Svenska (Swedish)",
"ไทย (Thai)",
"Türkçe (Turkish)",
"Українська (Ukrainian)",
"Tiếng Việt (Vietnamese)"
],
"description": "Translate Language",
"order": 15
},
"chatgpt.promptPrefix.addComments": {
"type": "string",
"default": "Add comments for the following code,and only return comments and code with code format, return markdown code format",
"description": "The prompt prefix used for comment code",
"order": 16
}
}
}
},
"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"
},
"devDependencies": {
"@types/glob": "^8.0.0",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/uuid": "^9.0.0",
"@types/vscode": "^1.73.0",
"@types/vscode-webview": "^1.57.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"@vscode/test-electron": "^2.2.0",
"eslint": "^8.28.0",
"eventsource-parser": "^0.1.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-vscode": "^5.3.4",
"keyv": "^4.5.2",
"node-fetch": "^2.6.11",
"quick-lru": "^6.1.1",
"remark": "^14.0.2",
"strip-markdown": "^5.0.0",
"uuid": "^9.0.0"
}
}