feat(app): install the openidea command on macOS, Windows and Linux (#2009)

Adds Install/Uninstall 'openidea' Command actions. macOS uses the bundle launcher, Windows a user PATH wrapper and named pipe, and Linux the executable/AppImage path with a PATH hint. Files, folders, positions and `diff` go to the running app or start it.

Closes #1286

Co-authored-by: jaw52 <[email protected]>
Цей коміт міститься в:
l0ng-aiтаjaw52 authored and GitHub committed 2026-11-08 19:25:50 +08:00
1 джерело 25424465c0
коміт 0bfd4fa3cc
28 files changed
+1601 -42

No files matched your search

+20
Переглянути файл
@@ -2,6 +2,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
import { registerFileEditorProvider } from "@/workbench/contributions";
import { EditorController, openFilePaths, useTabs } from "./controller";
import { createMemoryBackend } from "./backend";
import { storeSession } from "./model/session";
import { initialTabsState } from "./model/tabs";
import { useProject } from "@/platform/project";
@@ -63,6 +64,25 @@ function tabFor(path: string) {
}
describe("file open order", () => {
it("keeps the caret and activation of a file opened while the project's session restores", async () => {
const before = setup();
before.restoreSession("/p");
await before.openFile("/p/b.ts", { focus: false });
before.stop();
useTabs.setState(initialTabsState(), true);
try {
const controller = setup();
const open = controller.openFile("/p/a.ts", { selection: { line: 1, col: 2 }, focus: false });
controller.restoreSession("/p");
await open;
expect(openFilePaths(useTabs.getState()).sort()).toEqual(["/p/a.ts", "/p/b.ts"]);
expect(activePath()).toBe("/p/a.ts");
expect(controller.slotFor(tabFor("/p/a.ts")!.id)?.caret()).toMatchObject({ line: 1, col: 2 });
} finally {
storeSession("/p", null);
}
});
it.each([1, 30])("keeps the newer file active after an earlier probe (tab limit: %s)", async (tabLimit) => {
useProject.setState({ settings: { editor: { tabs: { tabLimit } } } as never });
const { started, response } = delayProvider();