Skip to content

Commit ee7b149

Browse files
committed
refactor: 更新系统路由和信息配置
- 移除 `get_default_info_config` 函数,简化信息配置加载逻辑。 - 在 `info.template.yaml` 中更新品牌信息和功能特性,添加新的统计信息和操作链接。 - 修改 `HomeView.vue` 以支持新的功能特性和操作链接展示,优化页面布局和样式。 - 删除过时的 `models.yaml` 文件,集中管理模型配置。
1 parent 7aaae83 commit ee7b149

File tree

5 files changed

+433
-411
lines changed

5 files changed

+433
-411
lines changed

server/routers/system_router.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,7 @@ def load_info_config():
9999

100100
except Exception as e:
101101
logger.error(f"Failed to load info config: {e}")
102-
return get_default_info_config()
103-
104-
105-
def get_default_info_config():
106-
"""获取默认信息配置"""
107-
return {
108-
"organization": {"name": "江南语析", "logo": "/favicon.svg", "avatar": "/avatar.jpg"},
109-
"branding": {
110-
"name": "Yuxi-Know",
111-
"title": "Yuxi-Know",
112-
"subtitle": "大模型驱动的知识库管理工具",
113-
"description": "结合知识库与知识图谱,提供更准确、更全面的回答",
114-
},
115-
"features": ["📚 灵活知识库", "🕸️ 知识图谱集成", "🤖 多模型支持"],
116-
"footer": {"copyright": "© 江南语析 2025 [WIP] v0.3.0"},
117-
}
102+
return {}
118103

119104

120105
@system.get("/info")

src/config/static/info.template.yaml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,42 @@ organization:
1111
# 项目信息
1212
branding:
1313
name: "Yuxi-Know"
14-
title: "Yuxi-Know: 更智能的知识库管理工具" # 系统标题
15-
subtitle: "大模型驱动的知识库管理工具" # 副标题
16-
description: "结合知识库与知识图谱,提供更准确、更全面的回答" # 描述信息
14+
title: "Yuxi-Know: 更智能的知识库智能体平台" # 系统标题
15+
subtitle: "大模型驱动的知识库智能体平台" # 副标题
1716

18-
# 功能特性
1917
features:
20-
- "📚 灵活知识库"
21-
- "🕸️ 知识图谱集成"
22-
- "🤖 权限隔离"
18+
- label: "GitHub Stars"
19+
value: "2300+"
20+
description: "开发者社区的认可与支持"
21+
icon: "stars"
22+
- label: "已解决 Issues"
23+
value: "200+"
24+
description: "持续改进和问题解决能力"
25+
icon: "issues"
26+
- label: "累计 Commits"
27+
value: "1000+"
28+
description: "活跃的开发迭代和功能更新"
29+
icon: "commits"
30+
- label: "开源协议"
31+
value: "MIT 协议"
32+
description: "完全免费,支持商业使用"
33+
icon: "license"
34+
35+
actions:
36+
- name: "演示视频"
37+
icon: "video"
38+
url: "https://www.bilibili.com/video/BV1DF14BTETq"
39+
- name: "文档中心"
40+
icon: "docs"
41+
url: "https://xerrors.github.io/Yuxi-Know/"
42+
- name: "提交 Issue"
43+
icon: "issue"
44+
url: "https://github.com/xerrors/Yuxi-Know/issues/new/choose"
45+
- name: "开发路线图"
46+
icon: "roadmap"
47+
url: "https://xerrors.github.io/Yuxi-Know/latest/changelog/roadmap.html"
48+
49+
2350

2451
# 页脚信息
2552
footer:

src/config/static/models.yaml

Lines changed: 0 additions & 150 deletions
This file was deleted.

web/src/stores/info.js

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,45 @@ export const useInfoStore = defineStore('info', () => {
2525
})
2626

2727
// 计算属性 - 功能特性
28-
const features = computed(() => infoConfig.value.features || [
29-
"📚 灵活知识库",
30-
"🕸️ 知识图谱集成",
31-
"🤖 多模型支持"
32-
])
28+
const features = computed(() => infoConfig.value.features || [{
29+
label: "GitHub Stars",
30+
value: "2300+",
31+
description: "开发者社区的认可与支持",
32+
icon: "stars"
33+
}, {
34+
label: "已解决 Issues",
35+
value: "200+",
36+
description: "持续改进和问题解决能力",
37+
icon: "issues"
38+
}, {
39+
label: "累计 Commits",
40+
value: "1000+",
41+
description: "活跃的开发迭代和功能更新",
42+
icon: "commits"
43+
}, {
44+
label: "开源协议",
45+
value: "MIT 协议",
46+
description: "完全免费,支持商业使用",
47+
icon: "license"
48+
}])
49+
50+
const actions = computed(() => infoConfig.value.actions || [{
51+
name: "演示视频",
52+
icon: "video",
53+
url: "https://www.bilibili.com/video/BV1DF14BTETq"
54+
}, {
55+
name: "文档中心",
56+
icon: "docs",
57+
url: "https://xerrors.github.io/Yuxi-Know/"
58+
}, {
59+
name: "提交 Issue",
60+
icon: "issue",
61+
url: "https://github.com/xerrors/Yuxi-Know/issues/new/choose"
62+
}, {
63+
name: "开发路线图",
64+
icon: "roadmap",
65+
url: "https://github.com/xerrors/Yuxi-Know#roadmap"
66+
}])
3367

3468
// 计算属性 - 页脚信息
3569
const footer = computed(() => infoConfig.value.footer || {
@@ -109,6 +143,7 @@ export const useInfoStore = defineStore('info', () => {
109143
branding,
110144
features,
111145
footer,
146+
actions,
112147

113148
// 方法
114149
setInfoConfig,
@@ -117,4 +152,4 @@ export const useInfoStore = defineStore('info', () => {
117152
loadInfoConfig,
118153
reloadInfoConfig
119154
}
120-
})
155+
})

0 commit comments

Comments
 (0)