Update backend/internal/service/gateway_request.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
时雨遥
2026-03-08 21:21:28 +08:00
committed by GitHub
parent 1071fe0ac7
commit 9ee7d3935d

View File

@@ -507,7 +507,11 @@ func FilterSignatureSensitiveBlocksForRetry(body []byte) []byte {
filtered = append(filtered, edit)
}
if len(filtered) != len(edits) {
cm["edits"] = filtered
if len(filtered) == 0 {
delete(cm, "edits")
} else {
cm["edits"] = filtered
}
}
}
}