MCPcopy Create free account
hub / github.com/coder/coder / responsesAPIDiagnostic

Function responsesAPIDiagnostic

coderd/x/chatd/chaterror/classify.go:400–408  ·  view source on GitHub ↗
(lowerMessage, detail string)

Source from the content-addressed store, hash-verified

398}
399
400func responsesAPIDiagnostic(lowerMessage, detail string) (string, bool) {
401 lowerDetail := strings.ToLower(detail)
402 for _, match := range responsesAPIDiagnosticMatches {
403 if strings.Contains(lowerMessage, match.pattern) || strings.Contains(lowerDetail, match.pattern) {
404 return match.detail, true
405 }
406 }
407 return "", false
408}
409
410func normalizeClassification(classified ClassifiedError) ClassifiedError {
411 classified.Message = strings.TrimSpace(classified.Message)

Callers 1

ClassifyFunction · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected