2
0

(setVariable) Add Transcription system var (#1507)

Closes #1484
This commit is contained in:
Baptiste Arnaud
2024-05-15 14:24:55 +02:00
committed by GitHub
parent ec7ff8d9ca
commit 40f21203b5
102 changed files with 2911 additions and 986 deletions

View File

@ -13,6 +13,7 @@ type Props = {
typebot?: StartTypebot
userId?: string
prefilledVariables?: Record<string, unknown>
sessionId?: string
}
export const startChatPreview = async ({
@ -24,6 +25,7 @@ export const startChatPreview = async ({
typebot: startTypebot,
userId,
prefilledVariables,
sessionId,
}: Props) => {
const {
typebot,
@ -34,6 +36,7 @@ export const startChatPreview = async ({
clientSideActions,
newSessionState,
visitedEdges,
setVariableHistory,
} = await startSession({
version: 2,
startParams: {
@ -45,6 +48,7 @@ export const startChatPreview = async ({
typebot: startTypebot,
userId,
prefilledVariables,
sessionId,
},
message,
})
@ -61,9 +65,11 @@ export const startChatPreview = async ({
logs,
clientSideActions,
visitedEdges,
setVariableHistory,
hasCustomEmbedBubble: messages.some(
(message) => message.type === 'custom-embed'
),
initialSessionId: sessionId,
})
const isEnded =