Skip to content

Commit 2cfa9df

Browse files
authored
Merge branch 'dev' into fix/variant-support
2 parents 0f6f700 + bb7b26d commit 2cfa9df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/messages/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const SYNTHETIC_PART_ID = "prt_01234567890123456789012345"
88

99
export const createSyntheticUserMessage = (baseMessage: WithParts, content: string, variant?: string): WithParts => {
1010
const userInfo = baseMessage.info as UserMessage
11+
const variant = (userInfo as any).variant
1112
return {
1213
info: {
1314
id: SYNTHETIC_MESSAGE_ID,
@@ -19,7 +20,6 @@ export const createSyntheticUserMessage = (baseMessage: WithParts, content: stri
1920
providerID: userInfo.model.providerID,
2021
modelID: userInfo.model.modelID,
2122
},
22-
// variant is passed from state.variant (cached by chat.message hook)
2323
...(variant !== undefined && { variant }),
2424
},
2525
parts: [

0 commit comments

Comments
 (0)