fix(Embedded Management): Limit the length of the assistant name

This commit is contained in:
dataeaseShu
2025-09-01 14:10:49 +08:00
parent 19318dc8cf
commit d147fe625a
6 changed files with 16 additions and 3 deletions
+6 -2
View File
@@ -1,6 +1,8 @@
<script setup lang="ts">
import { ChatInfo, type ChatMessage } from '@/api/chat.ts'
import logo_fold from '@/assets/LOGO-fold.svg'
import { useAppearanceStoreWithOut } from '@/stores/appearance'
import custom_small from '@/assets/svg/logo-custom_small.svg'
withDefaults(
defineProps<{
@@ -12,14 +14,16 @@ withDefaults(
hideAvatar: false,
}
)
const appearanceStore = useAppearanceStoreWithOut()
</script>
<template>
<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>
<logo_fold v-if="!hideAvatar" />
<el-icon v-if="!hideAvatar">
<custom_small v-if="appearanceStore.themeColor === 'custom'"></custom_small>
<logo_fold v-else />
</el-icon>
</div>
<div :class="{ 'row-full': msg.role === 'assistant', 'width-auto': msg.role === 'user' }">
@@ -244,7 +244,7 @@ defineExpose({ sendMessage, index: () => index.value, stop })
<template>
<BaseAnswer v-if="message" :message="message" :reasoning-name="reasoningName" :loading="_loading">
<ChartBlock style="margin-top: 12px" :message="message" />
<ChartBlock style="margin-top: 6px" :message="message" />
<slot></slot>
<template #tool>
<slot name="tool"></slot>
+1
View File
@@ -71,6 +71,7 @@ defineExpose({
<el-drawer
v-model="datasourceConfigVisible"
:close-on-click-modal="false"
destroy-on-close
size="calc(100% - 100px)"
modal-class="datasource-drawer-fullscreen"
direction="btt"
@@ -674,6 +674,7 @@ const saveHandler = () => {
$t('datasource.please_enter') + $t('common.empty') + $t('embedded.application_name')
"
clearable
maxlength="50"
autocomplete="off"
/>
</el-form-item>
@@ -419,6 +419,7 @@ const submit = (item: any) => {
size="calc(100% - 100px)"
modal-class="model-drawer-fullscreen"
direction="btt"
destroy-on-close
:before-close="beforeClose"
:show-close="false"
>
@@ -373,6 +373,12 @@ const handleCurrentChange = (val: number) => {
{{ $t('workspace.relevant_content_found') }}
</div>
</div>
<EmptyBackground
v-if="!!keyword && !tableListWithSearch.length"
:description="$t('datasource.relevant_content_found')"
img-type="tree"
style="width: 100%"
/>
</div>
<div v-if="currentTable.name" class="info-table">