🚸 (openai) Improve streaming bubble sequence and visual

This commit is contained in:
Baptiste Arnaud
2023-10-09 11:30:51 +02:00
parent 8eb9f2568b
commit 49826d1303
10 changed files with 69 additions and 25 deletions

View File

@@ -117,7 +117,9 @@ export const ChatChunk = (props: Props) => {
<div
class="flex flex-col flex-1 gap-2"
style={{
width: isMobile() ? 'calc(100% - 32px)' : 'calc(100% - 48px)',
'max-width': isMobile()
? 'calc(100% - 32px)'
: 'calc(100% - 48px)',
'margin-right': props.theme.chat.guestAvatar?.isEnabled
? isMobile()
? '32px'

View File

@@ -297,8 +297,9 @@ export const ConversationContainer = (props: Props) => {
context={props.context}
hideAvatar={
!chatChunk.input &&
!chatChunk.streamingMessageId &&
index() < chatChunks().length - 1
((chatChunks()[index() + 1]?.messages ?? 0).length > 0 ||
chatChunks()[index() + 1]?.streamingMessageId !== undefined ||
isSending())
}
hasError={hasError() && index() === chatChunks().length - 1}
onNewBubbleDisplayed={handleNewBubbleDisplayed}

View File

@@ -28,7 +28,7 @@ export const StreamingBubble = (props: Props) => {
return (
<div class="flex flex-col animate-fade-in">
<div class="flex w-full items-center">
<div class="flex relative items-start typebot-host-bubble w-full">
<div class="flex relative items-start typebot-host-bubble max-w-full">
<div
class="flex items-center absolute px-4 py-2 bubble-typing "
style={{