MCPcopy Index your code
hub / github.com/coder/coder / normalizeWarnings

Function normalizeWarnings

coderd/x/chatd/chatdebug/model.go:1176–1190  ·  view source on GitHub ↗

normalizeWarnings converts provider call warnings into their normalized form. Returns nil for empty input to keep JSON clean.

(warnings []fantasy.CallWarning)

Source from the content-addressed store, hash-verified

1174// normalizeWarnings converts provider call warnings into their
1175// normalized form. Returns nil for empty input to keep JSON clean.
1176func normalizeWarnings(warnings []fantasy.CallWarning) []normalizedWarning {
1177 if len(warnings) == 0 {
1178 return nil
1179 }
1180 result := make([]normalizedWarning, 0, len(warnings))
1181 for _, w := range warnings {
1182 result = append(result, normalizedWarning{
1183 Type: string(w.Type),
1184 Setting: w.Setting,
1185 Details: w.Details,
1186 Message: w.Message,
1187 })
1188 }
1189 return result
1190}
1191
1192// --------------- normalize functions ---------------
1193

Callers 4

wrapStreamSeqFunction · 0.85
wrapObjectStreamSeqFunction · 0.85
normalizeResponseFunction · 0.85
normalizeObjectResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected