diff --git a/src/components/MainContent.vue b/src/components/MainContent.vue
index c50d200..4a36781 100644
--- a/src/components/MainContent.vue
+++ b/src/components/MainContent.vue
@@ -70,11 +70,64 @@
+
+
+
+
+ 🔍
+ 质检报告
+
+ {{ qualityReport.overall === 'pass' ? '通过' : qualityReport.overall === 'warning' ? '需关注' : '未通过' }}
+
+
+
+
+
+
+
+
+ ✅
+ ⚠️
+ ❌
+
+
+
{{ check.title }}
+
{{ check.message }}
+
+
+
+
+
📝 {{ qualityReport.summary }}
+
+
+
+
@@ -178,6 +231,7 @@ const {
generatedContent,
thinkingContent,
generationStage,
+ qualityReport,
isGenerating,
analysisResult,
inputTask,
@@ -189,6 +243,7 @@ const {
// AI 思考过程折叠状态
import { ref } from 'vue'
const isThinkingExpanded = ref(false)
+const isQualityReportExpanded = ref(true) // 质检报告默认展开
// 范式定义
const paradigms = [
@@ -272,6 +327,7 @@ const stageLabel = computed(() => {
const labels = {
'thinking': '🧠 风格解构 & 大纲规划中...',
'draft': '✍️ 正在撰写初稿...',
+ 'inspect': '🔍 正在进行质量检查...',
'critique': '💡 AI 深度反思中...',
'refine': '✨ 深度润色中...'
}
diff --git a/src/stores/app.js b/src/stores/app.js
index b77af06..2683779 100644
--- a/src/stores/app.js
+++ b/src/stores/app.js
@@ -176,7 +176,63 @@ export const useAppStore = defineStore('app', () => {
// 如果是深度模式,进入 Agentic Workflow
if (isDeepMode.value) {
- // 2. 批判阶段
+ // 2. 质检阶段(如果有专家指令)
+ if (activeParadigm.value && expertGuidelines.value.length > 0) {
+ generationStage.value = 'inspect'
+ console.log('Store: 进入质检阶段...')
+
+ // 构建质检 Prompt
+ const guidelinesText = expertGuidelines.value
+ .map((g, i) => `${i + 1}. 【${g.title}】${g.description}`)
+ .join('\n')
+
+ const inspectPrompt = `你是一名严格的质检专家。请根据以下专家评价标准,逐条检查这篇文章的质量。
+
+# 专家评价标准
+${guidelinesText}
+
+# 待检查的文章
+${draft}
+
+# 输出要求
+请严格按照以下 JSON 格式输出检查结果(不要输出其他内容):
+{
+ "checks": [
+ {"key": "对应的检查项英文key", "title": "检查项标题", "status": "pass|warning|fail", "message": "具体评价说明"}
+ ],
+ "overall": "pass|warning|fail",
+ "summary": "整体评价总结(一句话)"
+}`
+
+ let inspectResult = ''
+ await api.generateContent(inspectPrompt, (content) => {
+ inspectResult += content
+ }, { temperature: 0.3 })
+
+ // 解析质检结果
+ try {
+ // 提取 JSON(可能被包裹在 markdown 代码块中)
+ const jsonMatch = inspectResult.match(/\{[\s\S]*\}/)
+ if (jsonMatch) {
+ qualityReport.value = JSON.parse(jsonMatch[0])
+ console.log('Store: 质检完成', qualityReport.value)
+ }
+ } catch (e) {
+ console.warn('Store: 质检结果解析失败', e)
+ qualityReport.value = {
+ checks: expertGuidelines.value.map(g => ({
+ key: g.checkKey,
+ title: g.title,
+ status: 'warning',
+ message: '质检解析异常,请人工复核'
+ })),
+ overall: 'warning',
+ summary: '质检结果解析失败,建议人工复核'
+ }
+ }
+ }
+
+ // 3. 批判阶段
generationStage.value = 'critique'
console.log('Store: 进入批判阶段...')
generatedContent.value += '\n\n---\n\n💡 **AI 深度反思 (Critique Stage)**:\n正在分析逻辑漏洞与改进空间...\n\n'
@@ -189,7 +245,7 @@ export const useAppStore = defineStore('app', () => {
critiqueContent += content
})
- // 3. 修正阶段
+ // 4. 修正阶段
generationStage.value = 'refine'
console.log('Store: 进入修正阶段...')
generatedContent.value += '\n\n---\n\n✨ **深度润色 (Refinement Stage)**:\n正在根据反思意见重写...\n\n'