@ -11,8 +11,14 @@ type Props = {
|
||||
origin: string | undefined
|
||||
message?: string
|
||||
sessionId: string
|
||||
textBubbleContentFormat: 'richText' | 'markdown'
|
||||
}
|
||||
export const continueChat = async ({ origin, sessionId, message }: Props) => {
|
||||
export const continueChat = async ({
|
||||
origin,
|
||||
sessionId,
|
||||
message,
|
||||
textBubbleContentFormat,
|
||||
}: Props) => {
|
||||
const session = await getSession(sessionId)
|
||||
|
||||
if (!session) {
|
||||
@ -57,6 +63,7 @@ export const continueChat = async ({ origin, sessionId, message }: Props) => {
|
||||
version: 2,
|
||||
state: session.state,
|
||||
startTime: Date.now(),
|
||||
textBubbleContentFormat,
|
||||
})
|
||||
|
||||
if (newSessionState)
|
||||
|
@ -12,6 +12,7 @@ type Props = {
|
||||
isStreamEnabled: boolean
|
||||
prefilledVariables?: Record<string, unknown>
|
||||
resultId?: string
|
||||
textBubbleContentFormat: 'richText' | 'markdown'
|
||||
}
|
||||
|
||||
export const startChat = async ({
|
||||
@ -22,6 +23,7 @@ export const startChat = async ({
|
||||
isStreamEnabled,
|
||||
prefilledVariables,
|
||||
resultId: startResultId,
|
||||
textBubbleContentFormat,
|
||||
}: Props) => {
|
||||
const {
|
||||
typebot,
|
||||
@ -43,6 +45,7 @@ export const startChat = async ({
|
||||
publicId,
|
||||
prefilledVariables,
|
||||
resultId: startResultId,
|
||||
textBubbleContentFormat,
|
||||
},
|
||||
message,
|
||||
})
|
||||
|
@ -14,6 +14,7 @@ type Props = {
|
||||
userId?: string
|
||||
prefilledVariables?: Record<string, unknown>
|
||||
sessionId?: string
|
||||
textBubbleContentFormat: 'richText' | 'markdown'
|
||||
}
|
||||
|
||||
export const startChatPreview = async ({
|
||||
@ -26,6 +27,7 @@ export const startChatPreview = async ({
|
||||
userId,
|
||||
prefilledVariables,
|
||||
sessionId,
|
||||
textBubbleContentFormat,
|
||||
}: Props) => {
|
||||
const {
|
||||
typebot,
|
||||
@ -49,6 +51,7 @@ export const startChatPreview = async ({
|
||||
userId,
|
||||
prefilledVariables,
|
||||
sessionId,
|
||||
textBubbleContentFormat,
|
||||
},
|
||||
message,
|
||||
})
|
||||
|
Reference in New Issue
Block a user