messages as $m) { if ($m->role === 'user' || $m->role === 'assistant') { $inner .= (new MessageBubble($m, $this->md, $this->userName, $this->userAvatar, $this->assistantAvatar))->render(); } } if ($inner === '') { $inner = $this->tag('div', ['class' => 'ab-welcome'], $this->tag('img', ['class' => 'ab-welcome__avatar', 'src' => $this->u($this->assistantAvatar), 'alt' => '']) . $this->tag('p', ['class' => 'ab-welcome__text'], $this->e((string) $this->store->get('chat.welcome')))); } return $this->tag('div', ['id' => 'ab-messages', 'class' => 'ab-messages', 'data-conversation' => (string) $this->conversationId], $inner); } }