forked from devchat-ai/devchat-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
743 lines (742 loc) · 21.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
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
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
{
"name": "devchat",
"displayName": "DevChat",
"description": "Write prompts, not code",
"version": "0.1.22",
"icon": "assets/devchat.png",
"publisher": "merico",
"engines": {
"vscode": "^1.75.0"
},
"repository": {
"type": "git",
"url": "https://github.com/devchat-ai/devchat-vscode.git"
},
"categories": [
"Programming Languages",
"Snippets",
"Machine Learning",
"Education"
],
"keywords": [
"ai",
"anthropic",
"assistant",
"autocomplete",
"bot",
"chat",
"chatbot",
"codegen",
"c#",
"c++",
"codex",
"co-pilot",
"devchat",
"documentation",
"go",
"golang",
"intellisense",
"java",
"javascript",
"keybindings",
"kotlin",
"llm",
"model",
"openai",
"php",
"pilot",
"python",
"refactor",
"ruby",
"sourcegraph",
"snippets",
"test",
"typescript"
],
"activationEvents": [
"*"
],
"main": "./dist/extension.js",
"files": [
"dist/*",
"bin/*",
"assets/*",
"tools/*",
"workflows/*",
"LICENSE",
"README.md"
],
"contributes": {
"configuration": {
"title": "DevChat",
"properties": {
"devchat.Model.gpt-3-5": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"default": "openai",
"enum": [
"openai"
],
"description": "[required*] Specify which provider host this llm model"
},
"api_key": {
"type": "string",
"default": "",
"description": "[required*] Specify access key for selected provider."
},
"api_base": {
"type": "string",
"default": "",
"description": "[optional*] Specify the api base for selected provider. Leave it blank if you want to use default api base."
},
"temperature": {
"type": "number",
"default": 0.3,
"description": "[optional*] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."
},
"max_tokens": {
"type": "number",
"default": 1000,
"description": "[optional*] The maximum number of tokens to generate in the chat completion.\nThe total length of input tokens and generated tokens is limited by the model's context length. Example Python code for counting tokens."
},
"presence_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics."
},
"frequency_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."
}
},
"required": [
"provider",
"key"
],
"additionalProperties": false,
"order": 0,
"markdownDescription": "Specify the properties for gpt-3.5-turbo model. Leave it blank if you won't use this llm model. [how to set?](https://platform.openai.com/docs/api-reference/chat/create#temperature)"
},
"devchat.Model.gpt-3-5-16k": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"default": "openai",
"enum": [
"openai"
],
"description": "[required*] Specify which provider host this llm model"
},
"api_key": {
"type": "string",
"default": "",
"description": "[required*] Specify access key for selected provider."
},
"api_base": {
"type": "string",
"default": "",
"description": "[optional*] Specify the api base for selected provider. Leave it blank if you want to use default api base."
},
"temperature": {
"type": "number",
"default": 0.3,
"description": "[optional*] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."
},
"max_tokens": {
"type": "number",
"default": 1000,
"description": "[optional*] The maximum number of tokens to generate in the chat completion.\nThe total length of input tokens and generated tokens is limited by the model's context length. Example Python code for counting tokens."
},
"presence_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics."
},
"frequency_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."
}
},
"required": [
"provider",
"key"
],
"additionalProperties": false,
"order": 1,
"markdownDescription": "Specify properties for gpt-3.5-turbo-16k model. Leave it blank if you won't use this llm model. [how to set?](https://platform.openai.com/docs/api-reference/chat/create#temperature) "
},
"devchat.Model.gpt-4": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"default": "openai",
"enum": [
"openai"
],
"description": "[required*] Specify which provider host this llm model"
},
"api_key": {
"type": "string",
"default": "",
"description": "[required*] Specify access key for selected provider."
},
"api_base": {
"type": "string",
"default": "",
"description": "[optional*] Specify the api base for selected provider. Leave it blank if you want to use default api base."
},
"temperature": {
"type": "number",
"default": 0.3,
"description": "[optional*] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."
},
"max_tokens": {
"type": "number",
"default": 1000,
"description": "[optional*] The maximum number of tokens to generate in the chat completion.\nThe total length of input tokens and generated tokens is limited by the model's context length. Example Python code for counting tokens."
},
"presence_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics."
},
"frequency_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."
}
},
"additionalProperties": false,
"order": 2,
"markdownDescription": "properties for gpt-4 model. Leave it blank if you won't use this llm model. [how to set?](https://platform.openai.com/docs/api-reference/chat/create#temperature)"
},
"devchat.Model.claude-2": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"default": "anthropic",
"enum": [
"anthropic"
],
"description": "[required*] which provider host this llm model"
},
"api_key": {
"type": "string",
"default": "",
"description": "[required*] Specify access key for selected provider."
},
"api_base": {
"type": "string",
"default": "",
"description": "[optional*] Specify the api base for selected provider. Leave it blank if you want to use default api base."
},
"temperature": {
"type": "number",
"default": 0.3,
"description": "[optional*] What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."
},
"max_tokens": {
"type": "number",
"default": 1000,
"description": "[optional*] The maximum number of tokens to generate in the chat completion.\nThe total length of input tokens and generated tokens is limited by the model's context length. Example Python code for counting tokens."
},
"presence_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics."
},
"frequency_penalty": {
"type": "number",
"default": 0,
"description": "[optional*] Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."
}
},
"additionalProperties": false,
"order": 3,
"markdownDescription": "properties for claude-2 model. Leave it blank if you won't use this llm model. [how to set?](https://platform.openai.com/docs/api-reference/chat/create#temperature) "
},
"devchat.defaultModel": {
"oneOf": [
{
"type": "string",
"default": "gpt-3.5-turbo",
"enum": [
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-4",
"claude-2"
]
},
{
"type": "string",
"default": "gpt-3.5-turbo"
}
],
"order": 7,
"markdownDescription": "Specify the default llm model for DevChat. [Price of each model](https://devchat.ai/pricing)"
},
"DevChat.OpenAI.stream": {
"type": "boolean",
"default": true,
"order": 10,
"description": "Whether to stream a response."
},
"DevChat.EnableFunctionCalling": {
"type": "boolean",
"default": false,
"order": 11,
"description": "Enable function calling for GPT."
},
"DevChat.DevChatPath": {
"type": "string",
"default": "",
"input": {
"type": "file",
"filter": {
"All files": [
"devchat"
]
}
},
"order": 12,
"description": "Where is the devchat binary located?"
},
"DevChat.betaInvitationCode": {
"type": "string",
"default": "",
"order": 13,
"description": "The invitation code for beta testing."
},
"DevChat.maxLogCount": {
"type": "number",
"default": 20,
"order": 14,
"description": "Limit the number of prompts in the chat view."
},
"DevChat.askcode.supportedFileTypes": {
"type": "string",
"default": ".+\\.js$, .+\\.ts$, .+\\.jsx$, .+\\.tsx$, .+\\.java$, .+\\.py$, .+\\.go$, .+\\.rb$, .+\\.php$, .+\\.cpp$, .+\\.c$, .+\\.cs$, .+\\.swift$, .+\\.rs$, .+\\.sh$, .+\\.bash$, .+\\.zsh$, .+\\.m$, .+\\.mm$, .+\\.h$, .+\\.hpp$, .+\\.hh$, .+\\.html$, .+\\.htm$, .+\\.xhtml$, .+\\.xml$, .+\\.css$, .+\\.scss$, .+\\.sass$, .+\\.less$, .+\\.json$, .+\\.yaml$, .+\\.yml$, .+\\.toml$, .+\\.ini$, .+\\.md$, .+\\.markdown$, .+\\.txt$, .+\\.csv$, .+\\.sql$, .+\\.sqlite$, .+\\.db$, .+\\.hql$, .+\\.psql$, .+\\.pgsql$, .+\\.plpgsql$",
"order": 15,
"description": "Comma-separated list of regular expressions for supported file types for analysis."
},
"DevChat.PythonPath": {
"type": "string",
"default": "",
"input": {
"type": "file",
"filter": {
"All files": [
"python*"
]
}
},
"description": "Which Python interpreter to use with DevChat?"
},
"DevChat.PythonVirtualEnv": {
"type": "string",
"default": "",
"description": "Path to the Python virtual environment for AskCode."
}
}
},
"viewsContainers": {
"activitybar": [
{
"id": "devchat-sidebar",
"title": "DevChat",
"icon": "assets/devchat_icon.svg"
}
]
},
"views": {
"devchat-sidebar": [
{
"type": "webview",
"id": "devchat-view",
"name": "DevChat"
},
{
"type": "tree",
"id": "devchat-topicview",
"name": "DevChat-Topic"
}
]
},
"commands": [
{
"command": "devchat-topicview.reloadTopic",
"title": "Reload Topics",
"icon": "$(refresh)"
},
{
"command": "devchat-topicview.selectTopic",
"title": "Select Topic",
"icon": "$(add)"
},
{
"command": "devchat-topicview.addTopic",
"title": "Add Topic",
"icon": "$(add)"
},
{
"command": "devchat-topicview.deleteSelectedTopic",
"title": "Delete Selected Topic",
"icon": "$(trash)"
},
{
"command": "devchat-topicview.deleteTopic",
"title": "Delete topic"
},
{
"command": "devchat.applyDiffResult",
"title": "Apply Diff",
"icon": "assets/devchat_apply.svg"
},
{
"command": "devchat.createEntry",
"title": "Create Entry"
},
{
"command": "DevChat.AccessKey.OpenAI",
"title": "Input Access Key for OpenAI",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.Cohere",
"title": "Input Access Key for Cohere",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.Anthropic",
"title": "Input Access Key for Anthropic",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.Replicate",
"title": "Input Access Key for Replicate",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.HuggingFace",
"title": "Input Access Key for HuggingFace",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.TogetherAI",
"title": "Input Access Key for TogetherAI",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.OpenRouter",
"title": "Input Access Key for OpenRouter",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.VertexAI",
"title": "Input Access Key for VertexAI",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.AI21",
"title": "Input Access Key for AI21",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.BaseTen",
"title": "Input Access Key for BaseTen",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.Azure",
"title": "Input Access Key for Azure",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.SageMaker",
"title": "Input Access Key for SageMaker",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.Bedrock",
"title": "Input Access Key for Bedrock",
"category": "DevChat"
},
{
"command": "DevChat.AccessKey.DevChat",
"title": "Input Access Key for DevChat",
"category": "DevChat"
},
{
"command": "DevChat.PythonPath",
"title": "Set Python Path",
"category": "DevChat"
},
{
"command": "devchat.openChatPanel",
"title": "DevChat"
},
{
"command": "devchat.addConext",
"title": "Add to DevChat"
},
{
"command": "devchat.askForCode",
"title": "Add to DevChat"
},
{
"command": "devchat.askForFile",
"title": "Add to DevChat"
},
{
"command": "devchat.addConext_chinese",
"title": "添加到DevChat"
},
{
"command": "devchat.askForCode_chinese",
"title": "添加到DevChat"
},
{
"command": "devchat.askForFile_chinese",
"title": "添加到DevChat"
},
{
"command": "DevChat.AskCodeIndexStart",
"title": "Start AskCode Index",
"category": "DevChat"
},
{
"command": "DevChat.AskCodeIndexStop",
"title": "Stop AskCode Index",
"category": "DevChat"
},
{
"command": "DevChat.InstallCommands",
"title": "Install slash commands",
"category": "DevChat"
},
{
"command": "DevChat.UpdataChatModels",
"title": "Update Chat Models",
"category": "DevChat"
}
],
"menus": {
"view/item/context": [
{
"command": "devchat-topicview.deleteTopic",
"when": "view == devchat-topicview",
"group": "1_modification"
}
],
"view/title": [
{
"command": "devchat-topicview.addTopic",
"when": "view == devchat-topicview",
"group": "navigation"
},
{
"command": "devchat-topicview.deleteSelectedTopic",
"when": "view == devchat-topicview",
"group": "navigation"
},
{
"command": "devchat-topicview.reloadTopic",
"when": "view == devchat-topicview",
"group": "navigation"
}
],
"editor/title": [
{
"command": "devchat.applyDiffResult",
"group": "navigation",
"when": "editorTextFocus && isInDiffEditor"
}
],
"commandPalette": [
{
"command": "devchat-topicview.reloadTopic",
"when": "false"
},
{
"command": "devchat-topicview.selectTopic",
"when": "false"
},
{
"command": "devchat-topicview.addTopic",
"when": "false"
},
{
"command": "devchat-topicview.deleteSelectedTopic",
"when": "false"
},
{
"command": "devchat-topicview.deleteTopic",
"when": "false"
},
{
"command": "devchat.applyDiffResult",
"when": "false"
},
{
"command": "devchat.addConext",
"when": "false"
},
{
"command": "devchat.askForCode",
"when": "false"
},
{
"command": "devchat.askForFile",
"when": "false"
},
{
"command": "devchat.addConext_chinese",
"when": "false"
},
{
"command": "devchat.askForCode_chinese",
"when": "false"
},
{
"command": "devchat.askForFile_chinese",
"when": "false"
}
],
"explorer/context": [
{
"when": "isChineseLocale && resourceLangId != 'git'",
"command": "devchat.addConext_chinese",
"group": "navigation"
},
{
"when": "!isChineseLocale && resourceLangId != 'git'",
"command": "devchat.addConext",
"group": "navigation"
}
],
"editor/context": [
{
"command": "devchat.askForCode_chinese",
"when": "isChineseLocale && editorTextFocus && editorHasSelection",
"group": "navigation"
},
{
"command": "devchat.askForCode",
"when": "!isChineseLocale && editorTextFocus && editorHasSelection",
"group": "navigation"
},
{
"command": "devchat.askForFile",
"when": "!isChineseLocale && editorTextFocus && !editorHasSelection",
"group": "navigation"
},
{
"command": "devchat.askForFile_chinese",
"when": "isChineseLocale && editorTextFocus && !editorHasSelection",
"group": "navigation"
}
]
}
},
"scripts": {
"vscode:uninstall": "node ./dist/uninstall",
"vscode:prepublish": "npm 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": "npm run compile-tests && npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "mocha",
"build": "webpack --config webpack.config.js",
"dev": "webpack serve --config webpack.config.js --open"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.5",
"@types/chai": "^4.3.5",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/mock-fs": "^4.13.1",
"@types/ncp": "^2.0.5",
"@types/node": "16.x",
"@types/proxyquire": "^1.3.28",
"@types/react-dom": "^18.2.3",
"@types/react-syntax-highlighter": "^15.5.6",
"@types/shell-escape": "^0.2.1",
"@types/sinon": "^10.0.15",
"@types/uuid": "^9.0.1",
"@types/vscode": "^1.75.0",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"@vscode/test-electron": "^2.3.0",
"babel-loader": "^9.1.2",
"chai": "^4.3.7",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.3",
"dotenv": "^16.0.3",
"eslint": "^8.36.0",
"file-loader": "^6.2.0",
"glob": "^8.1.0",
"html-webpack-plugin": "^5.5.1",
"jest": "^29.5.0",
"json-loader": "^0.5.7",
"mocha": "^10.2.0",
"mock-fs": "^5.2.0",
"proxyquire": "^2.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sinon": "^15.1.0",
"style-loader": "^3.3.2",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"url-loader": "^4.1.1",
"vscode-test": "^1.6.1",
"webpack": "^5.76.3",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.13.3"
},
"dependencies": {
"@emotion/react": "^11.10.8",
"@mantine/core": "^6.0.10",
"@mantine/dropzone": "^6.0.10",
"@mantine/hooks": "^6.0.10",
"@mantine/prism": "^6.0.10",
"@mantine/tiptap": "^6.0.10",
"@tabler/icons-react": "^2.17.0",
"@tiptap/extension-link": "^2.0.3",
"@tiptap/pm": "^2.0.0",
"@tiptap/react": "^2.0.3",
"@tiptap/starter-kit": "^2.0.3",
"axios": "^1.3.6",
"dotenv": "^16.0.3",
"js-yaml": "^4.1.0",
"mobx": "^6.10.0",
"mobx-react": "^9.0.0",
"mobx-state-tree": "^5.1.8",
"ncp": "^2.0.0",
"node-fetch": "^3.3.1",
"nonce": "^1.0.4",
"openai": "^3.2.1",
"quote": "^0.4.0",
"react-markdown": "^8.0.7",
"react-syntax-highlighter": "^15.5.0",
"rehype-raw": "^6.1.1",
"shell-escape": "^0.2.0",
"string-argv": "^0.3.2",
"uuid": "^9.0.0",
"yaml": "^2.3.2"
}
}