Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
type ChatAttachment,
CommandId,
EventId,
type MessageId,
type ModelSelection,
type OrchestrationEvent,
ProviderDriverKind,
Expand Down Expand Up @@ -930,6 +931,7 @@ const make = Effect.gen(function* () {

const buildSendTurnRequestForThread = Effect.fnUntraced(function* (input: {
readonly threadId: ThreadId;
readonly turnStartMessageId?: MessageId;
readonly messageText: string;
readonly attachments?: ReadonlyArray<ChatAttachment>;
readonly modelSelection?: ModelSelection;
Expand Down Expand Up @@ -981,6 +983,9 @@ const make = Effect.gen(function* () {

return {
threadId: input.threadId,
...(input.turnStartMessageId !== undefined
? { turnStartMessageId: input.turnStartMessageId }
: {}),
...(normalizedInput ? { input: normalizedInput } : {}),
...(normalizedAttachments.length > 0 ? { attachments: normalizedAttachments } : {}),
...(modelForTurn !== undefined ? { modelSelection: modelForTurn } : {}),
Expand Down Expand Up @@ -1546,6 +1551,7 @@ const make = Effect.gen(function* () {
}
const sendTurnRequest = yield* buildSendTurnRequestForThread({
threadId: event.payload.threadId,
turnStartMessageId: event.payload.messageId,
messageText: projectComposerContextForProvider({
text: message.text,
records: message.context?.records ?? [],
Expand Down
Loading
Loading