Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.10.22 (Preview)

### Fixed
- **Multi-binlog timeline/tree crash** — fixed "requires explicit binlog_file" errors when the MCP server was started with multiple binlogs. The sidebar, tree prefetch, diagnostics, and timeline now correctly inject `binlog_file` even when the sidebar and MCP server binlog lists are out of sync.

## 0.10.21 (Preview)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "binlog-analyzer",
"displayName": "MSBuild Binlog Analyzer",
"description": "Analyze MSBuild binary logs with Copilot Chat and MCP tools",
"version": "0.10.21",
"version": "0.10.22",
"preview": true,
"publisher": "dotutils",
"license": "MIT",
Expand Down
5 changes: 3 additions & 2 deletions src/binlogTreeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class BinlogTreeDataProvider implements vscode.TreeDataProvider<BinlogTre

await Promise.allSettled(calls.map(async (c) => {
try {
const result = await client.callTool(c.tool, c.args);
const result = await this.mcpCall(c.tool, c.args);
const data = this.tryParseJson(result.text);

if (c.cache === 'projects') {
Expand Down Expand Up @@ -1668,7 +1668,8 @@ export class BinlogTreeDataProvider implements vscode.TreeDataProvider<BinlogTre
private mcpCall(tool: string, args: Record<string, unknown> = {}): Promise<{ text: string }> {
if (!this.mcpClient) { throw new Error('MCP server not connected'); }
if (!args.binlog_file && this.binlogPaths.length >= 1) {
args.binlog_file = this.activeBinlogPath || this.binlogPaths[0];
const copy = { ...args, binlog_file: this.activeBinlogPath || this.binlogPaths[0] };
return this.mcpClient.callTool(tool, copy);
}
return this.mcpClient.callTool(tool, args);
}
Expand Down
6 changes: 5 additions & 1 deletion src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export class BinlogDiagnosticsProvider implements vscode.Disposable {
if (!this.mcpClient) { return; }

try {
const result = await this.mcpClient.callTool('get_diagnostics');
const args: Record<string, unknown> = {};
if (this.mcpClient.loadedBinlogs.length > 1) {
args.binlog_file = this.mcpClient.loadedBinlogs[0];
}
const result = await this.mcpClient.callTool('get_diagnostics', args);
const data = JSON.parse(result.text);
const diagnostics = this.parseMcpDiagnostics(data);
this.cachedDiagnostics = diagnostics;
Expand Down
5 changes: 4 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ function escapeHtml(s: string): string {
*/
function callMcpTool(tool: string, args: Record<string, unknown> = {}): Promise<{ text: string }> {
if (!mcpClient) { throw new Error('MCP server not connected'); }
if (!args.binlog_file && allBinlogPaths.length > 1) {
// Always inject binlog_file when the MCP server was started with multiple
// binlogs — even if the user removed one from the sidebar, the server
// still requires an explicit path.
if (!args.binlog_file && (allBinlogPaths.length > 1 || (mcpClient.loadedBinlogs && mcpClient.loadedBinlogs.length > 1))) {
const copy = { ...args, binlog_file: currentBinlogPath || allBinlogPaths[0] };
return mcpClient.callTool(tool, copy);
}
Expand Down
Loading