Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): register Windows OAuth callbacks with the app entry point #15995

MergedAskPlays(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/15995/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 82 additions and 2 deletions.

x
0 of 2 viewed, 2 left
68 additions and 2 deletionsapps/desktop/src/app/DesktopClerk.test.tsModified
View file
@@ -1,6 +1,7 @@
// @effect-diagnostics nodeBuiltinImport:off globalFetchInEffect:off - Hosted handoff test uses a real localhost listener without an OpenAI account.
import * as NodeHttp from "node:http";
-import * as NodePath from "@effect/platform-node/NodePath";
+import * as NodePath from "node:path";
+import * as PlatformNodePath from "@effect/platform-node/NodePath";
import { codexAuthHandoffUrl, readCodexAuthDelivery } from "@t3tools/shared/codexAuthHandoff";
import { EnvironmentId, ProviderInstanceId } from "@t3tools/contracts";
import * as HostProcess from "@t3tools/shared/HostProcess";
@@ -59,11 +60,15 @@
copyText: () => Effect.void,
},
listeners = new Map<string, (...args: unknown[]) => void>(),
+ isPackaged = false,
) => {
const environment = DesktopEnvironment.DesktopEnvironment.of({
stateDir: "/tmp/t3-state",
isDevelopment,
appDataDirectory: "/tmp/app-data",
+ isPackaged,
+ dirname: platform === "win32" ? String.raw`C:\T3 Code\dist-electron` : "/tmp/dist-electron",
+ path: platform === "win32" ? NodePath.win32 : NodePath.posix,
platform,
} as unknown as DesktopEnvironment.DesktopEnvironment["Service"]);
​
@@ -95,7 +100,7 @@
return DesktopClerk.layer.pipe(
Layer.provide(
Layer.mergeAll(