#feature: update AI log analysis

This commit is contained in:
tradewind committed 2026-02-11 11:00:32 +08:00
1 parent ddd0f531fd
commit 53bca7d609
18 files changed
+688 -262

No files matched your search

+3 -4
View File
@@ -34,10 +34,10 @@ class LogAnalysisService
AnalysisMode $mode = AnalysisMode::Logs,
bool $pushNotification = false
): LogAnalysisReport {
// 如果没有指定查询条件,默认只获取 ERROR 和 WARNING 级别的日志
// 如果没有指定查询条件,默认只获取 ERROR 级别的日志
$effectiveQuery = $query;
if (empty($query)) {
$effectiveQuery = 'ERROR or WARNING';
$effectiveQuery = 'content.level: ERROR';
}
// 创建 pending 状态的报告
@@ -114,8 +114,7 @@ class LogAnalysisService
if (in_array($impact, ['high', 'medium'])) {
$codeAnalysisResult = $this->codeAnalysisService->analyze(
$appName,
$logsContent,
$results[$appName]['summary'] ?? null
$results[$appName]
);
$results[$appName]['code_analysis'] = $codeAnalysisResult;
}