-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpackage.json
More file actions
467 lines (467 loc) · 23.5 KB
/
package.json
File metadata and controls
467 lines (467 loc) · 23.5 KB
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
{
"name": "coding-plans-for-copilot",
"displayName": "%displayName%",
"description": "%description%",
"version": "0.7.19",
"publisher": "techfetch-dev",
"repository": {
"type": "git",
"url": "https://github.com/jqknono/coding-plans-for-copilot.git"
},
"engines": {
"vscode": "^1.109.0"
},
"categories": [
"Machine Learning",
"Other"
],
"icon": "assets/icon.png",
"main": "./out/extension.js",
"contributes": {
"languageModelChatProviders": [
{
"vendor": "coding-plans",
"displayName": "%providers.codingPlans.displayName%",
"configuration": {
"properties": {
"vendorName": {
"type": "string",
"title": "%providers.codingPlans.config.vendorName.title%",
"description": "%providers.codingPlans.config.vendorName.description%"
},
"apiKey": {
"type": "string",
"secret": true,
"title": "%providers.codingPlans.config.apiKey.title%",
"description": "%providers.codingPlans.config.apiKey.description%"
}
},
"required": [
"vendorName",
"apiKey"
]
}
}
],
"commands": [
{
"command": "coding-plans.manage",
"title": "%commands.coding-plans.manage.title%",
"category": "%commands.category%"
},
{
"command": "coding-plans.refreshModels",
"title": "%commands.coding-plans.refreshModels.title%",
"category": "%commands.category%"
},
{
"command": "coding-plans.generateCommitMessage",
"title": "%commands.coding-plans.generateCommitMessage.title%",
"icon": "$(sparkle)",
"category": "%commands.category%"
},
{
"command": "coding-plans.selectCommitMessageModel",
"title": "%commands.coding-plans.selectCommitMessageModel.title%",
"category": "%commands.category%"
}
],
"menus": {
"scm/title": [
{
"command": "coding-plans.generateCommitMessage",
"group": "navigation",
"when": "scmProvider == git && codingPlans.showGenerateCommitMessage"
}
],
"commandPalette": [
{
"command": "coding-plans.generateCommitMessage",
"when": "codingPlans.showGenerateCommitMessage"
}
]
},
"configuration": {
"title": "%configuration.title%",
"properties": {
"coding-plans.commitMessage.showGenerateCommand": {
"type": "boolean",
"default": true,
"description": "%configuration.coding-plans.commitMessage.showGenerateCommand.description%",
"order": 0
},
"coding-plans.commitMessage.language": {
"type": "string",
"default": "en",
"enum": [
"en",
"zh-cn"
],
"enumDescriptions": [
"English",
"中文"
],
"description": "%configuration.coding-plans.commitMessage.language.description%",
"order": 1
},
"coding-plans.commitMessage.useRecentCommitStyle": {
"type": "boolean",
"default": false,
"description": "%configuration.coding-plans.commitMessage.useRecentCommitStyle.description%",
"order": 2
},
"coding-plans.commitMessage.modelVendor": {
"type": "string",
"default": "",
"description": "%configuration.coding-plans.commitMessage.modelVendor.description%",
"order": 3
},
"coding-plans.commitMessage.modelId": {
"type": "string",
"default": "",
"description": "%configuration.coding-plans.commitMessage.modelId.description%",
"order": 4
},
"coding-plans.commitMessage.options": {
"type": "object",
"additionalProperties": false,
"properties": {
"prompt": {
"type": "string"
},
"maxDiffLines": {
"type": "number",
"minimum": 1
},
"pipelineMode": {
"type": "string",
"enum": [
"single",
"two-stage",
"auto"
]
},
"summaryTriggerLines": {
"type": "number",
"minimum": 1
},
"summaryChunkLines": {
"type": "number",
"minimum": 1
},
"summaryMaxChunks": {
"type": "number",
"minimum": 1
},
"maxBodyBulletCount": {
"type": "number",
"minimum": 2
},
"subjectMaxLength": {
"type": "number",
"minimum": 20
},
"requireConventionalType": {
"type": "boolean"
},
"warnOnValidationFailure": {
"type": "boolean"
},
"llmMaxPromptLength": {
"type": "number",
"minimum": 500
},
"recentStyleMaxTotalLength": {
"type": "number",
"minimum": 500,
"deprecationMessage": "Deprecated: use llmMaxPromptLength instead."
}
},
"default": {
"prompt": "FORMAT REQUIREMENT:\nFollow the Conventional Commits format: <type>(<scope>): <description>.\nCommon types: feat, fix, docs, style, refactor, perf, test, build, ci, chore.\nOutput ONLY the commit message, no explanation, no markdown fences.",
"maxDiffLines": 3000,
"pipelineMode": "single",
"summaryTriggerLines": 1200,
"summaryChunkLines": 800,
"summaryMaxChunks": 12,
"maxBodyBulletCount": 7,
"subjectMaxLength": 72,
"requireConventionalType": true,
"warnOnValidationFailure": true,
"llmMaxPromptLength": 20000
},
"description": "%configuration.coding-plans.commitMessage.options.description%",
"order": 5
},
"coding-plans.logLevel": {
"type": "string",
"default": "info",
"enum": [
"debug",
"info",
"warn",
"error"
],
"enumDescriptions": [
"Show all logs, including request tracing details.",
"Show informational logs, warnings, and errors.",
"Show only warnings and errors.",
"Show only errors."
],
"description": "%configuration.coding-plans.logLevel.description%",
"order": 6
},
"coding-plans.advanced": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultReservedOutput": {
"type": "number",
"minimum": 0
}
},
"default": {
"defaultReservedOutput": 60000
},
"description": "%configuration.coding-plans.advanced.description%",
"order": 100
},
"coding-plans.vendors": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"baseUrl"
],
"properties": {
"name": {
"type": "string"
},
"baseUrl": {
"type": "string"
},
"usageUrl": {
"type": "string",
"description": "Optional vendor usage endpoint. When configured, the extension fetches coding-plan quota usage and shows percentage summaries in the status bar. Currently verified for Zhipu usage APIs."
},
"useModelsEndpoint": {
"type": "boolean",
"default": false,
"description": "When true, fetch model list from /models during refresh."
},
"defaultVision": {
"type": "boolean",
"default": false,
"description": "Whether newly discovered models for this vendor should have vision capabilities by default."
},
"defaultTemperature": {
"type": "number",
"minimum": 0,
"maximum": 2,
"description": "%configuration.coding-plans.vendors.defaultTemperature.description%"
},
"defaultTopP": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "%configuration.coding-plans.vendors.defaultTopP.description%"
},
"models": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"capabilities"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"temperature": {
"type": "number",
"minimum": 0,
"maximum": 2,
"description": "%configuration.coding-plans.vendors.models.temperature.description%"
},
"topP": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "%configuration.coding-plans.vendors.models.topP.description%"
},
"capabilities": {
"type": "object",
"properties": {
"tools": {
"type": "boolean",
"default": true,
"description": "Whether to enable tool calling capability."
},
"vision": {
"type": "boolean",
"default": false,
"description": "Whether to enable vision input capability. Legacy configs without this field are backfilled from vendor defaultVision at runtime."
}
},
"required": [
"tools",
"vision"
]
},
"contextSize": {
"type": "number",
"description": "Preferred total context window size for the model. Language model context display uses this value directly when provided. When maxOutputTokens is left unset, runtime derives an implicit reserved output budget from this total window."
},
"maxInputTokens": {
"type": "number",
"description": "Deprecated: legacy maximum input tokens override. Prefer contextSize for model context. When contextSize is provided and this value exceeds it, it will be capped to contextSize. Set to 0 to treat it as unset.",
"deprecationMessage": "Deprecated: prefer contextSize to describe model context. Keep maxInputTokens only for legacy per-direction overrides."
},
"maxOutputTokens": {
"type": "number",
"default": 0,
"description": "Deprecated: legacy maximum output tokens override. Prefer contextSize for model context. When contextSize is provided and this value exceeds it, it will be capped to contextSize. Defaults to 0, which treats it as unset; runtime then derives an implicit reserved output budget from total context (20%, clamped to 4096-30000). For openai-chat/openai-responses it suppresses proactively sending output-token limits, while protocol endpoints that require max_tokens will trigger an automatic compatible retry.",
"deprecationMessage": "Deprecated: prefer contextSize to describe model context. Keep maxOutputTokens only when you need a legacy output-cap override."
},
"apiStyle": {
"type": "string",
"enum": [
"openai-chat",
"openai-responses",
"anthropic"
],
"description": "Optional per-model API protocol style. When set, it overrides the vendor defaultApiStyle. For openai-responses models, request usage is read from the /responses result when available."
}
}
},
"default": []
},
"defaultApiStyle": {
"type": "string",
"enum": [
"openai-chat",
"openai-responses",
"anthropic"
],
"default": "openai-chat",
"description": "Default API protocol style for this vendor. Models can override it with models[].apiStyle. Use openai-chat for /chat/completions, openai-responses for /responses, or anthropic for /messages-compatible endpoints. For openai-responses models, request usage is read from the /responses result when available."
}
}
},
"default": [
{
"name": "Zhipu",
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
"usageUrl": "https://open.bigmodel.cn/api/monitor/usage/quota/limit",
"defaultApiStyle": "openai-chat",
"defaultVision": false,
"useModelsEndpoint": true,
"models": []
},
{
"name": "火山引擎",
"baseUrl": "https://ark.cn-beijing.volces.com/api/coding",
"models": [],
"useModelsEndpoint": true,
"defaultApiStyle": "anthropic"
},
{
"name": "Kimi",
"baseUrl": "https://api.kimi.com/coding/v1",
"models": [],
"useModelsEndpoint": true,
"defaultApiStyle": "anthropic"
},
{
"name": "Aliyun",
"baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",
"models": [],
"useModelsEndpoint": true,
"defaultApiStyle": "anthropic"
},
{
"name": "OpenRouter",
"baseUrl": "https://openrouter.ai/api",
"models": [],
"useModelsEndpoint": true,
"defaultApiStyle": "anthropic"
},
{
"name": "Tencent",
"baseUrl": "https://api.lkeap.cloud.tencent.com/plan/anthropic",
"models": [],
"useModelsEndpoint": true,
"defaultApiStyle": "anthropic"
},
{
"name": "Xiaomi MiMo",
"baseUrl": "https://token-plan-cn.xiaomimimo.com/anthropic",
"models": [],
"useModelsEndpoint": true,
"defaultApiStyle": "anthropic"
},
{
"name": "DeepSeek",
"baseUrl": "https://api.deepseek.com/anthropic",
"models": [],
"useModelsEndpoint": true,
"defaultApiStyle": "anthropic"
}
],
"description": "%configuration.coding-plans.vendors.description%",
"order": 7
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"typecheck": "tsc -p ./ --noEmit",
"bundle": "node ./scripts/esbuild.js",
"bundle:prod": "node ./scripts/esbuild.js --production",
"compile": "npm run typecheck && npm run bundle",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"changelog:update": "node ./scripts/update-changelog.js",
"package": "npm run bundle:prod",
"package:vsix": "npm run package && npx @vscode/vsce package",
"package:vsix:pre": "npm run package && npx @vscode/vsce package --pre-release",
"publish:marketplace": "npm run changelog:update && npm run package && npx @vscode/vsce publish",
"publish:marketplace:pre": "npm run changelog:update && npm run package && npx @vscode/vsce publish --pre-release",
"pricing:fetch": "node ./scripts/fetch-provider-pricing.js",
"metrics:fetch": "node ./scripts/fetch-openrouter-provider-metrics.js",
"openrouter:plans:fetch": "node ./scripts/fetch-openrouter-provider-plans.js",
"serve:page": "node ./scripts/serve-pricing-page.js",
"test:pages": "playwright test --config=playwright.config.ts",
"test:pages:headed": "playwright test --config=playwright.config.ts --headed",
"crawler:run": "node ./scripts/crawler/index.js --days=1",
"crawler:run:publish": "node ./scripts/crawler/index.js --days=1 --discussion",
"crawler:v2ex": "node ./scripts/crawler/index.js --source=v2ex --days=1",
"crawler:v2ex:publish": "node ./scripts/crawler/index.js --source=v2ex --days=1 --discussion",
"crawler:linuxdo": "node ./scripts/crawler/index.js --source=linuxdo --days=1",
"crawler:linuxdo:publish": "node ./scripts/crawler/index.js --source=linuxdo --days=1 --discussion",
"crawler:migrate-discussion-labels": "node ./scripts/discussions/migrate-discussion-labels.js",
"crawler:verify-discussion-labels": "node ./scripts/discussions/verify-discussion-labels.js",
"crawler:cleanup-discussions": "node ./scripts/discussions/cleanup-discussions.js",
"crawler:setup-categories": "node ./scripts/discussions/setup-discussion-categories.js"
},
"devDependencies": {
"@playwright/test": "^1.58.2",
"@types/node": "^20.14.9",
"@types/vscode": "^1.109.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"esbuild": "^0.25.10",
"eslint": "^8.57.0",
"typescript": "^5.4.5"
},
"dependencies": {
"axios": "^1.7.2"
}
}