fix(output): skip subtask_error in final warning summary to avoid duplicate logging

Subtask errors are already printed in real-time when they occur in agent.go.
The final outputTextWithWarnings was printing them again after comments were displayed.
This commit is contained in:
kite 2026-06-06 20:31:07 +08:00
parent 5466baa16e
commit e34c634879

View file

@ -43,10 +43,11 @@ func outputTextWithWarnings(comments []model.LlmComment, warnings []agent.AgentW
renderComment(c)
}
}
if len(warnings) > 0 {
for _, w := range warnings {
fmt.Fprintf(os.Stderr, "[ocr] WARNING [%s] %s: %s\n", w.Type, w.File, w.Message)
for _, w := range warnings {
if w.Type == "subtask_error" {
continue
}
fmt.Fprintf(os.Stderr, "[ocr] WARNING [%s] %s: %s\n", w.Type, w.File, w.Message)
}
}