Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add a host-managed wait tool for Codex sessions #4262

ClosedJules-Astier(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/4262/headopened View on GitHub

Showing 6 changed files with 207 additions and 0 deletions (loading 5).

x
0 of 6 viewed, 6 left
207 additions and 0 deletionsapps/server/src/provider/Layers/CodexDynamicTools.test.tsAdded
View file
@@ -0,0 +1,207 @@
+import * as NodeAssert from "node:assert/strict";
+​
+import { it } from "@effect/vitest";
+import * as Deferred from "effect/Deferred";
+import * as Effect from "effect/Effect";
+import * as Fiber from "effect/Fiber";
+import * as TestClock from "effect/testing/TestClock";
+import { describe } from "vite-plus/test";
+import type * as EffectCodexSchema from "effect-codex-app-server/schema";
+​
+import {
+ handleT3CodexDynamicToolCall,
+ makeT3CodexDynamicToolWaitRegistry,
+ T3_CODEX_DYNAMIC_TOOLS,
+ T3_CODEX_DYNAMIC_TOOL_NAMESPACE,
+ T3_CODEX_WAIT_MAX_DURATION_MS,
+ T3_CODEX_WAIT_MIN_DURATION_MS,
+ T3_CODEX_WAIT_TOOL_NAME,
+} from "./CodexDynamicTools.ts";
+​
+function waitCall(
+ arguments_: unknown,
+ overrides: Partial<EffectCodexSchema.DynamicToolCallParams> = {},
+): EffectCodexSchema.DynamicToolCallParams {
+ return {
+ arguments: arguments_,
+ callId: "wait-call-1",
+ namespace: T3_CODEX_DYNAMIC_TOOL_NAMESPACE,
+ threadId: "provider-thread-1",
+ tool: T3_CODEX_WAIT_TOOL_NAME,