Skip to content

Commit fb7fc28

Browse files
fix: 【应用】简单配置中对过长名称知识库进行关联时有概率导致无法显示知识库全部名称(#1596)
1 parent 869295b commit fb7fc28

File tree

8 files changed

+24
-571
lines changed

8 files changed

+24
-571
lines changed

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="ai-chat__operate p-16-24">
33
<slot name="operateBefore" />
4-
<div class="operate-textarea flex chat-width">
4+
<div class="operate-textarea flex">
55
<el-input
66
ref="quickInputRef"
77
v-model="inputValue"
@@ -62,7 +62,7 @@
6262
</div>
6363
</div>
6464
<div
65-
class="chat-width text-center"
65+
class="text-center"
6666
v-if="applicationDetails.disclaimer"
6767
style="margin-top: 8px"
6868
>

ui/src/components/ai-chat/component/prologue-content/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ const prologue = computed(() => {
2929
const temp = props.available
3030
? props.application?.prologue
3131
: '抱歉,当前正在维护,无法提供服务,请稍后再试!'
32-
return temp.replace(/-\s.+/g, toQuickQuestion)
32+
return temp?.replace(/-\s.+/g, toQuickQuestion)
3333
})
3434
</script>
35-
<style lang="scss" scoped>
36-
</style>
35+
<style lang="scss" scoped></style>

ui/src/components/ai-chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
ref="userFormRef"
99
></UserForm>
1010
<el-scrollbar ref="scrollDiv" @scroll="handleScrollTop">
11-
<div ref="dialogScrollbar" class="ai-chat__content p-24 chat-width">
11+
<div ref="dialogScrollbar" class="ai-chat__content p-24">
1212
<PrologueContent
1313
:type="type"
1414
:application="applicationDetails"

ui/src/router/modules/application.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ const applicationRouter = {
1212
name: 'application',
1313
component: () => import('@/views/application/index.vue')
1414
},
15-
{
16-
path: '/application/create',
17-
name: 'CreateApplication',
18-
meta: { activeMenu: '/application' },
19-
component: () => import('@/views/application/CreateAndSetting.vue'),
20-
hidden: true
21-
},
2215
{
2316
path: '/application/:id/:type',
2417
name: 'ApplicationDetail',

ui/src/router/modules/dataset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const datasetRouter = {
1212
component: () => import('@/views/dataset/index.vue')
1313
},
1414
{
15-
path: '/dataset/:type', // create 或者 upload
15+
path: '/dataset/:type', // upload
1616
name: 'UploadDocumentDataset',
1717
meta: { activeMenu: '/dataset' },
1818
component: () => import('@/views/dataset/UploadDocumentDataset.vue'),

ui/src/views/application/ApplicationSetting.vue

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,13 @@
252252
<AppAvatar v-else class="mr-8 avatar-blue" shape="square" :size="32">
253253
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
254254
</AppAvatar>
255-
<auto-tooltip
256-
:content="relatedObject(datasetList, item, 'id')?.name"
257-
style="width: 80%"
255+
256+
<span
257+
class="ellipsis cursor"
258+
:title="relatedObject(datasetList, item, 'id')?.name"
259+
>
260+
{{ relatedObject(datasetList, item, 'id')?.name }}</span
258261
>
259-
{{ relatedObject(datasetList, item, 'id')?.name }}
260-
</auto-tooltip>
261262
</div>
262263
<el-button text @click="removeDataset(item)">
263264
<el-icon>
@@ -326,7 +327,11 @@
326327
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
327328
</el-tooltip> -->
328329
</div>
329-
<el-switch size="small" v-model="applicationForm.stt_model_enable" @change="sttModelEnableChange"/>
330+
<el-switch
331+
size="small"
332+
v-model="applicationForm.stt_model_enable"
333+
@change="sttModelEnableChange"
334+
/>
330335
</div>
331336
</template>
332337
<el-select
@@ -406,7 +411,11 @@
406411
<el-icon class="mr-4"><Setting /></el-icon>
407412
设置
408413
</el-button>
409-
<el-switch size="small" v-model="applicationForm.tts_model_enable" @change="ttsModelEnableChange"/>
414+
<el-switch
415+
size="small"
416+
v-model="applicationForm.tts_model_enable"
417+
@change="ttsModelEnableChange"
418+
/>
410419
</div>
411420
</div>
412421
</template>
@@ -527,7 +536,7 @@
527536
</h4>
528537
</div>
529538
<div class="scrollbar-height">
530-
<AiChat :data="applicationForm"></AiChat>
539+
<AiChat :applicationDetails="applicationForm"></AiChat>
531540
</div>
532541
</div>
533542
</el-col>

0 commit comments

Comments
 (0)