-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
258 lines (258 loc) · 10.4 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
{
"name": "chatgpt-docstrings",
"displayName": "ChatGPT: Docstring Generator",
"description": "Automatically generate Python docstrings using ChatGPT.",
"version": "0.10.0",
"preview": true,
"icon": "images/icon.png",
"serverInfo": {
"name": "ChatGPT: Docstring Generator",
"module": "chatgpt-docstrings"
},
"publisher": "oliversen",
"license": "MIT",
"homepage": "https://github.com/oliversen/chatgpt-docstrings",
"repository": {
"type": "git",
"url": "https://github.com/oliversen/chatgpt-docstrings.git"
},
"bugs": {
"url": "https://github.com/oliversen/chatgpt-docstrings/issues"
},
"galleryBanner": {
"color": "#171c28",
"theme": "dark"
},
"keywords": [
"python",
"chatgpt",
"docstring",
"automatic",
"automatically",
"generation",
"generate",
"ai"
],
"engines": {
"vscode": "^1.75.0"
},
"extensionDependencies": [
"ms-python.python"
],
"capabilities": {
"virtualWorkspaces": {
"supported": false,
"description": "Virtual Workspaces are not supported with ChatGPT: Docstring Generator."
},
"untrustedWorkspaces": {
"supported": false,
"description": "The extension requires workspace trust because it loads code from the workspace."
}
},
"activationEvents": [
"onLanguage:python",
"workspaceContains:*.py"
],
"main": "./dist/extension.js",
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool source-map --config ./webpack.config.js",
"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",
"format-check": "prettier --check 'src/**/*.ts' 'build/**/*.yml' '.github/**/*.yml'",
"test": "node ./out/test/runTest.js",
"vsce-package": "vsce package -o chatgpt-docstrings.vsix"
},
"contributes": {
"configuration": {
"properties": {
"chatgpt-docstrings.interpreter": {
"type": "array",
"default": [],
"description": "When set to a path to python executable, extension will use that to launch the server and any subprocess.",
"items": {
"type": "string"
},
"scope": "resource",
"order": 1
},
"chatgpt-docstrings.apiKey": {
"type": "string",
"markdownDescription": "[Click here to set API key](command:chatgpt-docstrings.setApiKey)",
"pattern": "^$",
"patternErrorMessage": "It is not allowed to set the API key in the settings. Use the `chatgpt-docstrings.setApiKey` command.",
"scope": "application",
"order": 2
},
"chatgpt-docstrings.baseUrl": {
"type": "string",
"default": "https://api.openai.com/v1",
"markdownDescription": "The base URL for the OpenAI-compatible API.",
"pattern": "^https?://",
"patternErrorMessage": "Invalid URL format. The URL must start with 'http://' or 'https://'.",
"scope": "resource",
"order": 3
},
"chatgpt-docstrings.aiModel": {
"type": "string",
"default": "gpt-4o-mini",
"description": "Which AI language model to use.",
"enum": [
"gpt-4o-mini",
"gpt-4o",
"gpt-4-turbo",
"gpt-4",
"gpt-3.5-turbo"
],
"enumDescriptions": [
"",
"GPT-4o is available to paying OpenAI API customers",
"GPT-4 Turbo is available to paying OpenAI API customers",
"GPT-4 is available to paying OpenAI API customers",
""
],
"scope": "resource",
"order": 4
},
"chatgpt-docstrings.aiModelCustom": {
"type": "string",
"default": "",
"markdownDescription": "If set, overrides the model configured in `#chatgpt-docstrings.aiModel#`.",
"scope": "resource",
"order": 5
},
"chatgpt-docstrings.docstringStyle": {
"type": "string",
"default": "google",
"description": "Which docstring style to use.",
"enum": [
"google",
"numpy",
"sphinx"
],
"scope": "resource",
"order": 6
},
"chatgpt-docstrings.onNewLine": {
"type": "boolean",
"default": false,
"description": "Start docstring on new line.",
"scope": "resource",
"order": 7
},
"chatgpt-docstrings.promptPattern": {
"type": "string",
"default": "Generate docstring in {docstring_style} style for python function below:\n{function}",
"description": "AI prompt to generate docstring.",
"editPresentation": "multilineText",
"pattern": ".*{function}.*",
"patternErrorMessage": "Must include: \"{function}\"",
"scope": "resource",
"order": 8
},
"chatgpt-docstrings.requestTimeout": {
"type": "integer",
"default": 15,
"description": "The timeout in seconds to use when sending AI API requests.",
"scope": "resource",
"order": 9
},
"chatgpt-docstrings.showProgressNotification": {
"type": "boolean",
"default": true,
"description": "Show progress notification of docstring generation.",
"scope": "resource",
"order": 10
},
"chatgpt-docstrings.proxy": {
"type": "string",
"default": "",
"markdownDescription": "The URL of the proxy server for AI API requests. The format of the URL is: `<protocol>://[<username>:<password>@]<host>:<port>`. Where `protocol` can be: 'http', 'https', 'socks5' or 'socks5h'. The username and password are optional. If not set, will be inherited from the `#http.proxy#` setting. \n\n Examples: \n - `http://proxy.com:80` \n - `http://127.0.0.1:80` \n - `socks5://user:[email protected]:1080`",
"pattern": "^((https?|socks5h?):\/\/)(\\w+:\\w*@)?(([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}|\\d{1,3}(\\.\\d{1,3}){3})(:\\d{1,5})$|^$",
"patternErrorMessage": "Invalid proxy URL format.",
"scope": "application",
"order": 11
},
"chatgpt-docstrings.proxyAuthorization": {
"type": ["string"],
"default": "",
"markdownDescription": "The value to send as the `Proxy-Authorization` HTTP header.",
"scope": "application",
"order": 12
},
"chatgpt-docstrings.proxyStrictSSL": {
"type": "boolean",
"default": false,
"description": "Controls whether the proxy server certificate should be verified against the list of supplied CAs.",
"scope": "application",
"order": 13
}
}
},
"commands": [
{
"title": "Generate Docstring (ChatGPT)",
"category": "ChatGPT: Docstring Generator",
"command": "chatgpt-docstrings.generateDocstring"
},
{
"title": "Set API key",
"category": "ChatGPT: Docstring Generator",
"command": "chatgpt-docstrings.setApiKey"
},
{
"title": "Restart Server",
"category": "ChatGPT: Docstring Generator",
"command": "chatgpt-docstrings.restart"
},
{
"title": "Show Logs",
"category": "ChatGPT: Docstring Generator",
"command": "chatgpt-docstrings.showLogs"
}
],
"menus": {
"editor/context": [
{
"when": "resourceLangId == python",
"command": "chatgpt-docstrings.generateDocstring",
"group": "1_modification"
}
]
},
"keybindings": [
{
"key": "ctrl+alt+d",
"mac": "cmd+opt+d",
"command": "chatgpt-docstrings.generateDocstring",
"when": "editorTextFocus && !editorReadonly && editorLangId == python"
}
]
},
"dependencies": {
"@vscode/extension-telemetry": "^0.8.1",
"fs-extra": "^11.1.1",
"vscode-languageclient": "^8.1.0"
},
"devDependencies": {
"@types/fs-extra": "^11.0.1",
"@types/vscode": "1.75.0",
"@types/glob": "^8.1.0",
"@types/node": "14.x",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@vscode/test-electron": "^2.3.3",
"@vscode/vsce": "^2.19.0",
"eslint": "^8.43.0",
"glob": "^10.3.0",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"ts-loader": "^9.4.3",
"webpack": "^5.88.0",
"webpack-cli": "^5.1.4"
}
}