Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion frontend/src/views/chat/ChatRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ withDefaults(
msg: ChatMessage
currentChat: ChatInfo
hideAvatar?: boolean
logoAssistant?: string
}>(),
{
hideAvatar: false,
Expand All @@ -21,7 +22,14 @@ const appearanceStore = useAppearanceStoreWithOut()
<div class="chat-row-container">
<div class="chat-row" :class="{ 'right-to-left': msg.role === 'user' }">
<div v-if="msg.role === 'assistant'" class="ai-avatar">
<el-icon v-if="!hideAvatar">
<img
v-if="!hideAvatar && appearanceStore.getLogin"
:src="logoAssistant ? logoAssistant : appearanceStore.getLogin"
alt=""
width="28"
height="28"
/>
<el-icon v-else-if="!hideAvatar">
<custom_small v-if="appearanceStore.themeColor === 'custom'"></custom_small>
<logo_fold v-else />
</el-icon>
Expand Down
23 changes: 20 additions & 3 deletions frontend/src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,20 @@
</div>
</div>
<div v-else-if="computedMessages.length == 0 && loading" class="welcome-content-block">
<logo />
<div style="display: flex; align-items: center; height: 30px">
<img
height="30"
width="30"
v-if="logoAssistant || loginBg"
:src="logoAssistant ? logoAssistant : loginBg"
alt=""
/>
<el-icon size="30" v-else
><custom_small v-if="appearanceStore.themeColor !== 'default'"></custom_small>
<LOGO_fold v-else></LOGO_fold
></el-icon>
<span style="margin-left: 12px">{{ appearanceStore.name }}</span>
</div>
</div>
<el-scrollbar
v-if="computedMessages.length > 0"
Expand All @@ -200,7 +213,12 @@
}"
>
<template v-for="(message, _index) in computedMessages" :key="_index">
<ChatRow :current-chat="currentChat" :msg="message" :hide-avatar="message.first_chat">
<ChatRow
:logoAssistant="logoAssistant"
:current-chat="currentChat"
:msg="message"
:hide-avatar="message.first_chat"
>
<RecommendQuestion
v-if="message.role === 'assistant' && message.first_chat"
ref="recommendQuestionRef"
Expand Down Expand Up @@ -432,7 +450,6 @@ import icon_replace_outlined from '@/assets/svg/icon_replace_outlined.svg'
import icon_screen_outlined from '@/assets/svg/icon_screen_outlined.svg'
import icon_start_outlined from '@/assets/svg/icon_start_outlined.svg'
import logo_fold from '@/assets/svg/logo-custom_small.svg'
import logo from '@/assets/LOGO.svg'
import icon_send_filled from '@/assets/svg/icon_send_filled.svg'
import { useAssistantStore } from '@/stores/assistant'
import { onClickOutside } from '@vueuse/core'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/dashboard/editor/ChatChartSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</template>

<script setup lang="ts">
import { computed, onMounted, reactive, ref } from 'vue'
import { computed, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { Chat, chatApi, ChatInfo } from '@/api/chat.ts'
import DashboardChatList from '@/views/dashboard/editor/DashboardChatList.vue'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/system/prompt/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ const typeChange = (val: any) => {
<el-form-item :label="t('ds.title')">
<div class="content">
{{
pageForm.datasource_names.length
pageForm.datasource_names.length && pageForm.specific_ds
? pageForm.datasource_names.join()
: t('training.all_data_sources')
}}
Expand Down