feat(training): 完善安全培训题库与考试交互

修复 PDF 导入判断和填空题解析,支持文本题判分、回顾改答及安全培训三级流程校验。
This commit is contained in:
runny committed 2026-08-18 01:12:04 +08:00
1 parent ec4ed9b67d
commit e62e4961d4
19 files changed
+721 -48

No files matched your search

@@ -369,8 +369,14 @@ export function useKbWorkspaceDocuments(
};
const handleSyncDocument = async (documentId: number) => {
// #region debug-point A:sync-click
fetch('http://127.0.0.1:7787/event', { method: 'POST', body: JSON.stringify({ sessionId: 'knowledge-base-dify-sync', runId: 'pre-fix', hypothesisId: 'A', location: 'useKbWorkspaceDocuments.ts:371', msg: '[DEBUG] Dify sync click received', data: { documentId }, ts: Date.now() }) }).catch(() => {});
// #endregion
syncingDocumentId.value = documentId;
const result = await syncKbDocumentToDify(documentId);
// #region debug-point B:sync-response
fetch('http://127.0.0.1:7787/event', { method: 'POST', body: JSON.stringify({ sessionId: 'knowledge-base-dify-sync', runId: 'pre-fix', hypothesisId: 'B', location: 'useKbWorkspaceDocuments.ts:376', msg: '[DEBUG] Dify sync API response received', data: { documentId, ok: result.ok, error: result.error || null, jobId: result.job?.id || null, message: result.job?.message || null }, ts: Date.now() }) }).catch(() => {});
// #endregion
syncingDocumentId.value = null;
if (!result.ok) {