refactor: 优化界面组件和文案,调整默认智能体显示方式
This commit is contained in:
parent
68e7bd8300
commit
8e66bc821e
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-controls">
|
||||
<a-button type="dashed" @click="showChunkConfigModal">
|
||||
<a-button type="dashed" @click="showChunkConfigModal" v-if="!isGraphBased">
|
||||
<SettingOutlined /> 分块参数 ({{ chunkParams.chunk_size }}/{{ chunkParams.chunk_overlap }})
|
||||
</a-button>
|
||||
</div>
|
||||
@ -112,7 +112,7 @@
|
||||
>
|
||||
<p class="ant-upload-text">点击或者把文件拖拽到这里上传</p>
|
||||
<p class="ant-upload-hint">
|
||||
目前仅支持上传文本文件,如 .pdf, .txt, .md。且同名文件无法重复添加
|
||||
目前仅支持上传文本、图片文件,如 .pdf, .txt, .md, .docx, png, jpg等。
|
||||
</p>
|
||||
</a-upload-dragger>
|
||||
</div>
|
||||
@ -252,6 +252,11 @@ const isQaSplitSupported = computed(() => {
|
||||
return type === 'chroma' || type === 'milvus';
|
||||
});
|
||||
|
||||
const isGraphBased = computed(() => {
|
||||
const type = kbType.value?.toLowerCase();
|
||||
return type === 'lightrag';
|
||||
});
|
||||
|
||||
// 计算属性:OCR选项
|
||||
const enableOcrOptions = computed(() => [
|
||||
{
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<SettingOutlined />
|
||||
查询参数
|
||||
</a-button>
|
||||
<a-button
|
||||
<!-- <a-button
|
||||
type="text"
|
||||
size="small"
|
||||
:icon="h(DeleteOutlined)"
|
||||
@ -45,7 +45,7 @@
|
||||
:disabled="!isGraphSupported"
|
||||
>
|
||||
清空
|
||||
</a-button>
|
||||
</a-button> -->
|
||||
<a-button
|
||||
type="text"
|
||||
size="small"
|
||||
|
||||
@ -24,19 +24,6 @@
|
||||
独立页面
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<a-tooltip :title="isDefaultAgent ? '当前为默认智能体' : '设为默认智能体'" placement="left">
|
||||
<a-button
|
||||
class="header-button primary-action"
|
||||
@click="setAsDefaultAgent"
|
||||
v-if="selectedAgentId && userStore.isAdmin"
|
||||
:disabled="isDefaultAgent"
|
||||
>
|
||||
<template #icon><StarOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="agent-view-body">
|
||||
@ -269,9 +256,7 @@
|
||||
<div class="agent-card-title">
|
||||
<span class="agent-card-name">{{ agent.name }}</span>
|
||||
<StarFilled v-if="id === defaultAgentId" class="default-icon" />
|
||||
</div>
|
||||
<div class="agent-card-indicator">
|
||||
<CheckCircleOutlined v-if="id === selectedAgentId" />
|
||||
<StarOutlined v-else @click.prevent="setAsDefaultAgent" class="default-icon" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="agent-card-description">{{ agent.description }}</div>
|
||||
@ -1247,15 +1232,6 @@ const toggleConf = () => {
|
||||
border-color: var(--main-color);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
border-color: var(--main-color);
|
||||
background: var(--main-10);
|
||||
|
||||
.agent-card-indicator {
|
||||
color: var(--main-color);
|
||||
}
|
||||
}
|
||||
|
||||
.agent-card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -1281,13 +1257,6 @@ const toggleConf = () => {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.agent-card-indicator {
|
||||
font-size: 20px;
|
||||
color: var(--gray-400);
|
||||
transition: color 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.agent-card-description {
|
||||
@ -1300,6 +1269,22 @@ const toggleConf = () => {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
&.selected {
|
||||
border-color: var(--main-color);
|
||||
background: var(--main-20);
|
||||
// outline: 2px solid var(--main-color);
|
||||
|
||||
.agent-card-header .agent-card-title .agent-card-name {
|
||||
color: var(--main-color);
|
||||
}
|
||||
|
||||
.agent-card-description {
|
||||
color: var(--gray-900);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
>
|
||||
<p class="ant-upload-text">点击或者把文件拖拽到这里上传</p>
|
||||
<p class="ant-upload-hint">
|
||||
目前仅支持上传 jsonl 文件。且同名文件无法重复添加。
|
||||
目前仅支持上传 jsonl 文件。
|
||||
</p>
|
||||
</a-upload-dragger>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user