{{ t('wiki.selectPage') }}
+diff --git a/mateclaw-ui/src/i18n/locales/en-US.ts b/mateclaw-ui/src/i18n/locales/en-US.ts
index 4f31a350..e8a94e33 100644
--- a/mateclaw-ui/src/i18n/locales/en-US.ts
+++ b/mateclaw-ui/src/i18n/locales/en-US.ts
@@ -1767,6 +1767,22 @@ export default {
knowledgeBases: 'Knowledge Bases',
noKB: 'No knowledge bases yet',
selectKB: 'Select a knowledge base',
+ library: {
+ countLabel: '{count} knowledge bases',
+ searchPlaceholder: 'Search knowledge bases...',
+ empty: 'No knowledge bases yet',
+ emptyHint: 'Click "New Knowledge Base" in the top right to start organizing your knowledge.',
+ noMatch: 'No matching knowledge bases',
+ open: 'Open',
+ pages: '{count} pages',
+ raws: '{count} materials',
+ noDescription: 'No description',
+ updatedAt: 'Updated {time}',
+ sortRecent: 'Recently updated',
+ sortName: 'Name',
+ sortPages: 'Pages',
+ backToLibrary: 'Back to library',
+ },
selectPage: 'Select a page from the sidebar',
pageKicker: 'Knowledge Page',
confirmDelete: 'Delete page "{title}"? This cannot be undone.',
diff --git a/mateclaw-ui/src/i18n/locales/zh-CN.ts b/mateclaw-ui/src/i18n/locales/zh-CN.ts
index 9a340bae..e765063e 100644
--- a/mateclaw-ui/src/i18n/locales/zh-CN.ts
+++ b/mateclaw-ui/src/i18n/locales/zh-CN.ts
@@ -1779,6 +1779,22 @@ export default {
knowledgeBases: '知识库',
noKB: '暂无知识库',
selectKB: '请选择一个知识库',
+ library: {
+ countLabel: '{count} 个知识库',
+ searchPlaceholder: '搜索知识库...',
+ empty: '还没有知识库',
+ emptyHint: '点击右上角"新建知识库"开始组织你的知识',
+ noMatch: '没有匹配的知识库',
+ open: '进入',
+ pages: '{count} 页',
+ raws: '{count} 材料',
+ noDescription: '暂无描述',
+ updatedAt: '更新于 {time}',
+ sortRecent: '最近更新',
+ sortName: '名称',
+ sortPages: '页面数',
+ backToLibrary: '返回库',
+ },
selectPage: '从左侧选择一个页面查看',
pageKicker: '知识页面',
confirmDelete: '确认删除页面「{title}」?此操作不可撤销。',
diff --git a/mateclaw-ui/src/stores/useWikiStore.ts b/mateclaw-ui/src/stores/useWikiStore.ts
index 86ba8e6d..774db087 100644
--- a/mateclaw-ui/src/stores/useWikiStore.ts
+++ b/mateclaw-ui/src/stores/useWikiStore.ts
@@ -109,6 +109,14 @@ export const useWikiStore = defineStore('wiki', () => {
}
}
+ function backToLibrary() {
+ currentKB.value = null
+ currentPage.value = null
+ rawMaterials.value = []
+ pages.value = []
+ selectedRawId.value = null
+ }
+
async function fetchRawMaterials(kbId: number) {
const res: any = await wikiApi.listRaw(kbId)
rawMaterials.value = res.data || []
@@ -183,6 +191,7 @@ export const useWikiStore = defineStore('wiki', () => {
selectKB,
createKB,
deleteKB,
+ backToLibrary,
fetchRawMaterials,
fetchPages,
filterPagesByRaw,
diff --git a/mateclaw-ui/src/views/Wiki/components/WikiKBCard.vue b/mateclaw-ui/src/views/Wiki/components/WikiKBCard.vue
new file mode 100644
index 00000000..bcfb7621
--- /dev/null
+++ b/mateclaw-ui/src/views/Wiki/components/WikiKBCard.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
diff --git a/mateclaw-ui/src/views/Wiki/components/WikiLibrary.vue b/mateclaw-ui/src/views/Wiki/components/WikiLibrary.vue
new file mode 100644
index 00000000..b59de633
--- /dev/null
+++ b/mateclaw-ui/src/views/Wiki/components/WikiLibrary.vue
@@ -0,0 +1,254 @@
+
+ {{ t('wiki.desc') }} {{ t('wiki.library.emptyHint') }} {{ t('wiki.selectPage') }} {{ kb.description }}{{ t('nav.wiki') }}
+ {{ t('wiki.library.empty') }}
+ {{ kb.name }}
+
{{ t('wiki.desc') }}
-{{ t('wiki.selectKB') }}
-{{ t('wiki.selectPage') }}
-