#feature: AI analysis update

This commit is contained in:
2026-01-15 15:39:49 +08:00
parent ae6c169f5f
commit bbe68839e3
7 changed files with 343 additions and 62 deletions

View File

@@ -356,10 +356,39 @@
<span class="px-2 py-0.5 bg-blue-100 text-blue-700 rounded text-xs">{{ anomaly.classification }}</span>
<span class="text-sm text-gray-500">x{{ anomaly.count }}</span>
</div>
<!-- 原始日志示例 -->
<div v-if="anomaly.sample" class="mb-2 p-2 bg-gray-100 rounded border border-gray-200 overflow-x-auto">
<p class="text-xs text-gray-500 mb-1"><strong>原始日志:</strong></p>
<pre class="text-xs text-gray-700 whitespace-pre-wrap break-all font-mono">{{ anomaly.sample }}</pre>
</div>
<p class="text-sm text-gray-700 mb-1"><strong>可能原因:</strong> {{ anomaly.possible_cause }}</p>
<p class="text-sm text-gray-600"><strong>建议:</strong> {{ anomaly.suggestion }}</p>
</div>
</div>
<!-- 代码深度排查结果 -->
<div v-if="result.code_analysis" class="mt-6 border-t border-gray-200 pt-4">
<h4 class="font-medium text-purple-700 mb-3 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg>
代码深度排查
<span class="ml-2 px-2 py-0.5 bg-purple-100 text-purple-700 rounded text-xs">
{{ result.code_analysis.tool === 'codex' ? 'Codex' : 'Claude CLI' }}
</span>
</h4>
<div v-if="result.code_analysis.success" class="bg-purple-50 p-4 rounded-lg border border-purple-200">
<div class="text-xs text-gray-500 mb-3">
<span class="font-medium">项目路径:</span> {{ result.code_analysis.repo_path }}
</div>
<pre class="whitespace-pre-wrap text-sm text-gray-800 font-mono leading-relaxed">{{ result.code_analysis.output }}</pre>
</div>
<div v-else class="bg-red-50 p-4 rounded-lg border border-red-200">
<p class="text-red-600 text-sm">
<strong>排查失败:</strong> {{ result.code_analysis.error }}
</p>
</div>
</div>
</div>
</div>
</div>