feat(results): ⚡️ Improve logs details
This commit is contained in:
@@ -54,7 +54,7 @@ export const ChatBlock = ({
|
||||
setCurrentTypebotId,
|
||||
pushEdgeIdInLinkedTypebotQueue,
|
||||
} = useTypebot()
|
||||
const { resultValues, updateVariables } = useAnswers()
|
||||
const { resultValues, updateVariables, resultId } = useAnswers()
|
||||
const [processedSteps, setProcessedSteps] = useState<Step[]>([])
|
||||
const [displayedChunks, setDisplayedChunks] = useState<ChatDisplayChunk[]>([])
|
||||
|
||||
@@ -134,6 +134,7 @@ export const ChatBlock = ({
|
||||
resultValues,
|
||||
blocks: typebot.blocks,
|
||||
onNewLog,
|
||||
resultId,
|
||||
},
|
||||
})
|
||||
nextEdgeId ? onBlockEnd(nextEdgeId) : displayNextStep()
|
||||
|
||||
@@ -28,6 +28,7 @@ export type TypebotViewerProps = {
|
||||
apiHost?: string
|
||||
style?: CSSProperties
|
||||
predefinedVariables?: { [key: string]: string | undefined }
|
||||
resultId?: string
|
||||
onNewBlockVisible?: (edge: Edge) => void
|
||||
onNewAnswer?: (answer: Answer) => void
|
||||
onNewLog?: (log: Omit<Log, 'id' | 'createdAt' | 'resultId'>) => void
|
||||
@@ -40,6 +41,7 @@ export const TypebotViewer = ({
|
||||
apiHost = process.env.NEXT_PUBLIC_VIEWER_URL?.split(',')[0],
|
||||
isPreview = false,
|
||||
style,
|
||||
resultId,
|
||||
predefinedVariables,
|
||||
onNewLog,
|
||||
onNewBlockVisible,
|
||||
@@ -95,6 +97,7 @@ export const TypebotViewer = ({
|
||||
onNewLog={handleNewLog}
|
||||
>
|
||||
<AnswersContext
|
||||
resultId={resultId}
|
||||
onNewAnswer={handleNewAnswer}
|
||||
onVariablesUpdated={onVariablesUpdated}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user