Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): missed steers appear after the previous reply #27982

ClosedAlb11747(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/27982/headopened View on GitHub

Showing 2 changed files with 72 additions and 3 deletions.

x
0 of 2 viewed, 2 left
48 additions and 1 deletionapps/server/src/orchestration-v2/SteeringCompletion.integration.test.tsModified
View file
@@ -1390,11 +1390,33 @@
assert.equal(started[1]?.message.messageId, MessageId.make("message:steer"));
assert.deepEqual(started[1]?.modelSelection, composerSelection);
assert.deepEqual(projection.thread.modelSelection, composerSelection);
+ const messages = projection.turnItems.filter(
+ (item) =>
+ item.type === "user_message" && item.messageId === MessageId.make("message:steer"),
+ );
+ assert.lengthOf(messages, 1);
+ assert.equal(messages[0]!.runId, started[1]!.runId);
+ assert.isAbove(
+ messages[0]!.ordinal,
+ Math.max(
+ ...projection.turnItems
+ .filter((item) => item.runId === first.runId)
+ .map((item) => item.ordinal),
+ ),
+ );
}).pipe(Effect.provide(layer));
-it.effect.each(["complete", "stop-before-decline", "stop-after-decline", "queued-model"] as const)(
+const declinedSteerTimings = [
+ "complete",
+ "stop-before-decline",
+ "stop-after-decline",
+ "queued-model",
+ "second-steer",
+] as const;