Fix multi-binlog crashes in timeline, tree view, and diagnostics#11
Merged
Conversation
Four call sites failed with 'requires explicit binlog_file' when the MCP server was started with multiple binlogs: 1. extension.ts callMcpTool — checked allBinlogPaths (sidebar) but not mcpClient.loadedBinlogs (server). After removing a binlog from the sidebar the two lists diverged, skipping binlog_file injection. 2. binlogTreeView.ts prefetch — called client.callTool directly, bypassing the mcpCall wrapper entirely. 3. binlogTreeView.ts mcpCall — mutated the args object in-place instead of making a copy, causing side effects on shared arg literals. 4. diagnostics.ts loadFromMcpClient — called callTool with no args at all, never injecting binlog_file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes "requires explicit binlog_file" crashes when multiple binlogs are loaded.
Bug
Opening the Build Timeline, expanding tree nodes, or loading diagnostics failed with multi-binlog because four call sites did not inject
binlog_fileinto MCP tool calls.Fixes
extension.tscallMcpTool— also checksmcpClient.loadedBinlogs(not just sidebar list) to detect multi-binlogbinlogTreeView.tsprefetch — was callingclient.callTooldirectly, now usesmcpCallwrapperbinlogTreeView.tsmcpCall— was mutating args in-place, now makes a shallow copydiagnostics.ts— was callingcallToolwith no args at allVersion
0.10.21 → 0.10.22