Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): usage-limit auto-resume uses native resume when the provider has it #45678

Openshivamhwp(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/45678/headopened View on GitHub

Showing 2 changed files with 43 additions and 1 deletion.

x
0 of 2 viewed, 2 left
37 additions and 0 deletionsapps/server/src/orchestration-v2/ProviderTurnStartService.test.tsModified
View file
@@ -477,6 +477,7 @@
function makeLocalCommandHarness(input: {
readonly text: string;
readonly manualContinuation?: boolean;
+ readonly usageLimitContinuation?: boolean;
readonly nativeResumeUnsupported?: boolean;
readonly steeringRestart?: boolean;
readonly nativeGoals?: boolean;
@@ -548,6 +549,9 @@
const messageId = MessageId.make("message-native-account-command");
const run: OrchestrationV2ThreadProjection["runs"][number] = {
...(input.manualContinuation ? { manualContinuationOfRunId: RunId.make("stopped-run") } : {}),
+ ...(input.usageLimitContinuation
+ ? { usageLimitContinuationOfRunId: RunId.make("usage-limited-run") }
+ : {}),
id: runId,
threadId,
ordinal: 2,
@@ -2484,6 +2488,39 @@
+effectIt.effect(
+ "a usage-limit continuation resumes natively when the provider has native resume",
+ () =>
+ Effect.gen(function* () {
+ const harness = makeLocalCommandHarness({
+ text: "Continue where you left off.",