agentnetwork: fix staticcheck S1016 in marshalGuardrailConfig

MergedPromptCapture and guardrailPromptCapture are now identical structs, so
convert directly instead of copying field-by-field.
This commit is contained in:
mlsmaycon
2026-07-26 11:31:22 +00:00
parent 244ca3f671
commit a620b497de

View File

@@ -838,10 +838,7 @@ func applyAccountCollectionControls(merged *MergedGuardrails, settings *types.Se
func marshalGuardrailConfig(providerAllowlists map[string][]string, capture MergedPromptCapture) ([]byte, error) {
cfg := guardrailConfig{
ProviderAllowlists: providerAllowlists,
PromptCapture: guardrailPromptCapture{
Enabled: capture.Enabled,
RedactPii: capture.RedactPii,
},
PromptCapture: guardrailPromptCapture(capture),
}
out, err := json.Marshal(cfg)
if err != nil {