feat: 添加问题生成功能的前端支持,包括多语言展示和知识库列表标识

This commit is contained in:
wizardchen
2025-12-03 01:58:03 +08:00
parent 16562eebbb
commit 86e8ee0e01
4 changed files with 21 additions and 2 deletions
+2 -1
View File
@@ -807,7 +807,8 @@ export default {
},
features: {
knowledgeGraph: 'Knowledge Graph Enabled',
multimodal: 'Multimodal Enabled'
multimodal: 'Multimodal Enabled',
questionGeneration: 'Question Generation Enabled'
},
processing: 'Processing import task',
processingDocuments: 'Processing {count} documents',
+2 -1
View File
@@ -904,7 +904,8 @@ export default {
},
features: {
knowledgeGraph: 'Граф знаний включен',
multimodal: 'Мультимодальность включена'
multimodal: 'Мультимодальность включена',
questionGeneration: 'Генерация вопросов включена'
},
processing: 'Обработка задачи импорта',
processingDocuments: 'Обработка {count} документов',
+1
View File
@@ -1140,6 +1140,7 @@ export default {
features: {
knowledgeGraph: "已启用知识图谱",
multimodal: "已启用多模态",
questionGeneration: "已启用问题生成",
},
processing: "正在处理导入任务",
processingDocuments: "正在处理 {count} 个文档",
@@ -143,6 +143,11 @@
<t-icon name="image" size="14px" />
</div>
</t-tooltip>
<t-tooltip v-if="kb.question_generation_config?.enabled" :content="$t('knowledgeList.features.questionGeneration')" placement="top">
<div class="feature-badge question">
<t-icon name="help-circle" size="14px" />
</div>
</t-tooltip>
</div>
</div>
<span class="card-time">{{ kb.updated_at }}</span>
@@ -220,6 +225,7 @@ interface KB {
vlm_config?: { enabled?: boolean; model_id?: string };
extract_config?: { enabled?: boolean };
cos_config?: { provider?: string; bucket_name?: string };
question_generation_config?: { enabled?: boolean; question_count?: number };
knowledge_count?: number;
chunk_count?: number;
isProcessing?: boolean; // 是否有正在处理的导入任务
@@ -934,6 +940,16 @@ const handleUploadFinishedEvent = (event: Event) => {
}
}
&.question {
background: rgba(0, 150, 136, 0.1);
color: #009688;
border: 1px solid rgba(0, 150, 136, 0.2);
&:hover {
background: rgba(0, 150, 136, 0.15);
}
}
}
@keyframes spin {