Copilot/knowledge gap fixes#5
Merged
Merged
Conversation
Includes: - Knowledge-gap fixes: LM tools, CodeAction, multi-binlog, bundling, CI matrix - Lazy-loaded markdown chat playbooks (massive system-prompt reduction) - Preexisting bug fixes: multi-root resolveFilePath, MCP timer leak, spawn error handler - Tree-view loading-state regression fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…in callTool Regression introduced in 0.10.17 prompt refactor: the single-binlog system context block listed only the bare filename (active='msbuild.binlog'). Models echoed that as binlog_file=msbuild.binlog, which bypassed the auto-inject (callTool only fills binlog_file when missing) and the MCP server failed to resolve a relative path. Fixes: - chatParticipant: surface the absolute path in the <binlogs> block and tell the model to either omit binlog_file or pass the full path verbatim. - mcpClient.callTool: when exactly one binlog is loaded, replace any binlog_file value that doesn't match the loaded path with the loaded absolute path (defense in depth against models that hallucinate filenames). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Two issues caused the model to reply 'Would you like me to proceed?' instead of running an overview after a binlog was loaded: 1. extension.ts injected '@binlog ... is loaded. What would you like to analyze?' as the first chat message. The model read this as a question to itself and politely deferred. Now we send '@binlog /summary' which triggers binlog_overview directly via the prepared playbook. 2. core.md said 'begin investigations with binlog_overview unless the question is narrowly scoped' but did not forbid asking permission. Tightened to: act immediately, do not ask, default to binlog_overview when the user_request is empty/vague. Drops two now-unused locals (fileName, multi) from the activation path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Root cause: 0.10.16 added five language-model tools named binlog_overview / binlog_errors / binlog_search / binlog_perf / binlog_compare. The BinlogInsights MCP server already exposes tools with the SAME names. VS Code's tool registry treated this as a name collision and the later registration (ours, at activation) shadowed the MCP-server tools. Our wrappers have a stricter client.isReady check that fails during the brief MCP-startup window after /summary opens a fresh chat — producing the 'No .binlog file is currently loaded' regression even with a binlog visibly loaded in the tree. - Rename all five wrappers to binlog_lm_* in package.json contributions and in languageModelTools.ts — eliminates the collision so the original MCP tools remain reachable everywhere. - Update the @binlog chat participant to exclude binlog_lm_* tools from its tool list. The wrappers exist for OTHER agents (@workspace, agent mode, custom modes) that don't have direct MCP access; the @binlog participant always has the MCP originals and shouldn't go through the redundant trampoline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n 0.10.20) The mcp.json-launched MCP server tools aren't reliably present in vscode.lm.tools at chat-open time (server startup race). The binlog_lm_* wrappers go through the tree's already-running McpClient and are the reliable path. Excluding them in 0.10.20 left the participant with zero tools when MCP server hadn't registered yet. Also updates playbooks to mention both binlog_lm_* and original tool names so the model picks whichever is available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add missing /timeline command playbook (was mapped to perf but had no per-command instructions) - Add /timeline to STATELESS_COMMANDS set (no chat history needed) - Fix compare.md: replace misleading binlog_file_a/binlog_file_b with correct parameter names and add explicit path instruction - Fix codeActions.ts: update tool references from binlog_search/binlog_errors to binlog_lm_search/binlog_lm_errors - Fix chatModes.systemPrompt: mention binlog_lm_* wrapper names alongside MCP names - Fix languageModelTools.ts: update doc comments to reflect binlog_lm_* naming and accurate auto-inject behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The /summary auto-greeting was firing before the MCP client finished initializing. The code waited only for mcpConfigPromise (mcp.json write) but not for treeClientPromise (the actual MCP subprocess). The LM-tool wrappers checked client.isReady and returned 'No binlog loaded' because the client was still in its handshake. Fixes: - Wait for both mcpConfigPromise AND treeClientPromise (with 15s cap) before firing the auto-greeting - Add retry loop in LM-tool wrappers: if client exists but isn't ready, poll every 500ms up to 10s before giving up Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Fix All flow tells the agent to rebuild (regenerating the binlog at the same path), but the tree never refreshed because nothing watched for file changes. Added a polling watcher (same pattern as the Optimize flow) that detects when the binlog file is rewritten and auto-reloads the tree. Also bumped version for the MCP startup race fix from 0.10.23. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously Fix All told the agent to rebuild with -bl pointing at the
original binlog path, overwriting it. Now it:
- Writes to a new file: {name}_fixed_{N}.binlog
- Preserves the original as the baseline
- Polls for the new file, then loads both (before + after) so the
user can use /compare immediately
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Both BuildCheck and regular diagnostics blindly used absolute paths from the binlog output without checking if they exist locally. When analysing a binlog built on CI or another machine, clicking a diagnostic in the Problems panel showed 'file not found'. Both resolvers now: - Check if the absolute path exists locally before using it - Try the relative portion against each workspace folder - Try just the filename against workspace folders - Skip (return null) if the file can't be found locally, instead of creating a diagnostic pointing at a nonexistent path Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extended the path resolution fix to binlogTreeView.ts — all three places that create vscode.open commands (error/warning items, parseDiagnosticsData, search results) now resolve paths through resolveLocalPath() which: - Checks if the absolute path exists locally - Tries the relative portion against workspace folders - Tries the filename against workspace folders and binlog directory - Returns undefined (no click handler) if file can't be found locally Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Right-clicking an error or warning in the Binlog Explorer tree now shows: - 'Ask @binlog about this issue' — explains the diagnostic with context - 'Fix with @binlog' — suggests concrete MSBuild XML / CLI fix Both open Copilot Chat pre-filled with the full diagnostic text and binlog path, using binlog_lm_search and binlog_lm_errors for context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The 'Fix with @binlog' context menu action was sending to the @binlog participant which can only explain, not edit files. Changed to send to agent mode (like Fix All) with explicit instructions to open the file, apply the fix, and show what changed. Renamed to 'Auto-fix with Copilot'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
workspaceMatchesBinlog and getSourceLabel used require('path') which
behaves differently on Linux vs Windows. On Ubuntu CI, path.dirname
and path.sep don't handle Windows backslash paths, causing 21 test
failures. Replaced with explicit forward-slash normalization that
works identically on all platforms.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
No description provided.