- Add external opener support alongside browser/editor launches - Remove the `open` dependency and cover platform behavior in tests
Showing the changes to apps/server/src/wsServer.test.ts (1 of 7 files). Show all
Unified · Split
| @@ -63,6 +63,8 @@ const asThreadId = (value: string): ThreadId => ThreadId.makeUnsafe(value); · 62 unmodified lines | ||
| 63 | 63 | const asTurnId = (value: string): TurnId => TurnId.makeUnsafe(value); |
| 64 | 64 | |
| 65 | 65 | const defaultOpenService: OpenShape = { |
| 66 | + getAvailableEditors: Effect.succeed([]), | |
| 67 | + openExternal: () => Effect.void, | |
| 66 | 68 | openBrowser: () => Effect.void, |
| 67 | 69 | openInEditor: () => Effect.void, |
| 68 | 70 | }; |
| @@ -1030,6 +1032,8 @@ describe("WebSocket Server", () => { · 961 unmodified lines | ||
| 1030 | 1032 | it("routes shell.openInEditor through the injected open service", async () => { |
| 1031 | 1033 | const openCalls: Array<{ cwd: string; editor: string }> = []; |
| 1032 | 1034 | const openService: OpenShape = { |
| 1035 | + getAvailableEditors: Effect.succeed([]), | |
| 1036 | + openExternal: () => Effect.void, | |
| 1033 | 1037 | openBrowser: () => Effect.void, |
| 1034 | 1038 | openInEditor: (input) => { |
| 1035 | 1039 | openCalls.push({ cwd: input.cwd, editor: input.editor }); |
| @@ -1531,6 +1535,8 @@ describe("WebSocket Server", () => { · 495 unmodified lines | ||
| 1531 | 1535 | process.on("unhandledRejection", onUnhandledRejection); |
| 1532 | 1536 | |
| 1533 | 1537 | const brokenOpenService: OpenShape = { |
| 1538 | + getAvailableEditors: Effect.succeed([]), | |
| 1539 | + openExternal: () => Effect.void, | |
| 1534 | 1540 | openBrowser: () => Effect.void, |
| 1535 | 1541 | openInEditor: () => |
| 1536 | 1542 | Effect.sync(() => BigInt(1)).pipe(Effect.map((result) => result as unknown as void)), |