优化审计报告AI分析页面功能
This commit is contained in:
@@ -523,7 +523,7 @@
|
||||
RobotOutlined,
|
||||
SaveOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import { generateAuditReport } from '@/api/ai/auditReport';
|
||||
import { generateDefaultText } from '@/api/ai/auditReport';
|
||||
import { getPwlProjectLibraryByIds } from '@/api/pwl/pwlProjectLibrary';
|
||||
import { addAiHistory } from '@/api/ai/aiHistory';
|
||||
import * as auditContentApi from '@/api/ai/auditContent';
|
||||
@@ -1267,13 +1267,15 @@
|
||||
|
||||
section.generating = true;
|
||||
try {
|
||||
section.content = await generateAuditReport({
|
||||
kbId: form.kbId || '',
|
||||
kbIds: combinedKbIds.value,
|
||||
// 获取章节标题
|
||||
const chapterTitle = childIndex !== undefined && section.children
|
||||
? section.children[childIndex].title
|
||||
: section.title;
|
||||
|
||||
section.content = await generateDefaultText({
|
||||
projectId: form.id,
|
||||
formCommit: section.formCommit || 0,
|
||||
history: section.content || '',
|
||||
suggestion: section.suggestion || '',
|
||||
...contextData
|
||||
chapterTitle: chapterTitle
|
||||
});
|
||||
} finally {
|
||||
section.generating = false;
|
||||
|
||||
Reference in New Issue
Block a user