Merge pull request #3130 from lkk214/fix/symbols-for-file

fix: Add context/getSymbolsForFiles endpoint in JetBrains and handle …
This commit is contained in:
Nate Sesti 2024-11-29 16:42:51 -08:00 • committed by GitHub
commit f9d2aee6ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -290,7 +290,12 @@ export async function getSymbolsForManyFiles(
const filesAndSymbols = await Promise.all(
uris.map(async (uri): Promise<[string, SymbolWithRange[]]> => {
const contents = await ide.readFile(uri);
const symbols = await getSymbolsForFile(uri, contents);
let symbols = undefined;
try {
symbols = await getSymbolsForFile(uri, contents);
} catch (e) {
console.error(`Failed to get symbols for ${uri}:`, e);
}
return [uri, symbols ?? []];
}),
);

View file

@ -66,6 +66,7 @@ class ContinueBrowser(val project: Project, url: String) {
"config/listProfiles",
"profiles/switch",
"didChangeSelectedProfile",
"context/getSymbolsForFiles",
)
private fun registerAppSchemeHandler() {