Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Codex sessions can use the OpenAI Chrome plugin again #34704

Opendbalders(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/34704/headopened View on GitHub

Showing 9 changed files with 169 additions and 3 deletions (loading 6).

x
0 of 9 viewed, 9 left
128 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -78,6 +78,7 @@
import * as PortScanner from "../../preview/PortScanner.ts";
import { resolveProviderCompatibility } from "../../provider/providerCompatibility.ts";
import * as CodexAdapterV2 from "./CodexAdapterV2.ts";
+import { requestBrowserAccess } from "../../provider/testFixtures/browserAccessClient.ts";
import { withCodexReplayChildMetadata } from "./CodexAdapterV2.testkit.ts";
import * as CodexAdapterV2Testkit from "./CodexAdapterV2.testkit.ts";
​
@@ -1372,9 +1373,11 @@
promptSuggestions: Effect.Effect<boolean> = Effect.succeed(false),
onNotification: (method: string) => Effect.Effect<void> = () => Effect.void,
models?: CodexAdapterV2.CodexAdapterV2Options["models"],
+ environment: NodeJS.ProcessEnv = {},
Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
+ let launchEnvironment: NodeJS.ProcessEnv = {};
const idAllocator = yield* IdAllocator.IdAllocatorV2;
const serverConfig = yield* ProviderReplayHarness.makeReplayServerConfig(
transcript.scenario,
@@ -1389,6 +1392,7 @@
const clientFactory: CodexAdapterV2.CodexAppServerClientFactoryShape = {
open: (openInput) =>
Layer.build(CodexReplay.layerReplayWithDriver(driver)).pipe(
+ Effect.tap(() => Effect.sync(() => (launchEnvironment = openInput.environment))),
Effect.mapError(
(cause) =>
new ProviderAdapter.ProviderAdapterOpenSessionError({