Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): send Codex browser guidance as application context #12739

Closedriccardopll(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/12739/headopened View on GitHub

Showing 3 changed files with 100 additions and 40 deletions.

x
0 of 3 viewed, 3 left
80 additions and 31 deletionsapps/server/src/provider/Layers/CodexSessionRuntime.test.tsModified
View file
@@ -9,7 +9,10 @@
import * as CodexRpc from "effect-codex-app-server/rpc";
import * as EffectCodexSchema from "effect-codex-app-server/schema";
​
-import { buildCodexDeveloperInstructions } from "../CodexDeveloperInstructions.ts";
+import {
+ buildCodexBrowserInstructions,
+ buildCodexDeveloperInstructions,
+} from "../CodexDeveloperInstructions.ts";
import { codexSessionAppServerArgs } from "./codexLaunchArgs.ts";
import {
buildTurnStartParams,
@@ -154,6 +157,72 @@
​
describe("buildTurnStartParams", () => {
+ it.effect("delivers browser guidance as application context without changing user input", () =>
+ Effect.gen(function* () {
+ for (const interactionMode of [undefined, "default", "plan"] as const) {
+ const params = yield* buildTurnStartParams({
+ threadId: "provider-thread-1",
+ runtimeMode: "full-access",
+ prompt: "Check the UI",
+ attachments: [{ type: "localImage", path: "/tmp/page.png" }],
+ ...(interactionMode ? { interactionMode } : {}),
+ browserToolsAvailable: { browser: true, device: true },
+ });
+ NodeAssert.deepEqual(params.input, [
+ { type: "text", text: "Check the UI" },