Skip to content

Commit 058c4e6

Browse files
committed
fix(Custom prompt words): The effective data source has been changed from some data sources to all data sources, and the details page has not changed.
1 parent 8d945cc commit 058c4e6

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed

frontend/src/views/chat/ChatRow.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ withDefaults(
99
msg: ChatMessage
1010
currentChat: ChatInfo
1111
hideAvatar?: boolean
12+
logoAssistant?: string
1213
}>(),
1314
{
1415
hideAvatar: false,
@@ -21,7 +22,14 @@ const appearanceStore = useAppearanceStoreWithOut()
2122
<div class="chat-row-container">
2223
<div class="chat-row" :class="{ 'right-to-left': msg.role === 'user' }">
2324
<div v-if="msg.role === 'assistant'" class="ai-avatar">
24-
<el-icon v-if="!hideAvatar">
25+
<img
26+
v-if="!hideAvatar && appearanceStore.getLogin"
27+
:src="logoAssistant ? logoAssistant : appearanceStore.getLogin"
28+
alt=""
29+
width="28"
30+
height="28"
31+
/>
32+
<el-icon v-else-if="!hideAvatar">
2533
<custom_small v-if="appearanceStore.themeColor === 'custom'"></custom_small>
2634
<logo_fold v-else />
2735
</el-icon>

frontend/src/views/chat/index.vue

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,20 @@
183183
</div>
184184
</div>
185185
<div v-else-if="computedMessages.length == 0 && loading" class="welcome-content-block">
186-
<logo />
186+
<div style="display: flex; align-items: center; height: 30px">
187+
<img
188+
height="30"
189+
width="30"
190+
v-if="logoAssistant || loginBg"
191+
:src="logoAssistant ? logoAssistant : loginBg"
192+
alt=""
193+
/>
194+
<el-icon size="30" v-else
195+
><custom_small v-if="appearanceStore.themeColor !== 'default'"></custom_small>
196+
<LOGO_fold v-else></LOGO_fold
197+
></el-icon>
198+
<span style="margin-left: 12px">{{ appearanceStore.name }}</span>
199+
</div>
187200
</div>
188201
<el-scrollbar
189202
v-if="computedMessages.length > 0"
@@ -200,7 +213,12 @@
200213
}"
201214
>
202215
<template v-for="(message, _index) in computedMessages" :key="_index">
203-
<ChatRow :current-chat="currentChat" :msg="message" :hide-avatar="message.first_chat">
216+
<ChatRow
217+
:logoAssistant="logoAssistant"
218+
:current-chat="currentChat"
219+
:msg="message"
220+
:hide-avatar="message.first_chat"
221+
>
204222
<RecommendQuestion
205223
v-if="message.role === 'assistant' && message.first_chat"
206224
ref="recommendQuestionRef"
@@ -432,7 +450,6 @@ import icon_replace_outlined from '@/assets/svg/icon_replace_outlined.svg'
432450
import icon_screen_outlined from '@/assets/svg/icon_screen_outlined.svg'
433451
import icon_start_outlined from '@/assets/svg/icon_start_outlined.svg'
434452
import logo_fold from '@/assets/svg/logo-custom_small.svg'
435-
import logo from '@/assets/LOGO.svg'
436453
import icon_send_filled from '@/assets/svg/icon_send_filled.svg'
437454
import { useAssistantStore } from '@/stores/assistant'
438455
import { onClickOutside } from '@vueuse/core'

frontend/src/views/dashboard/editor/ChatChartSelection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</template>
5959

6060
<script setup lang="ts">
61-
import { computed, onMounted, reactive, ref } from 'vue'
61+
import { computed, reactive, ref } from 'vue'
6262
import { useI18n } from 'vue-i18n'
6363
import { Chat, chatApi, ChatInfo } from '@/api/chat.ts'
6464
import DashboardChatList from '@/views/dashboard/editor/DashboardChatList.vue'

frontend/src/views/system/prompt/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ const typeChange = (val: any) => {
629629
<el-form-item :label="t('ds.title')">
630630
<div class="content">
631631
{{
632-
pageForm.datasource_names.length
632+
pageForm.datasource_names.length && pageForm.specific_ds
633633
? pageForm.datasource_names.join()
634634
: t('training.all_data_sources')
635635
}}

0 commit comments

Comments
 (0)