Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(orchestration-v2): restore earlier app agent transcript pages #14104

MergedBil0000(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/14104/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 64 additions and 4 deletions (loading 1).

x
0 of 4 viewed, 4 left
30 additions and 0 deletionsapps/server/src/orchestration-v2/ProjectionStore.test.tsModified
View file
@@ -1377,6 +1377,36 @@
(row) => row.sourceItemId === interruptResultId,
+​
+ yield* sql`
+ UPDATE orchestration_v2_projection_turn_items
+ SET payload_json = json_set(payload_json, '$.createdBy', 'agent')
+ WHERE thread_id = ${threadId} AND type = 'user_message'
+ `;
+ const agentPromptId = TurnItemId.make("turn-item:bounded-sql-history:interrupt-filler:1281");
+ yield* sql`
+ UPDATE orchestration_v2_projection_turn_items
+ SET type = 'user_message',
+ payload_json = json_set(payload_json,
+ '$.type', 'user_message', '$.inputIntent', 'turn_start',
+ '$.createdBy', 'agent', '$.creationSource', 'provider',
+ '$.messageId', 'message:bounded-sql-history:agent-prompt',
+ '$.text', 'Continue the child task', '$.attachments', json('[]'))
+ WHERE turn_item_id = ${agentPromptId}
+ `;
+ const agentWindow = yield* projectionStore.getThreadSnapshotWindow(threadId, {
+ rowLimit: sqlPageLimit,
+ userTurnLimit: THREAD_HISTORY_PAGE_POLICY.maxUserTurns,
+ });
+ assert.lengthOf(
+ agentWindow.projection.visibleTurnItems.filter(
+ (row) => row.item.type !== "run_interrupt_request",
+ ),
+ sqlPageLimit,