+ ) : isCompleted ? (
+ <>
+ {progressState.aiQuestions && progressState.aiQuestions.length > 0 && (
+
+
生成的问题预览:
+
+ {progressState.aiQuestions.map((item: any, index: number) => {
+ const key = `${item.category || '未分类'}-${index}`;
+ const expanded = !!expandedMap[key];
+ const shownQuestions = expanded ? item.questions : (item.questions || []).slice(0, 3);
+ return (
+
+ {item.category || '未分类'}
+
+ ({item.doc_count}个文件,占{Math.round((item.question_ratio || 0) * 100)}%,共生成{item.question_count}个问题)
+
+
+ }
+ headStyle={{ padding: '8px 12px' }}
+ bodyStyle={{ padding: '8px 12px' }}
+ >
+
+
(
+
+ {q.question_text}
+
+ )}
+ />
+ {(item.questions?.length || 0) > 3 && (
+
+
+
+ )}
+
+ );
+ })}
+