fix: use one content classifier across all log redaction paths

This commit is contained in:
2026-10-10 02:07:13 +08:00
parent 6c4ca28a24
commit 2683d985d2
3 changed files with 54 additions and 14 deletions
-10
View File
@@ -116,16 +116,6 @@ func redactForm(body string) (string, bool) {
var textFieldLine = regexp.MustCompile(`^\s*([A-Za-z_][A-Za-z0-9_.-]*)\s*[:=]`)
func conversationField(key string) bool {
key = strings.ToLower(strings.NewReplacer("_", "", "-", "", ".", "").Replace(key))
switch key {
case "prompt", "systemprompt", "systemmessage", "instructions", "messages", "transcript", "transcription", "text", "content", "audio", "closingremark", "conversation":
return true
default:
return false
}
}
func redactConversationLines(body string) string {
lines := strings.SplitAfter(body, "\n")
hiding := false