diff --git a/docs/latest/changelog/roadmap.md b/docs/latest/changelog/roadmap.md index 40251712..07b4aac9 100644 --- a/docs/latest/changelog/roadmap.md +++ b/docs/latest/changelog/roadmap.md @@ -15,12 +15,12 @@ - 同名文件处理逻辑:遇到同名文件则在上传区域提示,是否删除旧文件 - conversation 待修改为异步的版本 - DBManager 需要将数据库修改为异步的aiosqlite或者异步mysql,缓存使用Redis存储 -- agent 状态中的文件区域,新增可以下载 ### Bugs - 部分异常状态下,智能体的模型名称出现重叠[#279](https://github.com/xerrors/Yuxi-Know/issues/279) - DeepSeek 官方接口适配会出现问题 - 目前的知识库的图片存在公开访问风险 +- 深度分析智能体需要考虑上下文超限的问题 ### 新增 - 优化知识库详情页面,更加简洁清晰 @@ -34,6 +34,8 @@ - 新增自定义模型支持、新增 dashscope rerank/embeddings 模型的支持 - 新增文档解析的图片支持,已支持 MinerU Officical、Docs、Markdown Zip格式 - 新增暗色模式支持并调整整体 UI([#343](https://github.com/xerrors/Yuxi-Know/pull/343)) +- agent 状态中的文件区域,新增可以下载 +- 移除 Chroma 的支持,当前版本标记为移除 ### 修复 - 修复重排序模型实际未生效的问题 diff --git a/src/agents/common/mcp_repos/arxiv-mcp-server b/src/agents/common/mcp_repos/arxiv-mcp-server new file mode 160000 index 00000000..057e2000 --- /dev/null +++ b/src/agents/common/mcp_repos/arxiv-mcp-server @@ -0,0 +1 @@ +Subproject commit 057e2000be7b56823239815b0fe7c7fc0dbced96 diff --git a/src/agents/common/mcp_repos/mcp-server-mysql b/src/agents/common/mcp_repos/mcp-server-mysql new file mode 160000 index 00000000..6a036783 --- /dev/null +++ b/src/agents/common/mcp_repos/mcp-server-mysql @@ -0,0 +1 @@ +Subproject commit 6a0367834ea0fb5e5c94b9711e3e2756966789ea diff --git a/web/src/views/DataBaseView.vue b/web/src/views/DataBaseView.vue index 88453597..0c38fd6a 100644 --- a/web/src/views/DataBaseView.vue +++ b/web/src/views/DataBaseView.vue @@ -14,15 +14,23 @@

知识库类型*

{{ getKbTypeLabel(typeKey) }} + + 弃用 +
{{ typeInfo.description }}
@@ -71,7 +79,7 @@

隐私设置

@@ -158,6 +166,18 @@

正在加载知识库...

+ +
+

暂无知识库

+

创建您的第一个知识库,开始管理文档和知识

+ + + 创建知识库 + +
+
({ name: '', description: '', embed_model_name: configStore.config?.embed_model, - kb_type: 'chroma', + kb_type: 'milvus', is_private: false, storage: '', language: 'English', @@ -295,6 +315,27 @@ const llmModelSpec = computed(() => { // 支持的知识库类型 const supportedKbTypes = ref({}) +// 有序的知识库类型(Chroma 排在最后) +const orderedKbTypes = computed(() => { + const types = { ...supportedKbTypes.value } + const ordered = {} + const chromaData = types.chroma + + // 先添加除了 Chroma 之外的所有类型 + Object.keys(types).forEach(key => { + if (key !== 'chroma') { + ordered[key] = types[key] + } + }) + + // 最后添加 Chroma(如果存在) + if (chromaData) { + ordered.chroma = chromaData + } + + return ordered +}) + // 加载支持的知识库类型 const loadSupportedKbTypes = async () => { try { @@ -368,24 +409,6 @@ const getKbTypeIcon = (type) => { return icons[type] || Database } -// const getKbTypeDescription = (type) => { -// const descriptions = { -// lightrag: '🔥 图结构索引 • 智能查询 • 关系挖掘 • 复杂推理', -// chroma: '⚡ 轻量向量 • 快速开发 • 本地部署 • 简单易用', -// milvus: '🚀 生产级 • 高性能 • 分布式 • 企业级部署' -// } -// return descriptions[type] || '' -// } - -const getKbTypeAlertType = (type) => { - const types = { - lightrag: 'info', - chroma: 'success', - milvus: 'warning' - } - return types[type] || 'info' -} - const getKbTypeColor = (type) => { const colors = { lightrag: 'purple', @@ -395,7 +418,6 @@ const getKbTypeColor = (type) => { return colors[type] || 'blue' } - // 格式化创建时间 const formatCreatedTime = (createdAt) => { if (!createdAt) return '' @@ -680,24 +702,12 @@ onMounted(() => { border-color: var(--main-color); } - // 为不同知识库类型设置不同的悬停颜色与主题色 - &:nth-child(1):hover, - &:nth-child(1).active { - border-color: var(--color-accent-100); - .type-icon { color: var(--color-accent-500); } + &.active { + border-color: var(--main-color); + background: var(--main-10); + .type-icon { color: var(--main-color); } } - &:nth-child(2):hover, - &:nth-child(2).active { - border-color: var(--color-warning-100); - .type-icon { color: var(--color-warning-500); } - } - - &:nth-child(3):hover, - &:nth-child(3).active { - border-color: var(--color-error-100); - .type-icon { color: var(--color-error-500); } - } .card-header { display: flex; align-items: center; @@ -725,6 +735,26 @@ onMounted(() => { margin-bottom: 0; // min-height: 40px; } + + .deprecated-badge { + background: var(--color-error-100); + color: var(--color-error-600); + font-size: 10px; + font-weight: 600; + padding: 2px 6px; + border-radius: 4px; + margin-left: auto; + text-transform: uppercase; + letter-spacing: 0.5px; + cursor: help; + transition: all 0.2s ease; + + &:hover { + background: var(--color-error-200); + color: var(--color-error-700); + } + } + } } @@ -900,8 +930,6 @@ onMounted(() => { font-weight: 400; flex: 1; } - - } .database-empty { @@ -913,6 +941,38 @@ onMounted(() => { color: var(--gray-900); } +.empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 100px 20px; + text-align: center; + + .empty-title { + font-size: 20px; + font-weight: 600; + color: var(--gray-900); + margin: 0 0 12px 0; + letter-spacing: -0.02em; + } + + .empty-description { + font-size: 14px; + color: var(--gray-600); + margin: 0 0 32px 0; + line-height: 1.5; + max-width: 320px; + } + + .ant-btn { + height: 44px; + padding: 0 24px; + font-size: 15px; + font-weight: 500; + } +} + .database-container { padding: 0; }