mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
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.
This commit is contained in:
@@ -9,6 +9,7 @@ withDefaults(
|
||||
msg: ChatMessage
|
||||
currentChat: ChatInfo
|
||||
hideAvatar?: boolean
|
||||
logoAssistant?: string
|
||||
}>(),
|
||||
{
|
||||
hideAvatar: false,
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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')
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user