From 794a860a58583c82adf5e1833b318c5939cc8e0a Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Sat, 24 Jan 2026 12:36:24 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=8C=87=E5=8D=97=E5=92=8C=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=EF=BC=8C=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E6=B3=A8=E5=85=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/latest/intro/quick-start.md | 4 ++-- src/agents/common/toolkits/mysql/tools.py | 7 ++++--- uv.lock | 2 +- web/src/components/AgentConfigSidebar.vue | 6 +++++- web/src/views/DataBaseInfoView.vue | 12 ++++++------ web/src/views/LoginView.vue | 6 ++++-- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/docs/latest/intro/quick-start.md b/docs/latest/intro/quick-start.md index 396672c2..a46ce17d 100644 --- a/docs/latest/intro/quick-start.md +++ b/docs/latest/intro/quick-start.md @@ -16,13 +16,13 @@ ```bash # 克隆稳定版本 -git clone --branch v0.5.0-beta --depth 1 https://github.com/xerrors/Yuxi-Know.git +git clone --branch v0.5.0-beta2 --depth 1 https://github.com/xerrors/Yuxi-Know.git cd Yuxi-Know ``` ::: warning 版本说明 - `v0.4.4`: 稳定版本 -- `v0.5.0-beta`: 由于数据库重构使用 postgres,可能会存在数据库迁移问题,建议新用户使用。 +- `v0.5.0-beta2`: 由于数据库重构使用 postgres,可能会存在数据库迁移问题,建议新用户使用。 - `main`: 最新开发版本(不稳定,新特性可能会导致新 bug) ::: diff --git a/src/agents/common/toolkits/mysql/tools.py b/src/agents/common/toolkits/mysql/tools.py index fcdc4204..17a681d0 100644 --- a/src/agents/common/toolkits/mysql/tools.py +++ b/src/agents/common/toolkits/mysql/tools.py @@ -312,6 +312,7 @@ def mysql_query( def _get_db_description() -> str: """获取数据库描述""" import os + return os.getenv("MYSQL_DATABASE_DESCRIPTION") or "" @@ -329,10 +330,10 @@ def _inject_db_description(tools: list[Any]) -> None: if not db_desc: return - for tool in tools: - if hasattr(tool, 'description'): + for _tool in tools: + if hasattr(_tool, "description"): # 在描述末尾添加数据库说明 - tool.description = f"{tool.description}\n\n当前数据库说明: {db_desc}" + _tool.description = f"{_tool.description}\n\n当前数据库说明: {db_desc}" _db_description_injected = True diff --git a/uv.lock b/uv.lock index e3fcd68a..3cce4d34 100644 --- a/uv.lock +++ b/uv.lock @@ -4906,7 +4906,7 @@ wheels = [ [[package]] name = "yuxi-know" -version = "0.4.3.dev0" +version = "0.5.0.dev0" source = { virtual = "." } dependencies = [ { name = "aiofiles" }, diff --git a/web/src/components/AgentConfigSidebar.vue b/web/src/components/AgentConfigSidebar.vue index 97573641..48351cb7 100644 --- a/web/src/components/AgentConfigSidebar.vue +++ b/web/src/components/AgentConfigSidebar.vue @@ -691,7 +691,11 @@ const validateAndFilterConfig = () => { } // 检查多选配置项 (type === 'list' 且有 options) - else if (configItem.type === 'list' && configItem.options.length > 0 && Array.isArray(currentValue)) { + else if ( + configItem.type === 'list' && + configItem.options.length > 0 && + Array.isArray(currentValue) + ) { const validOptions = configItem.options validatedConfig[key] = currentValue.filter((value) => validOptions.includes(value)) diff --git a/web/src/views/DataBaseInfoView.vue b/web/src/views/DataBaseInfoView.vue index 21fac9da..66c4c3d2 100644 --- a/web/src/views/DataBaseInfoView.vue +++ b/web/src/views/DataBaseInfoView.vue @@ -164,14 +164,14 @@ const isEvaluationSupported = computed(() => { // 计算待解析文件数量(status: 'uploaded') const pendingParseCount = computed(() => { const files = store.database.files || {} - return Object.values(files).filter(f => !f.is_folder && f.status === 'uploaded').length + return Object.values(files).filter((f) => !f.is_folder && f.status === 'uploaded').length }) // 计算待入库文件数量(status: 'parsed' 或 'error_indexing') const pendingIndexCount = computed(() => { const files = store.database.files || {} const isLightRAG = database.value?.kb_type?.toLowerCase() === 'lightrag' - return Object.values(files).filter(f => { + return Object.values(files).filter((f) => { if (f.is_folder) return false if (isLightRAG) { return f.status === 'parsed' @@ -183,8 +183,8 @@ const pendingIndexCount = computed(() => { // 确认批量解析 const confirmBatchParse = () => { const fileIds = Object.values(store.database.files || {}) - .filter(f => f.status === 'uploaded') - .map(f => f.file_id) + .filter((f) => f.status === 'uploaded') + .map((f) => f.file_id) if (fileIds.length === 0) { return @@ -201,12 +201,12 @@ const confirmBatchParse = () => { const confirmBatchIndex = () => { const isLightRAG = database.value?.kb_type?.toLowerCase() === 'lightrag' const fileIds = Object.values(store.database.files || {}) - .filter(f => { + .filter((f) => { if (f.is_folder) return false if (isLightRAG) return f.status === 'parsed' return f.status === 'parsed' || f.status === 'error_indexing' }) - .map(f => f.file_id) + .map((f) => f.file_id) if (fileIds.length === 0) { return diff --git a/web/src/views/LoginView.vue b/web/src/views/LoginView.vue index 35aafc9a..51562a34 100644 --- a/web/src/views/LoginView.vue +++ b/web/src/views/LoginView.vue @@ -21,7 +21,9 @@

{{ brandName }}

- 返回首页 + + 返回首页 +
@@ -876,4 +878,4 @@ onUnmounted(() => { padding: 40px 20px; } } - \ No newline at end of file +