🚸 (openai) Improve streaming bubble sequence and visual
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user