fix(FileTable): 修复自动刷新失效问题并优化按钮样式
修改数据库存储逻辑以支持后台自动刷新时跳过加载状态 更新FileTable组件按钮样式和布局,增加可读性和交互性
This commit is contained in:
parent
c6ddb70909
commit
32f6b5e6e9
@ -18,6 +18,9 @@
|
|||||||
- 将工具与知识库解耦,在 context 中就完成解耦,虽然最终都是在 Agent 中的 get_tools 中获取
|
- 将工具与知识库解耦,在 context 中就完成解耦,虽然最终都是在 Agent 中的 get_tools 中获取
|
||||||
- 系统层面添加 apikey,在智能体、知识库调用中支持 apikey 以支持外部调用
|
- 系统层面添加 apikey,在智能体、知识库调用中支持 apikey 以支持外部调用
|
||||||
- 支持更多类型的文档源的导入功能
|
- 支持更多类型的文档源的导入功能
|
||||||
|
- 支持 markitdown 或者 docling 的功能
|
||||||
|
- 支持设置上传后自动入库(indexing)
|
||||||
|
- 添加对于 lightrag 的结果解析
|
||||||
|
|
||||||
### Bugs
|
### Bugs
|
||||||
- 部分异常状态下,智能体的模型名称出现重叠[#279](https://github.com/xerrors/Yuxi-Know/issues/279)
|
- 部分异常状态下,智能体的模型名称出现重叠[#279](https://github.com/xerrors/Yuxi-Know/issues/279)
|
||||||
@ -28,6 +31,7 @@
|
|||||||
- 工具传递给模型的时候,使用英文,但部分模型不支持中文函数名(如gpt-4o-mini)
|
- 工具传递给模型的时候,使用英文,但部分模型不支持中文函数名(如gpt-4o-mini)
|
||||||
- 首页加载的问题
|
- 首页加载的问题
|
||||||
- 当前的 upload 图谱查询为同步操作,可能会导致页面卡顿
|
- 当前的 upload 图谱查询为同步操作,可能会导致页面卡顿
|
||||||
|
- FileTable 的自动刷新失效
|
||||||
|
|
||||||
## v0.5
|
## v0.5
|
||||||
|
|
||||||
|
|||||||
@ -114,23 +114,25 @@
|
|||||||
/>
|
/>
|
||||||
<span>{{ selectedRowKeys.length }} 项</span>
|
<span>{{ selectedRowKeys.length }} 项</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; gap: 4px;">
|
<div style="display: flex; gap: 8px;">
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click="handleBatchParse"
|
@click="handleBatchParse"
|
||||||
:loading="batchParsing"
|
:loading="batchParsing"
|
||||||
:disabled="!canBatchParse"
|
:disabled="!canBatchParse"
|
||||||
:icon="h(FileText, { size: 16 })"
|
:icon="h(FileText, { size: 16 })"
|
||||||
title="批量解析"
|
>
|
||||||
/>
|
批量解析
|
||||||
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click="handleBatchIndex"
|
@click="handleBatchIndex"
|
||||||
:loading="batchIndexing"
|
:loading="batchIndexing"
|
||||||
:disabled="!canBatchIndex"
|
:disabled="!canBatchIndex"
|
||||||
:icon="h(Database, { size: 16 })"
|
:icon="h(Database, { size: 16 })"
|
||||||
title="批量入库"
|
>
|
||||||
/>
|
批量入库
|
||||||
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
danger
|
danger
|
||||||
@ -138,8 +140,9 @@
|
|||||||
:loading="batchDeleting"
|
:loading="batchDeleting"
|
||||||
:disabled="!canBatchDelete"
|
:disabled="!canBatchDelete"
|
||||||
:icon="h(Trash2, { size: 16 })"
|
:icon="h(Trash2, { size: 16 })"
|
||||||
title="批量删除"
|
>
|
||||||
/>
|
批量删除
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -1082,7 +1085,7 @@ import ChunkParamsConfig from '@/components/ChunkParamsConfig.vue';
|
|||||||
.panel-actions {
|
.panel-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0px;
|
gap: 4px;
|
||||||
|
|
||||||
.action-searcher {
|
.action-searcher {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
@ -1097,7 +1100,7 @@ import ChunkParamsConfig from '@/components/ChunkParamsConfig.vue';
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 2px 12px;
|
padding: 4px 12px;
|
||||||
background-color: var(--main-10);
|
background-color: var(--main-10);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
@ -1118,9 +1121,12 @@ import ChunkParamsConfig from '@/components/ChunkParamsConfig.vue';
|
|||||||
|
|
||||||
.batch-actions .ant-btn {
|
.batch-actions .ant-btn {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 0 6px;
|
padding: 4px 8px;
|
||||||
height: 22px;
|
height: auto;
|
||||||
border-radius: 3px;
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 14px;
|
width: 14px;
|
||||||
@ -1218,8 +1224,7 @@ import ChunkParamsConfig from '@/components/ChunkParamsConfig.vue';
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
/* border: 1px solid var(--gray-300); */
|
padding: 0 4px;
|
||||||
/* background-color: var(--gray-50); */
|
|
||||||
color: var(--gray-700);
|
color: var(--gray-700);
|
||||||
transition: all 0.1s ease;
|
transition: all 0.1s ease;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -1251,7 +1256,8 @@ import ChunkParamsConfig from '@/components/ChunkParamsConfig.vue';
|
|||||||
|
|
||||||
.panel-action-btn.active {
|
.panel-action-btn.active {
|
||||||
color: var(--main-color);
|
color: var(--main-color);
|
||||||
background-color: var(--main-10);
|
background-color: var(--gray-100);
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-trigger-btn {
|
.action-trigger-btn {
|
||||||
|
|||||||
@ -100,12 +100,14 @@ export const useDatabaseStore = defineStore('database', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDatabaseInfo(id, skipQueryParams = false) {
|
async function getDatabaseInfo(id, skipQueryParams = false, isBackground = false) {
|
||||||
const db_id = id || databaseId.value;
|
const db_id = id || databaseId.value;
|
||||||
if (!db_id) return;
|
if (!db_id) return;
|
||||||
|
|
||||||
state.lock = true;
|
if (!isBackground) {
|
||||||
state.databaseLoading = true;
|
state.lock = true;
|
||||||
|
state.databaseLoading = true;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const data = await databaseApi.getDatabaseInfo(db_id);
|
const data = await databaseApi.getDatabaseInfo(db_id);
|
||||||
database.value = data;
|
database.value = data;
|
||||||
@ -119,8 +121,10 @@ export const useDatabaseStore = defineStore('database', () => {
|
|||||||
console.error(error);
|
console.error(error);
|
||||||
message.error(error.message || '获取数据库信息失败');
|
message.error(error.message || '获取数据库信息失败');
|
||||||
} finally {
|
} finally {
|
||||||
state.lock = false;
|
if (!isBackground) {
|
||||||
state.databaseLoading = false;
|
state.lock = false;
|
||||||
|
state.databaseLoading = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +247,7 @@ export const useDatabaseStore = defineStore('database', () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const processingStatuses = new Set(['processing', 'waiting']);
|
const processingStatuses = new Set(['processing', 'waiting', 'parsing', 'indexing']);
|
||||||
|
|
||||||
function enableAutoRefresh(source = 'auto') {
|
function enableAutoRefresh(source = 'auto') {
|
||||||
if (autoRefreshManualOverride && source === 'auto') {
|
if (autoRefreshManualOverride && source === 'auto') {
|
||||||
@ -469,7 +473,7 @@ export const useDatabaseStore = defineStore('database', () => {
|
|||||||
function startAutoRefresh() {
|
function startAutoRefresh() {
|
||||||
if (state.autoRefresh && !refreshInterval) {
|
if (state.autoRefresh && !refreshInterval) {
|
||||||
refreshInterval = setInterval(() => {
|
refreshInterval = setInterval(() => {
|
||||||
getDatabaseInfo(undefined, true); // Skip loading query params during auto-refresh
|
getDatabaseInfo(undefined, true, true); // Skip loading query params during auto-refresh
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user