优化审计报告AI分析页面功能

This commit is contained in:
2026-04-12 22:07:43 +08:00
parent 3ac7e69330
commit bf5be2e832
4 changed files with 42 additions and 41 deletions

View File

@@ -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;