This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
309 lines (307 loc) · 10.8 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
{
"name": "doxide",
"displayName": "Doxide",
"description": "🤖 Automate code documentation using OpenAI",
"repository": {
"type": "git",
"url": "https://github.com/chuahxinyu/doxide"
},
"license": "MIT",
"publisher": "XinYu",
"version": "0.1.0",
"icon": "assets/Logo.png",
"engines": {
"vscode": "^1.65.0"
},
"categories": [
"Programming Languages",
"Snippets",
"Education",
"Other"
],
"galleryBanner": {
"color": "#003559",
"theme": "dark"
},
"activationEvents": [
"*"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "doxide.helloWorld",
"title": "Hello World",
"category": "Doxide"
},
{
"command": "doxide.enableCodeLens",
"title": "Enable Code Lens",
"category": "Doxide"
},
{
"command": "doxide.disableCodeLens",
"title": "Disable Code Lens",
"category": "Doxide"
},
{
"command": "doxide.generateDocstring",
"title": "Generate Docstring",
"category": "Doxide"
},
{
"command": "doxide.setOpenAIapiKey",
"title": "Set OpenAI API Key",
"category": "Doxide"
},
{
"command": "doxide.generateFileHeader",
"title": "Set OpenAI API Key",
"category": "Doxide"
}
],
"menus": {
"editor/context": [
{
"when": "editorHasSelection && editorLangId =~ /^typescript$|^python$|^php$|^java$|^javascript$/",
"command": "doxide.generateDocstring",
"group": "navigation"
}
]
},
"keybindings": [
{
"command": "gitlens.key.left",
"key": "left",
"when": "gitlens:key:left"
}
],
"configuration": [
{
"id": "openai-api-key",
"title": "OpenAI API Key",
"order": 0,
"properties": {
"doxide.openAI.apiKey": {
"type": "string",
"default": "",
"markdownDescription": "*Your OpenAI API key.* [Learn more.](https://github.com/chuahxinyu/doxide#-getting-started)",
"order": 0
},
"doxide.openAI.apiKey.storeLocation": {
"type": "string",
"markdownDescription": "*Where you would like your API Key to be stored.* [Learn more](https://code.visualstudio.com/docs/getstarted/settings)",
"default": null,
"enum": [
"User Settings",
"Workspace Settings"
],
"enumDescriptions": [
"Settings that apply globally to any instance of VS Code you open.",
"Settings stored inside your workspace and only apply when the workspace is opened."
],
"order": 1
}
}
},
{
"id": "openai-config",
"title": "OpenAI Configuration",
"order": 1,
"properties": {
"doxide.openAI.engine": {
"order": 0,
"type": "string",
"markdownDescription": "The engine to be used to generate Docstrings and Comments. Note that Codex models (`code-...`) are in [private beta](https://openai.com/blog/openai-codex/) and GTP-3 models have variable (`text-...`) [Pricing](https://openai.com/api/pricing/).",
"default": "code-davinci-001",
"enum": [
"code-davinci-001",
"code-davinci-002",
"code-cushman-001",
"text-davinci-002",
"text-davinci-001",
"text-curie-001",
"text-babbage-001",
"text-ada-001"
],
"enumDescriptions": [
"(Codex Davinci V1) Most capable Codex model. Particularly good at translating natural language to code.",
"(Codex Davinci V2) Most capable Codex model. Particularly good at translating natural language to code.",
"(Codex Cushman V1) Almost as capable as Davinci Codex, but slightly faster.",
"(GPT-3 Davinci V2) Most capable GPT-3 model. Can do any task the other models can do, often with less context.",
"(GPT-3 Davinci V1) Most capable GPT-3 model. Can do any task the other models can do, often with less context.",
"(GPT-3 Curie V1) Very capable, but faster and lower cost than Davinci.",
"(GPT-3 Babbage V1) Capable of straightforward tasks, very fast, and lower cost.",
"(GPT-3 Ada V1) Capable of very simple tasks, usually the fastest model in the GPT-3 series, and lowest cost."
]
},
"doxide.openAI.config.n": {
"order": 1,
"type": "integer",
"default": 1,
"markdownDescription": "How many completions to generate for each prompt."
},
"doxide.openAI.config.temperature": {
"order": 2,
"type": "number",
"default": 0.1,
"markdownDescription": "What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) 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.",
"examples": [],
"minimum": 0,
"maximum": 1
},
"doxide.openAI.config.presencePenalty": {
"order": 3,
"type": "number",
"default": 0.1,
"markdownDescription": "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.",
"examples": [],
"minimum": -2,
"maximum": 2
},
"doxide.openAI.config.frequencyPenalty": {
"order": 4,
"type": "number",
"default": 0.1,
"markdownDescription": "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.",
"examples": [],
"minimum": -2,
"maximum": 2
}
}
},
{
"id": "code-lens",
"title": "Code Lens",
"order": 2,
"properties": {
"doxide.codeLens.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "*Specifies whether to provide any Doxide Code Lens by default.* If enabled, Code Lenses (grey text) will be shown at the beginning of functions and methods with prompts for generating docstrings. Use the `Toggle Doxide Code Lens` command (`doxide.toggleCodeLens`) to toggle the Doxide code lens on and off for the current window.",
"order": 0
},
"doxide.codeLens.generateTitle": {
"type": "string",
"default": "Generate",
"markdownDescription": "*CodeLens Title/Label*. The text to be shown above function signatures that enable you to generate docstrings.",
"order": 1
}
}
},
{
"id": "docstring-templates",
"title": "Docstring Configurations",
"order": 3,
"properties": {
"doxide.python.startDocstringToken": {
"type": "string",
"default": "'''",
"markdownDescription": "Token to indicate the start of a Python docstring.",
"order": 0
},
"doxide.python.endDocstringToken": {
"type": "string",
"default": "'''",
"markdownDescription": "Token to indicate the end of a Python docstring.",
"order": 1
},
"doxide.python.docstringTemplate": {
"type": "integer",
"default": 0,
"markdownDescription": "Template for Python Docstring.",
"enum": [
0,
1
],
"enumDescriptions": [
"Parameters\n ----------\n array : list\n The array to be sorted.\n\n Returns\n -------\n list\n The sorted array.\n\n Examples\n --------\n >>> bubble_sort([3, 2, 1])\n [1, 2, 3]",
"Parameters:\n array(list): The array to be sorted.\n\n Returns:\n list: The sorted array.\n\n Examples: \n >>> bubble_sort([3, 2, 1])\n [1, 2, 3]"
],
"order": 2
},
"doxide.javascript.startDocstringToken": {
"type": "string",
"default": "/**",
"markdownDescription": "Token to indicate the start of a JavaScript docstring.",
"order": 3
},
"doxide.javascript.endDocstringToken": {
"type": "string",
"default": "*/",
"markdownDescription": "Token to indicate the end of a JavaScript docstring.",
"order": 4
},
"doxide.javascript.docstringTemplate": {
"type": "integer",
"default": 0,
"markdownDescription": "Template for JavaScript Docstring.",
"enum": [
0,
1,
3
],
"enumDescriptions": [
"Parameters\n ----------\n array : list\n The array to be sorted.\n\n Returns\n -------\n list\n The sorted array.\n\n Examples\n --------\n >>> bubble_sort([3, 2, 1])\n [1, 2, 3]",
"Parameters:\n array(list): The array to be sorted.\n\n Returns:\n list: The sorted array.\n\n Examples: \n >>> bubble_sort([3, 2, 1])\n [1, 2, 3]",
" * @param {Array} inputArr - An array of numbers\n * @returns {Array} - The sorted array\n * @description - This function sorts an array of numbers using the insertion sort algorithm\n * @example\n * // returns [1, 2, 3]\n * bubble_sort([3, 2, 1])"
],
"order": 5
},
"doxide.typescript.startDocstringToken": {
"type": "string",
"default": "/**",
"markdownDescription": "Token to indicate the start of a TypeScript docstring.",
"order": 6
},
"doxide.typescript.endDocstringToken": {
"type": "string",
"default": "*/",
"markdownDescription": "Token to indicate the end of a TypeScript docstring.",
"order": 7
},
"doxide.typescript.docstringTemplate": {
"type": "integer",
"default": 0,
"markdownDescription": "Template for TypeScript Docstring.",
"enum": [
0,
1,
3
],
"enumDescriptions": [
"Parameters\n ----------\n array : list\n The array to be sorted.\n\n Returns\n -------\n list\n The sorted array.\n\n Examples\n --------\n >>> bubble_sort([3, 2, 1])\n [1, 2, 3]",
"Parameters:\n array(list): The array to be sorted.\n\n Returns:\n list: The sorted array.\n\n Examples: \n >>> bubble_sort([3, 2, 1])\n [1, 2, 3]",
" * @param {Array} inputArr - An array of numbers\n * @returns {Array} - The sorted array\n * @description - This function sorts an array of numbers using the insertion sort algorithm\n * @example\n * // returns [1, 2, 3]\n * bubble_sort([3, 2, 1])"
],
"order": 8
}
}
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/glob": "^7.1.4",
"@types/mocha": "^9.0.0",
"@types/node": "14.x",
"@types/vscode": "^1.65.0",
"@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0",
"@vscode/test-electron": "^1.6.2",
"eslint": "^8.1.0",
"glob": "^7.1.7",
"mocha": "^9.1.3",
"typescript": "^4.4.4"
},
"dependencies": {
"axios": "^0.26.1"
}
}