|
2 | 2 | type ChatAttachment, |
3 | 3 | CommandId, |
4 | 4 | EventId, |
| 5 | + type MessageId, |
5 | 6 | type ModelSelection, |
6 | 7 | type OrchestrationEvent, |
7 | 8 | ProviderDriverKind, |
@@ -930,6 +931,7 @@ const make = Effect.gen(function* () { |
930 | 931 |
|
931 | 932 | const buildSendTurnRequestForThread = Effect.fnUntraced(function* (input: { |
932 | 933 | readonly threadId: ThreadId; |
| 934 | + readonly turnStartMessageId?: MessageId; |
933 | 935 | readonly messageText: string; |
934 | 936 | readonly attachments?: ReadonlyArray<ChatAttachment>; |
935 | 937 | readonly modelSelection?: ModelSelection; |
@@ -981,6 +983,9 @@ const make = Effect.gen(function* () { |
981 | 983 |
|
982 | 984 | return { |
983 | 985 | threadId: input.threadId, |
| 986 | + ...(input.turnStartMessageId !== undefined |
| 987 | + ? { turnStartMessageId: input.turnStartMessageId } |
| 988 | + : {}), |
984 | 989 | ...(normalizedInput ? { input: normalizedInput } : {}), |
985 | 990 | ...(normalizedAttachments.length > 0 ? { attachments: normalizedAttachments } : {}), |
986 | 991 | ...(modelForTurn !== undefined ? { modelSelection: modelForTurn } : {}), |
@@ -1546,6 +1551,7 @@ const make = Effect.gen(function* () { |
1546 | 1551 | } |
1547 | 1552 | const sendTurnRequest = yield* buildSendTurnRequestForThread({ |
1548 | 1553 | threadId: event.payload.threadId, |
| 1554 | + turnStartMessageId: event.payload.messageId, |
1549 | 1555 | messageText: projectComposerContextForProvider({ |
1550 | 1556 | text: message.text, |
1551 | 1557 | records: message.context?.records ?? [], |
|
0 commit comments