Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): async questions keep a running thread Working #15430

MergedGigioxx(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/15430/headmerged by juliusmarminge View on GitHub

Showing 8 changed files with 92 additions and 4 deletions (loading 7).

x
0 of 8 viewed, 8 left
92 additions and 4 deletionsapps/server/src/orchestration-v2/ProjectionStore.test.tsModified
View file
@@ -3179,6 +3179,48 @@
assert.isNull(shell?.latestRunCompletedAt);
+ const requestId = RuntimeRequestId.make("request:projection-shell-question");
+ for (const [responseCapability, blocking] of [
+ [{ type: "message" }, false],
+ [{ type: "live", providerSessionId: ProviderSessionId.make("session:question") }, true],
+ ] as const) {
+ yield* projectionStore.apply({
+ id: EventId.make(`event:projection-shell-question:${responseCapability.type}`),
+ type: "runtime-request.updated",
+ threadId,
+ nodeId: rootNodeId,
+ driver,
+ occurredAt: now,
+ payload: {
+ id: requestId,
+ nodeId: rootNodeId,
+ providerTurnId: null,
+ nativeRequestRef: null,
+ kind: "user_input",
+ status: "pending",
+ responseCapability,
+ createdAt: now,
+ resolvedAt: null,
+ },
+ });
+ const projection = yield* projectionStore.getThreadProjection(threadId);
+ const sqlShell = (yield* projectionStore.getShellSnapshot()).threads.find(