@mrclrchtr/supi-code-intelligence 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +212 -0
- package/node_modules/@mrclrchtr/supi-core/README.md +90 -0
- package/node_modules/@mrclrchtr/supi-core/package.json +30 -0
- package/node_modules/@mrclrchtr/supi-core/src/config-settings.ts +76 -0
- package/node_modules/@mrclrchtr/supi-core/src/config.ts +186 -0
- package/node_modules/@mrclrchtr/supi-core/src/context-messages.ts +119 -0
- package/node_modules/@mrclrchtr/supi-core/src/context-provider-registry.ts +36 -0
- package/node_modules/@mrclrchtr/supi-core/src/context-tag.ts +31 -0
- package/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +255 -0
- package/node_modules/@mrclrchtr/supi-core/src/index.ts +83 -0
- package/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +170 -0
- package/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +54 -0
- package/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +29 -0
- package/node_modules/@mrclrchtr/supi-core/src/settings-command.ts +15 -0
- package/node_modules/@mrclrchtr/supi-core/src/settings-registry.ts +41 -0
- package/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +226 -0
- package/node_modules/@mrclrchtr/supi-core/src/terminal.ts +60 -0
- package/node_modules/@mrclrchtr/supi-lsp/README.md +112 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/README.md +90 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +30 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config-settings.ts +76 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config.ts +186 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context-messages.ts +119 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context-provider-registry.ts +36 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context-tag.ts +31 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/debug-registry.ts +255 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/index.ts +83 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/project-roots.ts +170 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/registry-utils.ts +54 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/session-utils.ts +29 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings-command.ts +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings-registry.ts +41 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +226 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/terminal.ts +60 -0
- package/node_modules/@mrclrchtr/supi-lsp/package.json +45 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/capabilities.ts +62 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client-refresh.ts +229 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/client.ts +545 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/client/transport.ts +192 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/config.ts +143 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/defaults.json +82 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostic-augmentation.ts +82 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostic-display.ts +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostic-summary.ts +73 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/diagnostics.ts +98 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/stale-diagnostics.ts +47 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/suppression-diagnostics.ts +58 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/format.ts +359 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/guidance.ts +163 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/index.ts +17 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/lsp-state.ts +82 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/lsp.ts +470 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-client-state.ts +34 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-diagnostics.ts +139 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-helpers.ts +39 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-project-info.ts +46 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-types.ts +39 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-recovery.ts +83 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +18 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +550 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/overrides.ts +173 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/pattern-matcher.ts +197 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/renderer.ts +120 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/scanner.ts +153 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/search-fallback.ts +98 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/service-registry.ts +153 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/settings-registration.ts +292 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/summary.ts +153 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/tool-actions.ts +430 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/tree-persist.ts +48 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/tsconfig-scope.ts +156 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/types.ts +409 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/ui.ts +358 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/utils.ts +122 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/workspace-sentinels.ts +114 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/README.md +97 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +67 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/.gitkeep +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/bash/tree-sitter-bash.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/bash/tree-sitter-bash.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/c/tree-sitter-c.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/c/tree-sitter-c.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/cpp/tree-sitter-cpp.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/cpp/tree-sitter-cpp.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/go/tree-sitter-go.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/go/tree-sitter-go.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/html/tree-sitter-html.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/html/tree-sitter-html.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/java/tree-sitter-java.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/java/tree-sitter-java.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/javascript/tree-sitter-javascript.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/javascript/tree-sitter-javascript.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm.json +12 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/python/tree-sitter-python.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/python/tree-sitter-python.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/r/tree-sitter-r.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/r/tree-sitter-r.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/ruby/tree-sitter-ruby.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/ruby/tree-sitter-ruby.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/rust/tree-sitter-rust.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/rust/tree-sitter-rust.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm.json +19 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/tsx/tree-sitter-tsx.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/typescript/tree-sitter-typescript.wasm.json +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/scripts/generate-kotlin-wasm.mjs +126 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/scripts/generate-sql-wasm.mjs +144 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/scripts/vendor-wasm.mjs +151 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/callees.ts +343 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/coordinates.ts +108 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/exports.ts +315 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/formatting.ts +104 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/imports.ts +42 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/index.ts +16 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/language.ts +116 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/node-at.ts +96 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/outline.ts +287 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/runtime.ts +237 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session.ts +112 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/structure.ts +7 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/syntax-node.ts +13 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tree-sitter.ts +306 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/types.ts +146 -0
- package/package.json +47 -0
- package/src/actions/affected-action.ts +310 -0
- package/src/actions/brief-action.ts +242 -0
- package/src/actions/callees-action.ts +134 -0
- package/src/actions/callers-action.ts +215 -0
- package/src/actions/implementations-action.ts +190 -0
- package/src/actions/index-action.ts +187 -0
- package/src/actions/pattern-action.ts +232 -0
- package/src/architecture.ts +367 -0
- package/src/brief-focused.ts +383 -0
- package/src/brief.ts +228 -0
- package/src/code-intelligence.ts +122 -0
- package/src/git-context.ts +65 -0
- package/src/guidance.ts +39 -0
- package/src/index.ts +28 -0
- package/src/resolve-target.ts +104 -0
- package/src/search-helpers.ts +283 -0
- package/src/target-resolution.ts +368 -0
- package/src/tool-actions.ts +109 -0
- package/src/types.ts +57 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { LspClient } from "../client/client.ts";
|
|
2
|
+
import { displayRelativeFilePath } from "../summary.ts";
|
|
3
|
+
import type { ProjectServerInfo } from "../types.ts";
|
|
4
|
+
|
|
5
|
+
interface ProjectServerInfoInput {
|
|
6
|
+
serverName: string;
|
|
7
|
+
root: string;
|
|
8
|
+
fileTypes: string[];
|
|
9
|
+
client: LspClient | undefined;
|
|
10
|
+
unavailable: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function buildProjectServerInfo(
|
|
14
|
+
input: ProjectServerInfoInput,
|
|
15
|
+
cwd: string,
|
|
16
|
+
): ProjectServerInfo {
|
|
17
|
+
const status = input.unavailable
|
|
18
|
+
? "unavailable"
|
|
19
|
+
: input.client?.status === "running"
|
|
20
|
+
? "running"
|
|
21
|
+
: input.client?.status === "error"
|
|
22
|
+
? "error"
|
|
23
|
+
: "unavailable";
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
name: input.serverName,
|
|
27
|
+
root: input.root,
|
|
28
|
+
fileTypes: input.fileTypes,
|
|
29
|
+
status,
|
|
30
|
+
supportedActions: getSupportedActions(input.client?.serverCapabilities),
|
|
31
|
+
openFiles: input.client?.openFiles.map((file) => displayRelativeFilePath(file, cwd)) ?? [],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getSupportedActions(capabilities: LspClient["serverCapabilities"] | undefined): string[] {
|
|
36
|
+
if (!capabilities) return [];
|
|
37
|
+
|
|
38
|
+
const actions: string[] = ["diagnostics [optional file]"];
|
|
39
|
+
if (capabilities.hoverProvider) actions.push("hover(file,line,char)");
|
|
40
|
+
if (capabilities.definitionProvider) actions.push("definition(file,line,char)");
|
|
41
|
+
if (capabilities.referencesProvider) actions.push("references(file,line,char)");
|
|
42
|
+
if (capabilities.documentSymbolProvider) actions.push("symbols(file)");
|
|
43
|
+
if (capabilities.renameProvider) actions.push("rename(file,line,char,newName)");
|
|
44
|
+
if (capabilities.codeActionProvider) actions.push("code_actions(file,line,char)");
|
|
45
|
+
return actions;
|
|
46
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// LSP manager types — shared summaries and status shapes used by UI/guidance.
|
|
2
|
+
|
|
3
|
+
export interface ServerStatus {
|
|
4
|
+
name: string;
|
|
5
|
+
status: "running" | "error" | "unavailable";
|
|
6
|
+
root: string;
|
|
7
|
+
openFiles: string[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface DiagnosticSummary {
|
|
11
|
+
file: string;
|
|
12
|
+
errors: number;
|
|
13
|
+
warnings: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CoverageSummaryEntry {
|
|
17
|
+
name: string;
|
|
18
|
+
fileTypes: string[];
|
|
19
|
+
active: boolean;
|
|
20
|
+
openFiles: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ActiveCoverageSummaryEntry {
|
|
24
|
+
name: string;
|
|
25
|
+
openFiles: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface OutstandingDiagnosticSummaryEntry {
|
|
29
|
+
file: string;
|
|
30
|
+
total: number;
|
|
31
|
+
errors: number;
|
|
32
|
+
warnings: number;
|
|
33
|
+
information: number;
|
|
34
|
+
hints: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ManagerStatus {
|
|
38
|
+
servers: ServerStatus[];
|
|
39
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assessStaleDiagnostics,
|
|
3
|
+
type StaleDiagnosticAssessment,
|
|
4
|
+
} from "../diagnostics/stale-diagnostics.ts";
|
|
5
|
+
import type { Diagnostic, FileEvent } from "../types.ts";
|
|
6
|
+
|
|
7
|
+
export interface WorkspaceRecoveryResult {
|
|
8
|
+
refreshedClients: number;
|
|
9
|
+
restartedClients: number;
|
|
10
|
+
staleAssessment: StaleDiagnosticAssessment;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface WorkspaceRecoveryHost {
|
|
14
|
+
clearAllPullResultIds(): void;
|
|
15
|
+
notifyWorkspaceFileChanges(changes: FileEvent[]): void;
|
|
16
|
+
refreshOpenDiagnostics(options?: { maxWaitMs?: number; quietMs?: number }): Promise<void>;
|
|
17
|
+
getOutstandingDiagnostics(
|
|
18
|
+
maxSeverity?: number,
|
|
19
|
+
): Array<{ file: string; diagnostics: Diagnostic[] }>;
|
|
20
|
+
getStatus(): { servers: Array<{ status: "running" | "error" | "unavailable" }> };
|
|
21
|
+
restartClientsForFiles(filePaths: string[]): Promise<string[]>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Clear cached pull IDs and forward watched-file changes to active clients. */
|
|
25
|
+
export function softRecoverWorkspaceDiagnostics(
|
|
26
|
+
host: WorkspaceRecoveryHost,
|
|
27
|
+
changes: FileEvent[] = [],
|
|
28
|
+
): number {
|
|
29
|
+
host.clearAllPullResultIds();
|
|
30
|
+
if (changes.length > 0) host.notifyWorkspaceFileChanges(changes);
|
|
31
|
+
return countRunningClients(host);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Run a recovery pass, refreshing diagnostics and escalating if stale state remains. */
|
|
35
|
+
export async function recoverWorkspaceDiagnostics(
|
|
36
|
+
host: WorkspaceRecoveryHost,
|
|
37
|
+
options: {
|
|
38
|
+
changes?: FileEvent[];
|
|
39
|
+
restartIfStillStale?: boolean;
|
|
40
|
+
maxWaitMs?: number;
|
|
41
|
+
quietMs?: number;
|
|
42
|
+
} = {},
|
|
43
|
+
): Promise<WorkspaceRecoveryResult> {
|
|
44
|
+
const refreshedClients = softRecoverWorkspaceDiagnostics(host, options.changes ?? []);
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
await host.refreshOpenDiagnostics({ maxWaitMs: options.maxWaitMs, quietMs: options.quietMs });
|
|
48
|
+
} catch {
|
|
49
|
+
// Recovery should be best-effort.
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let staleAssessment = assessStaleDiagnostics(host.getOutstandingDiagnostics(1));
|
|
53
|
+
let restartedClients = 0;
|
|
54
|
+
|
|
55
|
+
if (options.restartIfStillStale && staleAssessment.suspected) {
|
|
56
|
+
const restarted = await host.restartClientsForFiles(
|
|
57
|
+
staleAssessment.matchedFiles.map((entry) => entry.file),
|
|
58
|
+
);
|
|
59
|
+
restartedClients = restarted.length;
|
|
60
|
+
|
|
61
|
+
if (restartedClients > 0) {
|
|
62
|
+
try {
|
|
63
|
+
await host.refreshOpenDiagnostics({
|
|
64
|
+
maxWaitMs: options.maxWaitMs,
|
|
65
|
+
quietMs: options.quietMs,
|
|
66
|
+
});
|
|
67
|
+
} catch {
|
|
68
|
+
// Keep the previous assessment if the follow-up refresh fails.
|
|
69
|
+
}
|
|
70
|
+
staleAssessment = assessStaleDiagnostics(host.getOutstandingDiagnostics(1));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
refreshedClients,
|
|
76
|
+
restartedClients,
|
|
77
|
+
staleAssessment,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function countRunningClients(host: WorkspaceRecoveryHost): number {
|
|
82
|
+
return host.getStatus().servers.filter((server) => server.status === "running").length;
|
|
83
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LspClient } from "../client/client.ts";
|
|
2
|
+
import type { SymbolInformation, WorkspaceSymbol } from "../types.ts";
|
|
3
|
+
|
|
4
|
+
export async function managerWorkspaceSymbol(
|
|
5
|
+
clients: Iterable<LspClient>,
|
|
6
|
+
query: string,
|
|
7
|
+
): Promise<(SymbolInformation | WorkspaceSymbol)[] | null> {
|
|
8
|
+
const all: (SymbolInformation | WorkspaceSymbol)[] = [];
|
|
9
|
+
let hasSupport = false;
|
|
10
|
+
for (const client of clients) {
|
|
11
|
+
if (client.status !== "running") continue;
|
|
12
|
+
if (!client.serverCapabilities?.workspaceSymbolProvider) continue;
|
|
13
|
+
hasSupport = true;
|
|
14
|
+
const result = await client.workspaceSymbol(query);
|
|
15
|
+
if (result) all.push(...result);
|
|
16
|
+
}
|
|
17
|
+
return hasSupport ? all : null;
|
|
18
|
+
}
|