From 1908d217f0449cba12b085e86acde1b40e0bca3c Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Mon, 28 Oct 2024 23:14:07 +0100 Subject: [PATCH] chore(ui): armonize loading state of `CoreChatBot` - WF-88 --- .../content/CoreChatBot/CoreChatbotAvatar.vue | 28 +++ .../content/CoreChatBot/CoreChatbotLoader.vue | 65 ++++++ .../CoreChatBot/CoreChatbotMessage.vue | 160 +++++++++++++++ .../CoreChatbotSentMessageIcon.vue | 14 ++ .../components/core/content/CoreChatbot.vue | 192 +++--------------- 5 files changed, 296 insertions(+), 163 deletions(-) create mode 100644 src/ui/src/components/core/content/CoreChatBot/CoreChatbotAvatar.vue create mode 100644 src/ui/src/components/core/content/CoreChatBot/CoreChatbotLoader.vue create mode 100644 src/ui/src/components/core/content/CoreChatBot/CoreChatbotMessage.vue create mode 100644 src/ui/src/components/core/content/CoreChatBot/CoreChatbotSentMessageIcon.vue diff --git a/src/ui/src/components/core/content/CoreChatBot/CoreChatbotAvatar.vue b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotAvatar.vue new file mode 100644 index 000000000..b7c90280e --- /dev/null +++ b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotAvatar.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/ui/src/components/core/content/CoreChatBot/CoreChatbotLoader.vue b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotLoader.vue new file mode 100644 index 000000000..2978722e8 --- /dev/null +++ b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotLoader.vue @@ -0,0 +1,65 @@ + + + diff --git a/src/ui/src/components/core/content/CoreChatBot/CoreChatbotMessage.vue b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotMessage.vue new file mode 100644 index 000000000..ad8c48cc5 --- /dev/null +++ b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotMessage.vue @@ -0,0 +1,160 @@ + + + + + + + diff --git a/src/ui/src/components/core/content/CoreChatBot/CoreChatbotSentMessageIcon.vue b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotSentMessageIcon.vue new file mode 100644 index 000000000..a7521894e --- /dev/null +++ b/src/ui/src/components/core/content/CoreChatBot/CoreChatbotSentMessageIcon.vue @@ -0,0 +1,14 @@ + diff --git a/src/ui/src/components/core/content/CoreChatbot.vue b/src/ui/src/components/core/content/CoreChatbot.vue index cd2c32a56..70064df84 100644 --- a/src/ui/src/components/core/content/CoreChatbot.vue +++ b/src/ui/src/components/core/content/CoreChatbot.vue @@ -9,55 +9,24 @@ See the stubs for more details.
-
-
- {{ - message.role == "assistant" - ? fields.assistantInitials.value - : fields.userInitials.value - }} -
-
-
- - - -
-
- -
-
-
-
- Loading... -
+ :message="message" + :use-markdown="fields.useMarkdown.value == 'yes'" + :assistant-role-color="fields.assistantRoleColor.value" + :initials=" + message.role === 'assistant' + ? fields.assistantInitials.value + : fields.userInitials.value + " + @action-click="handleActionClick($event)" + /> +