Skip to content

Commit fe8b3ab

Browse files
refactor: changing from system to assistant
1 parent 26693bd commit fe8b3ab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/vue/vue3-ai-chatbot-widget/src/components/message-item.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
:class="classRoleApply"
55
>
66
<div
7-
v-if="isSystem"
7+
v-if="isAssistant"
88
class="flex gap-3 mt-1"
99
>
1010
<Avatar />
1111
</div>
1212
<div class="message-content">
13-
<div v-if="!isSystem">
13+
<div v-if="!isAssistant">
1414
<div
1515
v-html="formattedMessage"
1616
class="formatted-content"
@@ -149,14 +149,14 @@
149149
}
150150
})
151151
152-
const isSystem = computed(() => props.message.role === 'assistant')
152+
const isAssistant = computed(() => props.message.role === 'assistant')
153153
const messageReadingStatus = computed(
154154
() => props.message.status === CONSTANTS.STATUS.MESSAGES.RESPONDING
155155
)
156156
157157
const classRole = {
158158
user: 'surface-300 ml-auto break-words w-fit rounded-lg h-fit px-4 py-3',
159-
system: 'mr-auto w-full mt-3'
159+
assistant: 'mr-auto w-full mt-3'
160160
}
161161
162162
const classRoleApply = classRole[props.message.role]

0 commit comments

Comments
 (0)