fix(codex): use unicode title casing for plan

This commit is contained in:
zhiqing0205
2026-01-06 10:24:02 +08:00
parent ac3ca0ad8e
commit aa8526edc0

View File

@@ -4,6 +4,9 @@ import (
"fmt" "fmt"
"strings" "strings"
"unicode" "unicode"
"golang.org/x/text/cases"
"golang.org/x/text/language"
) )
// CredentialFileName returns the filename used to persist Codex OAuth credentials. // CredentialFileName returns the filename used to persist Codex OAuth credentials.
@@ -48,8 +51,5 @@ func titleToken(token string) string {
if token == "" { if token == "" {
return "" return ""
} }
lower := strings.ToLower(token) return cases.Title(language.English).String(token)
runes := []rune(lower)
runes[0] = unicode.ToUpper(runes[0])
return string(runes)
} }