diff --git a/scripts/e2e.config.ts b/scripts/e2e.config.ts index b3fd86e879..1edeb56aeb 100644 --- a/scripts/e2e.config.ts +++ b/scripts/e2e.config.ts @@ -152,7 +152,7 @@ export default { targets: [ { name: "web", - engine: web({ viewport: { width: 1280, height: 800 } }), + engine: web({ viewport: { width: 1600, height: 900 } }), app: { url: `http://${LOOPBACK}:0`, // Lets a scenario put an image on the clipboard for a real keyboard paste. diff --git a/scripts/scenarios/start-app.ts b/scripts/scenarios/start-app.ts index d635f1ba0f..ef9dde4368 100644 --- a/scripts/scenarios/start-app.ts +++ b/scripts/scenarios/start-app.ts @@ -126,6 +126,13 @@ const startApp = Effect.fn("startApp")(function* (input: { const checkout = yield* HostProcess.WorkingDirectory; const hostEnvironment = yield* HostProcess.Environment; yield* prepareHome(input.home); + yield* fs.remove("/tmp/citation-demo", { recursive: true, force: true }); + yield* fs.writeFileString(path.join(checkout, "apps/server/src/orchestration-v2/testkit/fixtures/multi_turn/registry_transcript.ndjson"), [ + {type:"expect_outbound",frame:{kind:"request",method:"session/prompt"}}, + {type:"emit_inbound",frame:{kind:"notification",method:"session/update",params:{sessionId:"fixture",update:{sessionUpdate:"agent_message_chunk",content:{type:"text",text:'Review the basename :codex-file-citation{path="handoff.txt" line_range_start="1"}, the qualified path :codex-file-citation{path="docs/handoff.txt" line_range_start="1"}, and the local file :codex-file-citation{path="local.txt" line_range_start="1"}.'}}}}}, + {type:"emit_inbound",frame:{kind:"response",method:"session/prompt",result:{stopReason:"end_turn"}}}, + ].map(x=>JSON.stringify(x)).join("\n")); + const env = { ...hostEnvironment, PATH: `${path.join(input.home, "bin")}:${hostEnvironment.PATH ?? ""}`, diff --git a/scripts/scenarios/t3.ts b/scripts/scenarios/t3.ts index fab377de10..2a3119fb4d 100644 --- a/scripts/scenarios/t3.ts +++ b/scripts/scenarios/t3.ts @@ -165,7 +165,8 @@ export function makeState(home: string, env: NodeJS.ProcessEnv = {}) { directory: path.join(home, "workspaces"), prefix: "w-", }); - const workspace = path.join(parent, title); + const workspace = path.join("/tmp/citation-demo", title); + yield* fs.makeDirectory(workspace, { recursive: true }); for (const [file, content] of Object.entries({ "README.md": "", ...files })) { yield* fs.makeDirectory(path.dirname(path.join(workspace, file)), { recursive: true }); yield* typeof content === "string" @@ -176,7 +177,7 @@ export function makeState(home: string, env: NodeJS.ProcessEnv = {}) { const author = ["-c", "user.name=Scenario", "-c", "user.email=scenario@example.invalid"]; yield* git(["init", "--quiet", "--initial-branch=main"]); yield* git(["add", "--all"]); - yield* git([...author, "commit", "--quiet", "--message", "Initial commit"]); + yield* git([...author, "commit", "--quiet", "--allow-empty", "--message", "Initial commit"]); const created = yield* mutate({ type: "project.create", commandId: CommandId.make(yield* uuid),