diff --git a/src/features/tools/__tests__/tools.test.tsx b/src/features/tools/__tests__/tools.test.tsx index 82d305fd52..45277081a7 100644 --- a/src/features/tools/__tests__/tools.test.tsx +++ b/src/features/tools/__tests__/tools.test.tsx @@ -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()); } diff --git a/src/features/tools/index.ts b/src/features/tools/index.ts index 4c1fee6fc3..1ba5fd447b 100644 --- a/src/features/tools/index.ts +++ b/src/features/tools/index.ts @@ -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, + ); }, }, ]),