-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpackage.json
More file actions
641 lines (641 loc) · 20.2 KB
/
Copy pathpackage.json
File metadata and controls
641 lines (641 loc) · 20.2 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
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
{
"name": "binlog-analyzer",
"displayName": "MSBuild Binlog Analyzer",
"description": "Analyze MSBuild binary logs with Copilot Chat and MCP tools",
"version": "0.10.25",
"preview": true,
"publisher": "dotutils",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/dotutils/vscode-binlog-analyzer"
},
"homepage": "https://github.com/dotutils/vscode-binlog-analyzer#readme",
"icon": "images/icon.png",
"bugs": {
"url": "https://github.com/dotutils/vscode-binlog-analyzer/issues"
},
"engines": {
"vscode": "^1.99.0"
},
"categories": [
"Linters",
"Chat"
],
"keywords": [
"msbuild",
"binlog",
"build",
"diagnostics",
"copilot"
],
"galleryBanner": {
"color": "#1e1e1e",
"theme": "dark"
},
"extensionDependencies": [
"github.copilot-chat"
],
"activationEvents": [
"onUri",
"onView:binlogExplorer",
"onCustomEditor:binlog-analyzer.binlogViewer"
],
"main": "./dist/extension.js",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "binlog-analyzer",
"title": "Binlog Analyzer",
"icon": "images/icon-mono.svg"
}
]
},
"views": {
"binlog-analyzer": [
{
"id": "binlogExplorer",
"name": "Binlog Explorer",
"icon": "$(file-binary)",
"contextualTitle": "Binlog Analyzer"
}
]
},
"viewsWelcome": [
{
"view": "binlogExplorer",
"contents": "$(sync~spin) Updating MCP server…\n\nThe binlog will be restored automatically after the update completes.",
"when": "binlog.updatingMcp"
}
],
"keybindings": [
{
"command": "binlog.copyItem",
"key": "ctrl+c",
"mac": "cmd+c",
"when": "focusedView == binlogExplorer && listFocus"
}
],
"commands": [
{
"command": "binlog.loadFile",
"title": "Binlog: Load File"
},
{
"command": "binlog.addFile",
"title": "Binlog: Add File",
"icon": "$(add)"
},
{
"command": "binlog.removeFile",
"title": "Binlog: Remove File",
"icon": "$(close)"
},
{
"command": "binlog.manageBinlogs",
"title": "Binlog: Manage Loaded Binlogs"
},
{
"command": "binlog.openProjectFolder",
"title": "Binlog: Open Project Folder",
"icon": "$(folder-opened)"
},
{
"command": "binlog.showBuildSummary",
"title": "Binlog: Show Build Summary"
},
{
"command": "binlog.refreshTree",
"title": "Binlog: Reload",
"shortTitle": "Reload",
"icon": "$(refresh)"
},
{
"command": "binlog.openInEditor",
"title": "Binlog: Open in Editor"
},
{
"command": "binlog.openProjectDetails",
"title": "Binlog: View Project Details"
},
{
"command": "binlog.fixAllIssues",
"title": "Binlog: Fix All Build Issues",
"icon": "$(sparkle)"
},
{
"command": "binlog.setWorkspaceFolder",
"title": "Binlog: Set Workspace Folder",
"icon": "$(root-folder)"
},
{
"command": "binlog.showErrors",
"title": "Binlog: Show Errors"
},
{
"command": "binlog.buildAndCollect",
"title": "Binlog: Build & Collect Binlog",
"icon": "$(tools)"
},
{
"command": "binlog.copyItem",
"title": "Copy",
"icon": "$(clippy)"
},
{
"command": "binlog.copyAllErrors",
"title": "Copy All Errors"
},
{
"command": "binlog.copyAllWarnings",
"title": "Copy All Warnings"
},
{
"command": "binlog.openInStructuredLogViewer",
"title": "Binlog: Open in Structured Log Viewer",
"icon": "$(link-external)"
},
{
"command": "binlog.showTimeline",
"title": "Binlog: Show Build Timeline",
"icon": "$(graph)"
},
{
"command": "binlog.compareTimelines",
"title": "Binlog: Compare Build Timelines",
"icon": "$(diff)"
},
{
"command": "binlog.optimizeBuild",
"title": "Binlog: Optimize Build (Apply & Compare)",
"icon": "$(sparkle)"
},
{
"command": "binlog.searchBinlog",
"title": "Binlog: Search Build Events",
"icon": "$(search)"
},
{
"command": "binlog.clearSearch",
"title": "Binlog: Clear Search Results"
},
{
"command": "binlog.searchLoadAll",
"title": "Binlog: Load All Search Results"
},
{
"command": "binlog.exportTextLog",
"title": "Binlog: Export as Text Log",
"icon": "$(output)"
},
{
"command": "binlog.analyzeInChat",
"title": "Analyze in Copilot Chat",
"icon": "$(comment-discussion)"
},
{
"command": "binlog.askAboutDiagnostic",
"title": "Ask @binlog about this issue",
"icon": "$(comment-discussion)"
},
{
"command": "binlog.fixDiagnostic",
"title": "Auto-fix with Copilot",
"icon": "$(sparkle)"
},
{
"command": "binlog.checkForUpdates",
"title": "Binlog: Check for MCP Server Updates"
},
{
"command": "binlog.updateMcpServer",
"title": "Binlog: Update MCP Server"
},
{
"command": "binlog.refreshMcpInfo",
"title": "Binlog: Refresh MCP Info",
"icon": "$(refresh)"
},
{
"command": "binlog.downloadFromCi",
"title": "Binlog: Download Binlog from CI/CD",
"icon": "$(cloud-download)"
},
{
"command": "binlog.runBuildCheck",
"title": "Binlog: Run BuildCheck Analysis",
"icon": "$(checklist)"
},
{
"command": "binlog.rebuildWithPropertyTracking",
"title": "Binlog: Rebuild with Property Tracking",
"icon": "$(symbol-property)"
}
],
"configuration": {
"title": "Binlog Analyzer",
"properties": {
"binlogAnalyzer.activeBinlogs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Binlog file paths to load automatically. Set by Structured Log Viewer when opening in VS Code."
},
"binlogAnalyzer.mcpServerPath": {
"type": "string",
"default": "",
"description": "Custom path to the MCP server dotnet tool (Microsoft.AITools.BinlogMcp). Leave empty to use the globally installed tool."
},
"binlogAnalyzer.mcpServerArgs": {
"type": "string",
"default": "--binlog ${binlog}",
"markdownDescription": "Argument template for the MCP server. Use `${binlog}` as a placeholder for each binlog path. Repeated for each loaded binlog. Examples:\n- Microsoft.AITools.BinlogMcp: `--binlog ${binlog}` (default)\n- Custom: `--file ${binlog}`"
},
"binlogAnalyzer.autoLoad": {
"type": "boolean",
"default": true,
"description": "Automatically load binlog and push diagnostics when activated via URI handler."
},
"binlogAnalyzer.diagnosticsSeverityFilter": {
"type": "string",
"default": "Warning",
"enum": [
"Error",
"Warning",
"Info"
],
"description": "Minimum severity level to show in the Problems panel."
},
"binlogAnalyzer.inlineDecorations": {
"type": "boolean",
"default": true,
"description": "Show build errors as inline decorations in source files."
},
"binlogAnalyzer.chat.includeAllTools": {
"type": "boolean",
"default": false,
"description": "When enabled, the @binlog chat participant exposes ALL available tools (file editing, terminal, etc.) to the model, not just binlog MCP tools."
},
"binlogAnalyzer.chat.additionalToolPatterns": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional tool name patterns to include in the @binlog chat participant. Each entry is matched as a substring against tool names (e.g. 'copilot_codebase', 'terminal')."
},
"binlogAnalyzer.diagnostics.propertyTrackingLevel": {
"type": "number",
"default": 15,
"enum": [
1,
2,
3,
4,
7,
8,
15
],
"enumDescriptions": [
"Reassignment only",
"Initial values only",
"Reassignment + initial values",
"Environment variable reads only",
"Reassignment + initial values + env reads",
"Uninitialized property reads only",
"All property tracking (recommended)"
],
"description": "MsBuildLogPropertyTracking level to use when rebuilding with property tracking. 15 = all events."
},
"binlogAnalyzer.diagnostics.autoRunBuildCheck": {
"type": "boolean",
"default": false,
"description": "Automatically run BuildCheck analysis when a binlog is loaded (requires .NET SDK 9.0.100+)."
}
}
},
"customEditors": [
{
"viewType": "binlog-analyzer.binlogViewer",
"displayName": "MSBuild Binlog Analyzer",
"selector": [
{
"filenamePattern": "*.binlog"
}
],
"priority": "default"
}
],
"languageModelTools": [
{
"name": "binlog_lm_overview",
"displayName": "Binlog: Overview",
"modelDescription": "Summarise the loaded MSBuild binary log: build result, duration, project count, top-level errors and warnings.",
"userDescription": "Get a high-level summary of the loaded binlog.",
"tags": [
"binlog",
"msbuild",
"build",
"diagnostics"
],
"canBeReferencedInPrompt": true,
"toolReferenceName": "binlogOverview",
"icon": "$(file-binary)",
"inputSchema": {
"type": "object",
"properties": {
"binlog": {
"type": "string",
"description": "Optional. Absolute path to the binlog to analyse. Required when more than one binlog is loaded."
}
}
}
},
{
"name": "binlog_lm_errors",
"displayName": "Binlog: Errors",
"modelDescription": "List build errors and warnings from the loaded MSBuild binary log with file paths, line numbers and error codes.",
"userDescription": "List errors and warnings from the loaded binlog.",
"tags": [
"binlog",
"msbuild",
"build",
"diagnostics"
],
"canBeReferencedInPrompt": true,
"toolReferenceName": "binlogErrors",
"icon": "$(error)",
"inputSchema": {
"type": "object",
"properties": {
"binlog": {
"type": "string"
}
}
}
},
{
"name": "binlog_lm_search",
"displayName": "Binlog: Search",
"modelDescription": "Free-text search across all build events in the loaded MSBuild binary log (targets, tasks, messages, properties).",
"userDescription": "Search across all events in the loaded binlog.",
"tags": [
"binlog",
"msbuild",
"build"
],
"canBeReferencedInPrompt": true,
"toolReferenceName": "binlogSearch",
"icon": "$(search)",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Required. Free-text search query."
},
"binlog": {
"type": "string"
}
},
"required": [
"query"
]
}
},
{
"name": "binlog_lm_perf",
"displayName": "Binlog: Performance Summary",
"modelDescription": "Performance analysis: returns expensive targets, tasks, projects and Roslyn analyzers from the loaded MSBuild binary log.",
"userDescription": "Get performance bottlenecks from the loaded binlog.",
"tags": [
"binlog",
"msbuild",
"build",
"performance"
],
"canBeReferencedInPrompt": true,
"toolReferenceName": "binlogPerf",
"icon": "$(graph)",
"inputSchema": {
"type": "object",
"properties": {
"binlog": {
"type": "string"
}
}
}
},
{
"name": "binlog_lm_compare",
"displayName": "Binlog: Compare",
"modelDescription": "Compare two loaded MSBuild binary logs and report differences in result, errors, properties and target durations.",
"userDescription": "Compare two loaded binlogs.",
"tags": [
"binlog",
"msbuild",
"build"
],
"canBeReferencedInPrompt": true,
"toolReferenceName": "binlogCompare",
"icon": "$(diff)",
"inputSchema": {
"type": "object",
"properties": {
"binlog": {
"type": "string",
"description": "Path to the first binlog (defaults to the first loaded binlog)."
},
"binlog_other": {
"type": "string",
"description": "Path to the second binlog (defaults to the second loaded binlog)."
}
}
}
}
],
"chatParticipants": [
{
"id": "binlog-analyzer.binlog",
"name": "binlog",
"fullName": "MSBuild Binlog Analyzer",
"description": "Ask questions about MSBuild binary logs — build errors, performance, targets, and more.",
"isSticky": false,
"commands": [
{
"name": "errors",
"description": "Show build errors and warnings with analysis"
},
{
"name": "timeline",
"description": "Analyze build timeline and performance"
},
{
"name": "targets",
"description": "List and analyze MSBuild targets"
},
{
"name": "summary",
"description": "Show a comprehensive build summary"
},
{
"name": "compare",
"description": "Compare two loaded binlogs to spot regressions and configuration differences"
},
{
"name": "perf",
"description": "Deep performance analysis with prioritized actionable optimization suggestions"
},
{
"name": "incremental",
"description": "Analyze build incrementality — find targets that rebuild unnecessarily and suggest fixes"
},
{
"name": "search",
"description": "Search across all build events — targets, tasks, messages, properties"
},
{
"name": "properties",
"description": "Browse and analyze MSBuild properties from the build"
},
{
"name": "items",
"description": "Browse MSBuild items (PackageReference, Compile, etc.) and their metadata"
},
{
"name": "buildcheck",
"description": "Run MSBuild BuildCheck rules against the loaded binlog (double writes, undefined properties, etc.)"
},
{
"name": "propertyhistory",
"description": "Show the assignment history and provenance of an MSBuild property"
}
]
}
],
"chatModes": [
{
"slug": "build-analysis",
"name": "Build Analysis",
"description": "Pre-configured for MSBuild binlog investigation with Microsoft.AITools.BinlogMcp MCP tools.",
"toolsReferences": [
{
"type": "tool",
"id": "binlog_insights_mcp"
}
],
"systemPrompt": "You are an MSBuild build analysis assistant with Microsoft.AITools.BinlogMcp MCP tools available. Begin investigations with binlog_lm_overview (or binlog_overview) unless the question is narrowly scoped, then drill in with the most specific tool. For performance: rank with binlog_expensive_targets / binlog_expensive_tasks / binlog_expensive_projects / binlog_expensive_analyzers. For errors: binlog_lm_errors (or binlog_errors) then binlog_lm_search (or binlog_search). For deeper context the @binlog chat participant exposes the same tools plus prepared playbooks (try /perf, /incremental, /summary, /errors, /buildcheck). All tools take a binlog_file path parameter — ask the user if you don't know it. Reference real file paths, line numbers and error codes from tool output; don't invent numbers."
}
],
"menus": {
"view/title": [
{
"command": "binlog.searchBinlog",
"when": "view == binlogExplorer && binlog.hasLoadedBinlogs",
"group": "navigation"
},
{
"command": "binlog.refreshTree",
"when": "view == binlogExplorer",
"group": "navigation"
},
{
"command": "binlog.showTimeline",
"when": "view == binlogExplorer && binlog.hasLoadedBinlogs",
"group": "navigation"
},
{
"command": "binlog.compareTimelines",
"when": "view == binlogExplorer && binlog.hasMultipleBinlogs",
"group": "navigation"
},
{
"command": "binlog.runBuildCheck",
"when": "view == binlogExplorer && binlog.hasLoadedBinlogs",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "binlog.removeFile",
"when": "view == binlogExplorer && viewItem == binlogFile",
"group": "inline"
},
{
"command": "binlog.openInStructuredLogViewer",
"when": "view == binlogExplorer && viewItem == binlogFile",
"group": "2_open"
},
{
"command": "binlog.copyItem",
"when": "view == binlogExplorer && viewItem =~ /^copyable/",
"group": "1_copy"
},
{
"command": "binlog.copyAllErrors",
"when": "view == binlogExplorer && viewItem == errorsRoot",
"group": "1_copy"
},
{
"command": "binlog.copyAllWarnings",
"when": "view == binlogExplorer && viewItem == warningsRoot",
"group": "1_copy"
},
{
"command": "binlog.analyzeInChat",
"when": "view == binlogExplorer && viewItem =~ /^copyable-(perf|target|task|search)/",
"group": "0_analyze"
},
{
"command": "binlog.askAboutDiagnostic",
"when": "view == binlogExplorer && viewItem == copyable-diagnostic",
"group": "0_analyze"
},
{
"command": "binlog.fixDiagnostic",
"when": "view == binlogExplorer && viewItem == copyable-diagnostic",
"group": "0_analyze"
},
{
"command": "binlog.refreshMcpInfo",
"when": "view == binlogExplorer && viewItem =~ /aboutRoot|mcpRoot/",
"group": "1_refresh"
},
{
"command": "binlog.checkForUpdates",
"when": "view == binlogExplorer && viewItem =~ /aboutRoot|mcpRoot/",
"group": "2_update"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run bundle",
"compile": "tsc -p ./",
"bundle": "node esbuild.config.js",
"bundle:watch": "node esbuild.config.js --watch",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile",
"test": "mocha --ui tdd out/test/*.test.js",
"test:e2e": "node out/test/e2e/runTest.js",
"lint": "eslint src",
"package": "npm run bundle && vsce package"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "^20.0.0",
"@types/vscode": "^1.99.0",
"@vscode/test-electron": "^2.5.2",
"@vscode/vsce": "^3.0.0",
"esbuild": "^0.24.2",
"glob": "^13.0.6",
"mocha": "^11.7.5",
"typescript": "^5.5.0"
},
"dependencies": {
"@vscode/extension-telemetry": "^0.9.0"
}
}