Add internal silent find-all-references command#14281
Add internal silent find-all-references command#14281carsonRadtke wants to merge 2 commits intomainfrom
Conversation
Introduce an internal C_Cpp.FindAllReferences command that issues the existing cpptools/findAllReferences request without joining the workspaceReferences single-flight cancellation path. Extract the shared request and confirmed-location mapping logic from FindAllReferencesProvider so the existing vscode.executeReferenceProvider flow and the new silent command use the same request translation and cancellation handling for server-side cancel responses. Keep the interactive provider behavior unchanged: user-invoked references still cancel prior work, reset reference progress state, and update the ReferencesManager UI. The new command resolves the owning client from the target URI and returns locations without progress UI, preview notifications, or references panel updates, enabling concurrent silent callers such as Copilot.
|
Should call hierarchy be handled too? I haven't checked yet if the issue repros with that or not, but it might. UPDATE: Yeah, I tried it out (without this change) and I see Call Hierarchy Callers of cancel Copilot's Find All References. I see the same thing with Rename. Both of those share the same underlying implementation. Does this change fix those cases too? I also see #GetSymbolCallHierarchy_CppTools get canceled by a user invoked Find All References/etc.. |
Introduce internal commands for document symbols and call hierarchy so silent callers can query cpptools without triggering the interactive provider side effects used by the VS Code UI. Extract the shared request/translation logic from the document symbol and call hierarchy providers so the existing provider implementations and the new command handlers reuse the same server request paths, cancellation handling, and result mapping. Keep the current interactive behavior intact for user-invoked provider flows, including reference view state management and call hierarchy telemetry, while exposing side-effect-free entry points for concurrent programmatic callers.
| } else { | ||
| detail = getLocalizedSymbolScope("protected", detail); | ||
| } | ||
| function getChildrenSymbols(symbols: LocalizeDocumentSymbol[]): vscode.DocumentSymbol[] { |
There was a problem hiding this comment.
@carsonRadtke I thought C/C++ DevTools only used workspace symbols and not document symbols? Why is document symbols changing instead of workspace symbols?
There was a problem hiding this comment.
I see DevTools issue workspace symbol requests and not document symbol requests.
Introduce an internal C_Cpp.FindAllReferences command that issues the existing cpptools/findAllReferences request without joining the workspaceReferences single-flight cancellation path.
Extract the shared request and confirmed-location mapping logic from FindAllReferencesProvider so the existing vscode.executeReferenceProvider flow and the new silent command use the same request translation and cancellation handling for server-side cancel responses.
Keep the interactive provider behavior unchanged: user-invoked references still cancel prior work, reset reference progress state, and update the ReferencesManager UI. The new command resolves the owning client from the target URI and returns locations without progress UI, preview notifications, or references panel updates, enabling concurrent silent callers such as Copilot.
Is part of a fix to ADO:2826103 and ADO:2741397 along with internal changes to the cpptools server and the devtools extension.