fix(tools): Install on a tool without an installer opens the settings page on that tool (#5710)

Install in the Language Servers popup or an install notification, for a server the IDE can't install itself, opened Settings › Language Servers on the first language, away from the manual install command. It now opens the page on that tool (languages.servers#<tool>).
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-25 07:35:32 +08:00
1 джерело 5f437929c0
коміт dd4d3325d4
2 files changed
+8 -3

No files matched your search

+3 -2
Переглянути файл
@@ -597,7 +597,7 @@ describe("LanguageServersPage", () => {
});
describe("tools.install action", () => {
it("installs installable tools and opens the page for the rest", async () => {
it("installs installable tools and opens the page on the rest", async () => {
const { executeAction, registerAction } = await import("@/platform/actions");
const { activate } = await import("../index");
const opened: unknown[] = [];
@@ -614,7 +614,8 @@ describe("tools.install action", () => {
expect(useTools.getState().tools.find((t) => t.name === "gopls")?.status).toBe("installed");
expect(opened).toEqual([]);
await executeAction("tools.install", "solargraph");
expect(opened).toEqual(["languages.servers"]);
// Opened on that tool, where its manual install hint is.
expect(opened).toEqual(["languages.servers#solargraph"]);
} finally {
disposers.reverse().forEach((d) => d());
}
+5 -1
Переглянути файл
@@ -69,7 +69,11 @@ export function activate(): () => void {
return;
}
}
await executeAction("file.settings", SETTINGS_PAGE_ID);
// Opened on that tool, where its manual install hint is.
await executeAction(
"file.settings",
typeof arg === "string" ? `${SETTINGS_PAGE_ID}#${arg}` : SETTINGS_PAGE_ID,
);
},
},
]),