fix: remove cached mcpClient in diagnostic tracking to prevent stale references (#727)
* fix: remove cached mcpClient in diagnostic tracking to prevent stale references Resolves TODO comment about not caching the connected mcpClient since it can change. Changes: - Remove cached mcpClient field from DiagnosticTrackingService - Add currentMcpClients storage to track active clients - Update beforeFileEdited, getNewDiagnostics, and ensureFileOpened to accept client parameter - Add backward-compatible methods to maintain existing API - Update all callers to use new methods - Add comprehensive test coverage This prevents using stale MCP client references during reconnections, making diagnostic tracking more reliable. Fixes #TODO * docs: add my contributions section to README Add fork-specific section highlighting: - Diagnostic tracking enhancement (PR #727) - Technical skills demonstrated - Links to original project and my work - Professional contribution showcase * revert: remove README.md contributions section to comply with reviewer request - Remove 'My Fork & Contributions' section from README.md - Keep README.md focused on original project documentation - Maintain clean, project-focused README as requested by reviewer
This commit is contained in:
committed by
GitHub
parent
b786b765f0
commit
2c98be7002
@@ -2882,7 +2882,7 @@ async function getDiagnosticAttachments(
|
||||
}
|
||||
|
||||
// Get new diagnostics from the tracker (IDE diagnostics via MCP)
|
||||
const newDiagnostics = await diagnosticTracker.getNewDiagnostics()
|
||||
const newDiagnostics = await diagnosticTracker.getNewDiagnosticsCompat()
|
||||
if (newDiagnostics.length === 0) {
|
||||
return []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user