From 549c0c2c5a7318c9409ffec4e3365b3d055a068f Mon Sep 17 00:00:00 2001 From: "huynguyen03.dev" Date: Sun, 7 Dec 2025 16:08:12 +0700 Subject: [PATCH] fix: filter whitespace-only text content in Claude to OpenAI translation Remove redundant existence check since TrimSpace handles empty strings --- internal/translator/openai/claude/openai_claude_request.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/translator/openai/claude/openai_claude_request.go b/internal/translator/openai/claude/openai_claude_request.go index 2510b19c..3521b2e5 100644 --- a/internal/translator/openai/claude/openai_claude_request.go +++ b/internal/translator/openai/claude/openai_claude_request.go @@ -243,9 +243,6 @@ func convertClaudeContentPart(part gjson.Result) (string, bool) { switch partType { case "text": - if !part.Get("text").Exists() { - return "", false - } text := part.Get("text").String() if strings.TrimSpace(text) == "" { return "", false