Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Codex generated images show in chat, including on Android with a Windows host #19066

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/19066/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 9 changed files with 211 additions and 1 deletion (loading 8).

x
0 of 9 viewed, 9 left
211 additions and 1 deletionapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -77,6 +77,7 @@
const isProviderAdapterEventStreamError = Schema.is(
ProviderAdapter.ProviderAdapterEventStreamError,
);
+const encodeUnknownJson = Schema.encodeUnknownSync(Schema.fromJsonString(Schema.Unknown));
​
describe("CodexAdapterV2 context usage", () => {
it("uses the current context rather than cumulative processed tokens", () => {
@@ -1086,6 +1087,7 @@
Effect.void,
onRequest: (method: string, params: unknown) => Effect.Effect<void> = () => Effect.void,
readChildMetadata?: Parameters<typeof withCodexReplayChildMetadata>[2],
+ beforeEmitInbound?: CodexReplay.CodexAppServerReplayDriver["beforeEmitInbound"],
Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
@@ -1096,9 +1098,13 @@
const changes = yield* makeChangeSignal;
const continuationRequests: Array<ProviderContinuationRequests.ProviderContinuationRequest> =
+ const driver = yield* CodexReplay.makeReplayDriver(
+ transcript,
+ beforeEmitInbound === undefined ? {} : { beforeEmitInbound },
+ );
const clientFactory: CodexAdapterV2.CodexAppServerClientFactoryShape = {
open: (openInput) =>
- Layer.build(CodexReplay.layerReplay(transcript)).pipe(
+ Layer.build(CodexReplay.layerReplayWithDriver(driver)).pipe(