MCPcopy Create free account
hub / github.com/anomalyco/opencode / requestFullDiagnostics

Function requestFullDiagnostics

packages/opencode/src/lsp/client.ts:429–444  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

427 }
428
429 async function requestFullDiagnostics(filePath: string) {
430 const documentState = documentPullState()
431 const workspaceState = workspacePullState()
432 if (!documentState.supported && !workspaceState.supported) return { handled: false, matched: false }
433 return mergeResults(
434 filePath,
435 await Promise.all([
436 ...(documentState.supported ? [requestDiagnosticReport(filePath)] : []),
437 ...documentState.documentIdentifiers.map((identifier) => requestDiagnosticReport(filePath, identifier)),
438 ...(workspaceState.supported ? [requestWorkspaceDiagnosticReport(filePath)] : []),
439 ...workspaceState.workspaceIdentifiers.map((identifier) =>
440 requestWorkspaceDiagnosticReport(filePath, identifier),
441 ),
442 ]),
443 )
444 }
445
446 function waitForRegistrationChange(timeout: number) {
447 if (timeout <= 0) return Promise.resolve(false)

Callers 1

waitForFullDiagnosticsFunction · 0.85

Calls 6

documentPullStateFunction · 0.85
workspacePullStateFunction · 0.85
mergeResultsFunction · 0.85
requestDiagnosticReportFunction · 0.85
allMethod · 0.45

Tested by

no test coverage detected