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

Function workspacePullState

packages/opencode/src/lsp/client.ts:367–377  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365 }
366
367 function workspacePullState() {
368 const workspaceRegistrations = [...diagnosticRegistrations.values()].filter(
369 (registration) => registration.registerOptions?.workspaceDiagnostics === true,
370 )
371 return {
372 workspaceIdentifiers: [
373 ...new Set(workspaceRegistrations.flatMap((registration) => registration.registerOptions?.identifier ?? [])),
374 ],
375 supported: workspaceRegistrations.length > 0,
376 }
377 }
378
379 const hasCurrentFileDiagnostics = (filePath: string, results: DiagnosticRequestResult[]) =>
380 results.some((result) => (result.byFile.get(filePath)?.length ?? 0) > 0)

Callers 1

requestFullDiagnosticsFunction · 0.85

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected