forked from vscode-reborn-ai/vscode-reborn-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
649 lines (649 loc) · 23.7 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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
{
"name": "chatgpt-reborn",
"publisher": "chris-hayes",
"displayName": "ChatGPT Reborn",
"icon": "images/ai-logo.jpg",
"description": "Refactor, improve, and debug your code with GPT-4. This is a fork of the now discontinued vscode-chatgpt extension.",
"version": "3.20.2",
"aiKey": "",
"license": "ISC",
"repository": {
"url": "https://github.com/christopher-hayes/vscode-chatgpt-reborn"
},
"engines": {
"vscode": "^1.70.0"
},
"categories": [
"Programming Languages",
"Machine Learning",
"Snippets",
"Education"
],
"keywords": [
"chatgpt",
"gpt",
"gpt3",
"gpt3.5",
"gpt4",
"openai",
"testing",
"find bugs",
"ai"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {
"menus": {
"editor/context": [
{
"group": "chatGpt",
"when": "editorHasSelection",
"submenu": "vscode-chatgpt.subMenu"
}
],
"vscode-chatgpt.subMenu": [
{
"command": "vscode-chatgpt.generateCode",
"group": "chatGpt@1",
"when": "editorHasSelection && generateCode-enabled"
},
{
"command": "vscode-chatgpt.addTests",
"group": "chatGpt@2",
"when": "editorHasSelection && addTests-enabled"
},
{
"command": "vscode-chatgpt.findProblems",
"group": "chatGpt@3",
"when": "editorHasSelection && findProblems-enabled"
},
{
"command": "vscode-chatgpt.optimize",
"group": "chatGpt@4",
"when": "editorHasSelection && optimize-enabled"
},
{
"command": "vscode-chatgpt.explain",
"group": "chatGpt@5",
"when": "editorHasSelection && explain-enabled"
},
{
"command": "vscode-chatgpt.addComments",
"group": "chatGpt@6",
"when": "editorHasSelection && addComments-enabled"
},
{
"command": "vscode-chatgpt.completeCode",
"group": "chatGpt@7",
"when": "editorHasSelection && completeCode-enabled"
},
{
"command": "vscode-chatgpt.adhoc",
"group": "chatGpt@8",
"when": "editorHasSelection && adhoc-enabled"
},
{
"command": "vscode-chatgpt.customPrompt1",
"group": "chatGpt@9",
"when": "editorHasSelection && customPrompt1-enabled"
},
{
"command": "vscode-chatgpt.customPrompt2",
"group": "chatGpt@10",
"when": "editorHasSelection && customPrompt2-enabled"
},
{
"command": "vscode-chatgpt.customPrompt3",
"group": "chatGpt@11",
"when": "editorHasSelection && customPrompt3-enabled"
},
{
"command": "vscode-chatgpt.customPrompt4",
"group": "chatGpt@12",
"when": "editorHasSelection && customPrompt4-enabled"
},
{
"command": "vscode-chatgpt.customPrompt5",
"group": "chatGpt@13",
"when": "editorHasSelection && customPrompt5-enabled"
}
]
},
"submenus": [
{
"id": "vscode-chatgpt.subMenu",
"label": "ChatGPT",
"group": "chatGpt"
}
],
"keybindings": [
{
"command": "vscode-chatgpt.generateCode",
"key": "ctrl+shift+a",
"mac": "cmd+shift+a",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.addTests",
"key": "ctrl+k ctrl+shift+1",
"mac": "cmd+k cmd+shift+1",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.findProblems",
"key": "ctrl+k ctrl+shift+2",
"mac": "cmd+k cmd+shift+2",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.optimize",
"key": "ctrl+k ctrl+shift+3",
"mac": "cmd+k cmd+shift+3",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.explain",
"key": "ctrl+k ctrl+shift+4",
"mac": "cmd+k cmd+shift+4",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.addComments",
"key": "ctrl+k ctrl+shift+5",
"mac": "cmd+k cmd+shift+5",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.completeCode",
"key": "ctrl+k ctrl+shift+6",
"mac": "cmd+k cmd+shift+6",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.adhoc",
"key": "ctrl+k ctrl+shift+7",
"mac": "cmd+k cmd+shift+7",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt1",
"key": "ctrl+k ctrl+shift+8",
"mac": "cmd+k cmd+shift+8",
"when": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt2",
"key": "ctrl+k ctrl+shift+9",
"mac": "cmd+k cmd+shift+9",
"when": "editorHasSelection"
}
],
"commands": [
{
"command": "vscode-chatgpt.freeText",
"title": "ChatGPT: Ask anything"
},
{
"command": "vscode-chatgpt.clearSession",
"title": "ChatGPT: Reset session"
},
{
"command": "vscode-chatgpt.generateCode",
"title": "ChatGPT-Codex: Generate code",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.addTests",
"title": "%vscode-chatgpt.addTests.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.findProblems",
"title": "%vscode-chatgpt.findProblems.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.optimize",
"title": "%vscode-chatgpt.optimize.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.explain",
"title": "%vscode-chatgpt.explain.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.addComments",
"title": "%vscode-chatgpt.addComments.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.completeCode",
"title": "%vscode-chatgpt.completeCode.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.adhoc",
"title": "%vscode-chatgpt.adhoc.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt1",
"title": "%vscode-chatgpt.customPrompt1.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt2",
"title": "%vscode-chatgpt.customPrompt2.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt3",
"title": "%vscode-chatgpt.customPrompt3.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt4",
"title": "%vscode-chatgpt.customPrompt4.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt5",
"title": "%vscode-chatgpt.customPrompt5.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.customPrompt6",
"title": "%vscode-chatgpt.customPrompt6.title%",
"enablement": "editorHasSelection"
},
{
"command": "vscode-chatgpt.clearConversation",
"title": "ChatGPT: Clear conversation"
},
{
"command": "vscode-chatgpt.exportConversation",
"title": "ChatGPT: Export conversation"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "vscode-chatgpt-view-container",
"title": "ChatGPT",
"icon": "images/openai-logo.svg"
}
]
},
"views": {
"vscode-chatgpt-view-container": [
{
"type": "webview",
"id": "vscode-chatgpt.view",
"name": "Conversation window"
}
]
},
"configuration": {
"title": "ChatGPT",
"properties": {
"chatgpt.gpt3.generateCode-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the code generation context menu item for the selected comment/code for Codex. Only available with code-* models",
"order": 7
},
"chatgpt.promptPrefix.addTests": {
"type": "string",
"default": "Implement tests for the following code",
"description": "The prompt prefix used for adding tests for the selected code",
"order": 8
},
"chatgpt.promptPrefix.addTests-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the prompt prefix used for adding tests for the selected code in the context menu",
"order": 9
},
"chatgpt.promptPrefix.findProblems": {
"type": "string",
"default": "Find problems with the following code",
"description": "The prompt prefix used for finding problems for the selected code",
"order": 10
},
"chatgpt.promptPrefix.findProblems-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the prompt prefix used for finding problems for the selected code in the context menu",
"order": 11
},
"chatgpt.promptPrefix.optimize": {
"type": "string",
"default": "Optimize the following code",
"description": "The prompt prefix used for optimizing the selected code",
"order": 12
},
"chatgpt.promptPrefix.optimize-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the prompt prefix used for optimizing the selected code in the context menu",
"order": 13
},
"chatgpt.promptPrefix.explain": {
"type": "string",
"default": "Explain the following code",
"description": "The prompt prefix used for explaining the selected code",
"order": 14
},
"chatgpt.promptPrefix.explain-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the prompt prefix used for explaining the selected code in the context menu",
"order": 15
},
"chatgpt.promptPrefix.addComments": {
"type": "string",
"default": "Insert code comments into the following code to make the code easier to follow",
"description": "The prompt prefix used for adding comments for the selected code",
"order": 16
},
"chatgpt.promptPrefix.addComments-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the prompt prefix used for adding comments for the selected code in the context menu",
"order": 17
},
"chatgpt.promptPrefix.completeCode": {
"type": "string",
"default": "Complete the following code",
"description": "The prompt prefix used for completing the selected code",
"order": 18
},
"chatgpt.promptPrefix.completeCode-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the prompt prefix used for completing the selected code in the context menu",
"order": 19
},
"chatgpt.promptPrefix.customPrompt1": {
"type": "string",
"default": "",
"description": "Your custom prompt. It's disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt",
"order": 20
},
"chatgpt.promptPrefix.customPrompt1-enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable the prompt prefix used for your custom prompt. The default value is empty, if you enable this item make sure to set this `chatgpt.promptPrefix.customPrompt1`",
"order": 21
},
"chatgpt.promptPrefix.customPrompt2": {
"type": "string",
"default": "",
"description": "Your custom prompt. It's disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt",
"order": 22
},
"chatgpt.promptPrefix.customPrompt2-enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable the prompt prefix used for your custom prompt. The default value is empty, if you enable this item make sure to set this `chatgpt.promptPrefix.customPrompt2`",
"order": 23
},
"chatgpt.promptPrefix.customPrompt3": {
"type": "string",
"default": "",
"description": "Your custom prompt. It's disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt",
"order": 24
},
"chatgpt.promptPrefix.customPrompt3-enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable the prompt prefix used for your custom prompt. The default value is empty, if you enable this item make sure to set this `chatgpt.promptPrefix.customPrompt3`",
"order": 25
},
"chatgpt.promptPrefix.customPrompt4": {
"type": "string",
"default": "",
"description": "Your custom prompt. It's disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt",
"order": 26
},
"chatgpt.promptPrefix.customPrompt4-enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable the prompt prefix used for your custom prompt. The default value is empty, if you enable this item make sure to set this `chatgpt.promptPrefix.customPrompt4`",
"order": 27
},
"chatgpt.promptPrefix.customPrompt5": {
"type": "string",
"default": "",
"description": "Your custom prompt. It's disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt",
"order": 28
},
"chatgpt.promptPrefix.customPrompt5-enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable the prompt prefix used for your custom prompt. The default value is empty, if you enable this item make sure to set this `chatgpt.promptPrefix.customPrompt5`",
"order": 29
},
"chatgpt.promptPrefix.customPrompt6": {
"type": "string",
"default": "",
"description": "Your custom prompt. It's disabled by default, please set to a custom prompt and enable it if you prefer using customized prompt",
"order": 30
},
"chatgpt.promptPrefix.customPrompt6-enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable the prompt prefix used for your custom prompt. The default value is empty, if you enable this item make sure to set this `chatgpt.promptPrefix.customPrompt6`",
"order": 31
},
"chatgpt.promptPrefix.adhoc-enabled": {
"type": "boolean",
"default": true,
"description": "Enable the prompt prefix used for adhoc command for the selected code in the context menu",
"order": 32
},
"chatgpt.gpt3.apiKey": {
"type": "string",
"default": "-",
"markdownDescription": "apiKey.",
"order": 33
},
"chatgpt.gpt3.apiBaseUrl": {
"type": "string",
"default": "https://api.openai.com/v1",
"markdownDescription": "Optional override for the OpenAI API base URL. If you customize it, please make sure you have the same format. e.g. starts with `https://` without a trailing slash. The completions endpoint suffix is added internally, e.g. for reference: `${apiBaseUrl}/completions`",
"order": 34
},
"chatgpt.gpt3.organization": {
"type": "string",
"markdownDescription": "OpenAI Organization ID. [Documentation](https://beta.openai.com/docs/api-reference/requesting-organization).",
"order": 35
},
"chatgpt.gpt3.model": {
"type": "string",
"enum": [
"gpt-4-0409-preview",
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"mistralai-mistral-7b-instruct-free",
"microsoft/wizardlm-2-8x22b",
"mistralai/mixtral-8x22b-instruct",
"meta-llama/llama-3-70b-instruct:nitro",
"anthropic/claude-3-haiku:beta"
],
"default": "gpt-3.5-turbo",
"markdownDescription": "OpenAI models to use for your prompts. [Documentation](https://beta.openai.com/docs/models/models). \n\n**If you face 400 Bad Request please make sure you are using the right model for your integration method.**",
"order": 36
},
"chatgpt.gpt3.maxTokens": {
"type": "number",
"default": 4000,
"markdownDescription": "NOTE - THIS CONFIG IS NOW DISABLED, and might be totally removed in the future. If you think this config setting should stay, please comment it in the GitHub repository that you find it useful.",
"order": 37
},
"chatgpt.gpt3.temperature": {
"type": "number",
"default": 1,
"markdownDescription": "What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.\n\nIt is recommended altering this or top_p but not both. [Documentation](https://beta.openai.com/docs/api-reference/completions/create#completions/create-temperature)",
"order": 38
},
"chatgpt.gpt3.top_p": {
"type": "number",
"default": 1,
"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. \n\nIt is recommended altering this or temperature but not both. [Documentation](https://beta.openai.com/docs/api-reference/completions/create#completions/create-top_p)",
"order": 39
},
"chatgpt.response.showNotification": {
"type": "boolean",
"default": false,
"description": "Choose whether you'd like to receive a notification when ChatGPT bot responds to your query.",
"order": 40
},
"chatgpt.response.autoScroll": {
"type": "boolean",
"default": true,
"description": "Whenever there is a new question or response added to the conversation window, extension will automatically scroll to the bottom. You can change that behavior by disabling this setting.",
"order": 41
},
"chatgpt.systemContext": {
"type": "string",
"default": "You are a helpful assistant.",
"description": "System context description. Use this to tell ChatGPT how to respond to the user."
},
"chatgpt.throttling": {
"type": "number",
"default": 100,
"description": "Stream throttling. Time in milliseconds between UI updates. Higher = ai responds in bigger chunks, but UI is more performant. Lower = ai responds in smaller chunks, but UI will look better, but is less performant. 0 will update the UI with every network request from OpenAI",
"order": 43
},
"chatgpt.minimalUI": {
"type": "boolean",
"default": false,
"description": "If enabled, the buttons below the question input field and the chat tab is hidden.",
"order": 44
},
"chatgpt.disableMultipleConversations": {
"type": "boolean",
"default": false,
"description": "If enabled, this will disable the ability to have multiple conversations at the same time. This reduces the UI clutter of chat tabs.",
"order": 45
},
"chatgpt.verbosity": {
"type": "string",
"enum": [
"code",
"concise",
"normal",
"full"
],
"default": "normal",
"description": "How verbose should ChatGPT's response be?",
"order": 46,
"enumItemLabels": [
"Code",
"Concise",
"Normal",
"Full"
],
"chatgpt.bot": {
"type": "string",
"enum": [
"basic",
"proofreader"
],
"default": "basic",
"description": "Bot selection.",
"order": 47,
"enumItemLabels": [
"basic",
"proofreader"
]
},
"markdownEnumDescriptions": [
"Only replies with code",
"Explanations are concise",
"Normal explanations",
"Detailed, full explanations"
]
}
}
}
},
"scripts": {
"vscode:prepublish": "rimraf out && yarn esbuild-base -- --minify && yarn build-webview && cp ./node_modules/@dqbd/tiktoken/tiktoken_bg.wasm ./out/tiktoken_bg.wasm",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"build": "yarn esbuild-base -- --sourcemap && yarn build-webview",
"dev": "yarn watch",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "yarn esbuild-base -- --sourcemap --watch",
"watch:webview": "webpack --mode development --watch",
"build-webview": "webpack --mode production",
"fmt": "prettier --write \"src/**/*.ts\" && yarn test -- --fix",
"test": "eslint src --ext ts && tsc --noEmit"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"@types/glob": "^8.0.0",
"@types/he": "^1.2.3",
"@types/isomorphic-fetch": "^0.0.36",
"@types/marked": "^4.0.8",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@types/react-redux": "^7.1.25",
"@types/uuid": "^9.0.0",
"@types/vscode": "1.70.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",
"esbuild": "^0.15.18",
"eslint": "^8.28.0",
"glob": "^8.0.3",
"he": "^1.2.0",
"mocha": "^10.1.0",
"npm-run-all": "^4.1.5",
"react-tooltip": "^5.10.0",
"tailwindcss": "^3.2.7",
"ts-loader": "^9.4.2",
"typescript": "^4.9.3",
"webpack": "^5.76.2",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@dqbd/tiktoken": "^1.0.7",
"@reduxjs/toolkit": "^1.9.3",
"autoprefixer": "^10.4.14",
"clsx": "^2.0.0",
"css-loader": "^6.7.3",
"delay": "^5.0.0",
"eventsource-parser": "^0.1.0",
"gpt3-tokenizer": "^1.1.5",
"highlight.js": "^11.7.0",
"isomorphic-fetch": "^3.0.0",
"keyv": "^4.5.2",
"marked": "^4.3.0",
"openai": "^4.20.0",
"p-timeout": "^6.1.1",
"postcss": "^8.4.21",
"postcss-loader": "^7.1.0",
"quick-lru": "^6.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.5",
"react-router-dom": "^6.9.0",
"remark": "^14.0.2",
"strip-markdown": "^5.0.0",
"style-loader": "^3.3.2",
"upath": "^2.0.1",
"uuid": "^9.0.0"
},
"resolutions": {
"clone-deep": "^4.0.1"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}