diff --git a/web/src/views/Knowledge.vue b/web/src/views/Knowledge.vue
index 204a4ef..f5d6383 100644
--- a/web/src/views/Knowledge.vue
+++ b/web/src/views/Knowledge.vue
@@ -59,13 +59,44 @@ const embeddingConfig = ref({
model: '',
})
+const parsingConfig = ref({
+ enablePdf: true,
+ engine: 'default',
+ pandoc: true,
+ academic: false,
+ highRes: false,
+ fileSizeLimit: '5242880',
+})
+
const openCreateDialog = () => {
createStep.value = 1
newKbForm.value = { name: '', description: '' }
embeddingConfig.value = { provider: '', model: '' }
+ parsingConfig.value = {
+ enablePdf: true,
+ engine: 'default',
+ pandoc: true,
+ academic: false,
+ highRes: false,
+ fileSizeLimit: '5242880',
+ }
showCreateDialog.value = true
}
+const cancelCreate = () => {
+ newKbForm.value = { name: '', description: '' }
+ embeddingConfig.value = { provider: '', model: '' }
+ parsingConfig.value = {
+ enablePdf: true,
+ engine: 'default',
+ pandoc: true,
+ academic: false,
+ highRes: false,
+ fileSizeLimit: '5242880',
+ }
+ showCreateDialog.value = false
+}
+
const nextStep = () => {
if (!newKbForm.value.name) {
ElMessage.warning('Please enter knowledge base name')
@@ -94,12 +125,6 @@ const createKnowledgeBase = () => {
ElMessage.success('Knowledge base created successfully')
}
-const cancelCreate = () => {
- newKbForm.value = { name: '', description: '' }
- embeddingConfig.value = { provider: '', model: '' }
- showCreateDialog.value = false
-}
-
// 编辑知识库
const showEditDialog = ref(false)
const editForm = ref({
@@ -271,8 +296,8 @@ const viewDetail = (kb: any) => {
>
@@ -281,42 +306,102 @@ const viewDetail = (kb: any) => {
:class="{ active: createStep === 2 }"
@click="createStep = 2"
>
-
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -338,7 +423,141 @@ const viewDetail = (kb: any) => {
-
+
+
+
+
+
+
+
+
+
+
+
+ Enable PDF Parsing
+
+
+
+
+ Parsing Engine
+
+
+
+
+
+
+
+
+
Enabled Post-processing
+
+
+
+
+
+
+
+ Use Pandoc Markdown Enrichment
+ Enable Pandoc conversion for rich formatting
+
+
+
+
+
+
+
+
+ Use Academic Document Parsing
+ Parse formulas, tables, and academic structures
+
+
+
+
+
+
+
+
+ Use High Resolution Parsing
+ High quality mode for complex documents
+
+
+
+
+
+
+
+ File Size Limit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -348,21 +567,21 @@ const viewDetail = (kb: any) => {
diff --git a/web/src/views/knowledge/knowledge.css b/web/src/views/knowledge/knowledge.css
index 4bbecfb..771becf 100644
--- a/web/src/views/knowledge/knowledge.css
+++ b/web/src/views/knowledge/knowledge.css
@@ -191,7 +191,7 @@
/* 创建内容布局 */
.create-layout {
display: flex;
- min-height: 560px;
+ min-height: 600px;
}
/* 左侧 sidebar */
@@ -199,17 +199,17 @@
width: 280px;
background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
border-right: 1px solid #1e2832;
- padding: 20px 12px;
+ padding: 16px 12px;
display: flex;
flex-direction: column;
- gap: 8px;
+ gap: 6px;
}
.menu-item {
display: flex;
align-items: center;
gap: 14px;
- padding: 16px;
+ padding: 14px;
border-radius: 12px;
cursor: pointer;
transition: all 0.25s ease;
@@ -227,16 +227,17 @@
}
.menu-icon {
- width: 42px;
- height: 42px;
- border-radius: 12px;
+ width: 36px;
+ height: 36px;
+ border-radius: 10px;
background-color: #1e2832;
display: flex;
align-items: center;
justify-content: center;
- font-size: 16px;
+ font-size: 14px;
color: #5f6368;
transition: all 0.3s ease;
+ flex-shrink: 0;
}
.menu-item.active .menu-icon {
@@ -253,10 +254,11 @@
}
.menu-title {
- font-size: 15px;
+ font-size: 14px;
font-weight: 600;
color: #e8eaed;
transition: color 0.2s;
+ white-space: nowrap;
}
.menu-item.active .menu-title {
@@ -409,6 +411,104 @@
color: #36bffa;
}
+/* Parsing 配置样式 */
+.parsing-section {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+}
+
+.parsing-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 12px 16px;
+ background-color: #161b22;
+ border-radius: 8px;
+ border: 1px solid #2d3640;
+}
+
+.parsing-label {
+ font-size: 14px;
+ color: #e8eaed;
+ font-weight: 500;
+}
+
+.parsing-select {
+ width: 200px;
+}
+
+.parsing-select :deep(.el-input__wrapper) {
+ background-color: #1e2832;
+ border-color: #2d3640;
+}
+
+.parsing-input {
+ width: 200px;
+}
+
+.parsing-input :deep(.el-input__wrapper) {
+ background-color: #1e2832;
+ border-color: #2d3640;
+}
+
+/* Switch 样式 */
+:deep(.el-switch.is-checked .el-switch__core) {
+ background-color: #36bffa;
+ border-color: #36bffa;
+}
+
+.parsing-divider {
+ height: 1px;
+ background-color: #2d3640;
+ margin: 8px 0;
+}
+
+/* Post-processing 列表 */
+.postprocess-list {
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+.postprocess-item {
+ display: flex;
+ align-items: flex-start;
+ gap: 14px;
+ padding: 14px 16px;
+ background-color: #161b22;
+ border-radius: 8px;
+ border: 1px solid #2d3640;
+ transition: all 0.2s;
+}
+
+.postprocess-item.active {
+ border-color: rgba(54, 191, 250, 0.3);
+ background: linear-gradient(135deg, rgba(54, 191, 250, 0.05) 0%, transparent 100%);
+}
+
+.postprocess-toggle {
+ flex-shrink: 0;
+ padding-top: 2px;
+}
+
+.postprocess-info {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+}
+
+.postprocess-title {
+ font-size: 14px;
+ color: #e8eaed;
+ font-weight: 500;
+}
+
+.postprocess-desc {
+ font-size: 12px;
+ color: #5f6368;
+}
+
/* 底部按钮区域 */
.dialog-footer {
display: flex;