-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpackage.json
More file actions
329 lines (329 loc) · 14.4 KB
/
package.json
File metadata and controls
329 lines (329 loc) · 14.4 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
{
"name": "lgtm",
"displayName": "LGTM - AI Code Review",
"description": "Review source code changes in Git using GitHub Copilot Chat",
"publisher": "cpulvermacher",
"version": "1.3.0",
"repository": {
"type": "git",
"url": "https://github.com/cpulvermacher/lgtm.git"
},
"engines": {
"vscode": "^1.104.0"
},
"categories": [
"AI",
"Chat",
"Machine Learning",
"Programming Languages"
],
"keywords": [
"ai",
"chat",
"copilot",
"git",
"review",
"pull request",
"bitbucket"
],
"icon": "images/icon.png",
"license": "SEE LICENSE IN LICENSE",
"activationEvents": [
"onChatParticipant:lgtm"
],
"main": "./out/extension.js",
"enabledApiProposals": [],
"contributes": {
"commands": [
{
"command": "lgtm.selectChatModel",
"title": "Select Chat Model...",
"category": "LGTM"
},
{
"command": "lgtm.startCodeReview",
"title": "Start Code Review...",
"category": "LGTM",
"icon": {
"light": "images/icon.png",
"dark": "images/icon.png"
}
},
{
"command": "lgtm.reviewStagedChanges",
"title": "Review Staged Changes",
"category": "LGTM",
"icon": {
"light": "images/icon.png",
"dark": "images/icon.png"
}
},
{
"command": "lgtm.reviewUnstagedChanges",
"title": "Review Unstaged Changes",
"category": "LGTM",
"icon": {
"light": "images/icon.png",
"dark": "images/icon.png"
}
},
{
"command": "lgtm.reviewPullRequest",
"title": "Review Pull Request",
"category": "LGTM",
"icon": {
"light": "images/icon.png",
"dark": "images/icon.png"
}
}
],
"menus": {
"scm/resourceGroup/context": [
{
"command": "lgtm.reviewStagedChanges",
"when": "scmProvider == git && scmResourceGroup == index",
"group": "inline@-3"
},
{
"command": "lgtm.reviewUnstagedChanges",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline@-3"
}
],
"view/item/context": [
{
"command": "lgtm.reviewPullRequest",
"when": "(view == atlascode.views.bb.pullrequestsTreeView && viewItem == pullrequest && !treeElementHasParent) || (view == pr:github && viewItem =~ /pullrequest/)",
"group": "inline"
}
],
"commandPalette": [
{
"command": "lgtm.reviewPullRequest",
"when": "false"
}
]
},
"chatParticipants": [
{
"id": "lgtm",
"name": "lgtm",
"fullName": "LGTM",
"description": "Review source code changes",
"isSticky": false,
"commands": [
{
"name": "review",
"description": "Review changes. Specify branches, commits, or tags, e.g. `/review develop main`. Use `model:id` to select models inline. Leave empty for interactive."
}
]
}
],
"languageModelTools": [
{
"name": "review",
"displayName": "Review source code changes in Git using AI",
"modelDescription": "Reviews source code changes in Git using AI. Use this tool to review any changes on the `target` ref (compared to `base`) to discover potential issues. Returns a list of review comments with file names, line numbers, and severity.",
"canBeReferencedInPrompt": true,
"toolReferenceName": "review",
"icon": "images/icon.png",
"inputSchema": {
"type": "object",
"properties": {
"target": {
"type": "string",
"description": "Target git ref (branch, commit, or tag) to review. (e.g. 'main', 'abc1234', 'v0.1.0', 'HEAD')"
},
"base": {
"type": "string",
"description": "Base git ref (branch, commit, or tag) to compare against. (e.g. 'origin/main', 'abc1235', 'v0.0.9', 'HEAD~1')"
}
},
"required": [
"target",
"base"
]
}
},
{
"name": "reviewStaged",
"displayName": "Review staged changes in Git using AI",
"modelDescription": "Reviews staged changes in Git using AI. Use this tool to review changes that have been staged with `git add` but not yet committed. Returns a list of review comments with file names, line numbers, and severity.",
"canBeReferencedInPrompt": true,
"toolReferenceName": "reviewStaged",
"icon": "images/icon.png",
"inputSchema": {
"type": "object",
"properties": {
"changeDescription": {
"type": "string",
"description": "Description of what the changes to review are expected to implement. Use this to provide context for the review and be explicit about requirements."
}
}
}
},
{
"name": "reviewUnstaged",
"displayName": "Review unstaged changes in Git using AI",
"modelDescription": "Reviews unstaged changes in Git using AI. Use this tool to review changes in your working directory that haven't been staged yet. You can use this to check your work after completing a change requested by the user. Returns a list of review comments with file names, line numbers, and severity.",
"canBeReferencedInPrompt": true,
"toolReferenceName": "reviewUnstaged",
"icon": "images/icon.png",
"inputSchema": {
"type": "object",
"properties": {
"changeDescription": {
"type": "string",
"description": "Description of what the changes to review are expected to implement. Use this to provide context for the review and be explicit about requirements."
}
}
}
}
],
"configuration": {
"title": "LGTM",
"properties": {
"lgtm.minSeverity": {
"type": "number",
"default": 2,
"description": "Suppress comments with severity lower than the configured value. (1 to show all issues)",
"minimum": 1,
"maximum": 5
},
"lgtm.customPrompt": {
"type": "string",
"default": "",
"description": "Add custom text to the review prompt. For example, \"- In the final JSON output, use Spanish for the `comment` field.\"",
"editPresentation": "multilineText"
},
"lgtm.exclude": {
"type": "array",
"default": [
"package-lock.json",
"yarn.lock",
"pnpm-lock.yaml",
"*.min.js"
],
"items": {
"type": "string"
},
"description": "Exclude paths from review using glob patterns. Binary files are not reviewed and do not need to be excluded."
},
"lgtm.enableDebugOutput": {
"type": "boolean",
"default": false,
"description": "Log debug output to Output Panel > LGTM."
},
"lgtm.chatModel": {
"type": "string",
"default": "copilot:gpt-4.1",
"markdownDescription": "Default chat model to use for generating review comments. Use the 'LGTM: Select Chat Model' command to choose from available models. Note that non-default models may not be available, may require changes to the [Copilot settings](https://github.com/settings/copilot), or have stricter rate limits."
},
"lgtm.selectChatModelForReview": {
"type": "string",
"enum": [
"Use default",
"Always ask"
],
"default": "Use default",
"enumDescriptions": [
"Use the model defined in 'Chat Model'",
"Always ask which model to use when starting a new prompt (supports multi-selection)"
],
"markdownDescription": "Controls which chat model to use when starting a new review prompt. When set to 'Always ask', you can select multiple models to compare their results."
},
"lgtm.outputModeWithMultipleModels": {
"type": "string",
"enum": [
"Separate sections",
"Merged with attribution"
],
"default": "Separate sections",
"enumDescriptions": [
"Show each model's results in separate sections with headings",
"Merge results from all models, showing which model(s) flagged each issue"
],
"markdownDescription": "Controls how results are displayed when using multiple models for review."
},
"lgtm.maxInputTokensFraction": {
"type": "number",
"default": 0.95,
"description": "Fraction of the chat model's input token limit to use for requests. Lower values may increase quality of e.g. function level comments, but reduce the available context; higher values may improve the models understanding on how different changes relate to each other. The maximum allowed value is 0.95 to avoid token limit errors.",
"minimum": 0.05,
"maximum": 0.95
},
"lgtm.maxConcurrentModelRequests": {
"type": "number",
"default": 4,
"description": "Maximum number of concurrent requests to the chat model. Increase this to speed up reviews, but be aware that this may lead to rate limiting by the model provider.",
"minimum": 1,
"maximum": 10
},
"lgtm.saveOutputToFile": {
"type": "boolean",
"default": false,
"description": "Save ReviewResult to JSON file for debugging purposes. Files are saved to .lgtm-debug/ directory in workspace root."
},
"lgtm.autoCheckoutTarget": {
"type": "string",
"enum": [
"ask",
"always",
"never"
],
"default": "ask",
"enumDescriptions": [
"Ask each time whether to check out the target ref",
"Always check out the target ref automatically",
"Never check out the target ref automatically"
],
"description": "Controls whether to automatically check out the target ref when it's not currently checked out. Checking out enables code navigation and fixes."
}
}
}
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"check-exclusive": "ps aux | grep -v grep | grep -q 'esbuild.*--watch' && echo 'esbuild --watch running, aborting!' && exit 1 || exit 0",
"vscode:prepublish": "pnpm check-exclusive && rm -rf ./out && pnpm esbuild-base --minify --pure:console.debug",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --define:__GIT_VERSION__=\\\"$GIT_VERSION\\\"",
"watch": "pnpm esbuild-base --sourcemap --watch",
"dev": "GIT_VERSION=$(git describe --tags --long) pnpm build",
"build": "npx vsce package --no-dependencies",
"format": "pnpm exec biome check --write src/",
"lint": "tsc --noEmit && pnpm exec biome check src/",
"test": "vitest run",
"coverage": "vitest run --coverage",
"checkall": "pnpm test && pnpm lint && pnpm build"
},
"devDependencies": {
"@biomejs/biome": "2.3.11",
"@types/node": "22.x",
"@types/vscode": "^1.104.0",
"@vitest/coverage-v8": "^4.0.18",
"@vscode/vsce": "^3.7.1",
"esbuild": "^0.27.3",
"typescript": "^5.9.3",
"vitest": "^4.0.18"
},
"dependencies": {
"fastest-levenshtein": "^1.0.16",
"jsonc-parser": "^3.3.1",
"minimatch": "^10.2.4",
"simple-git": "^3.30.0"
},
"extensionDependencies": [
"github.copilot-chat"
],
"pnpm": {
"overrides": {
"brace-expansion@>=1.0.0 <=1.1.11": ">=1.1.12",
"brace-expansion@>=2.0.0 <=2.0.1": ">=2.0.2",
"tar-fs@>=2.0.0 <2.1.4": ">=2.1.4",
"glob@>=10.2.0 <10.5.0": ">=10.5.0",
"glob@>=11.0.0 <11.1.0": ">=11.1.0",
"jws@=4.0.0": ">=4.0.1",
"jws@<3.2.3": ">=3.2.3"
}
}
}