feat(ai-review 對話收斂): 讀 PR review 留言判斷解決狀態並收斂 findings #45

Merged
admin merged 69 commits from develop into master 2026-06-23 08:30:28 +00:00
Showing only changes of commit f170c36fc8 - Show all commits
+4 -3
View File
@@ -109,8 +109,9 @@ function toReviewComment(f) {
/**
* 發布單一 Gitea review
* - summaryFindings 只用來統計本文數字
* - commentFindings 用來產生 review comments,並依嚴重等級排序
* - summaryFindings 只用來統計本文數字(含新舊問題)
* - commentFindings 用來產生 review comments,並依嚴重等級排序
* 只為新問題加上行內標註,舊問題(is_new === false)僅計入統計、不再重複標註檔案與行數
*/
export async function postFindingsReview(findings, deps = {}) {
const {
@@ -120,7 +121,7 @@ export async function postFindingsReview(findings, deps = {}) {
usageSection = '',
} = deps;
const sortedComments = [...commentFindings].sort(bySeverity);
const comments = sortedComments.map(toReviewComment).filter(Boolean);
const comments = sortedComments.filter(f => f.is_new !== false).map(toReviewComment).filter(Boolean);
const body = buildReviewSummary(summaryFindings, usageSection);
await postReview({ body, comments });
ok(`review 發布: summary=${summaryFindings.length} total=${sortedComments.length} commentable=${comments.length}`);