diff --git a/extension/credential/types.go b/extension/credential/types.go index 19a5dc2af..79e980ada 100644 --- a/extension/credential/types.go +++ b/extension/credential/types.go @@ -20,6 +20,11 @@ const ( // It lives next to the Brand constants so every credential source resolves the // brand the same way; duplicating the rule per provider would let one copy // drift when the brand set changes. +// +// internal/core.ParseBrand applies the same rule to core.LarkBrand, which the +// rest of the CLI uses. The two cannot share an implementation: this package is +// published as a standalone SDK and may not import internal. Adding a brand +// means changing both. func ParseBrand(value string) Brand { if strings.ToLower(strings.TrimSpace(value)) == string(BrandLark) { return BrandLark diff --git a/internal/core/types.go b/internal/core/types.go index 29720d4c3..c2bc95d7d 100644 --- a/internal/core/types.go +++ b/internal/core/types.go @@ -17,6 +17,10 @@ const ( // ParseBrand normalizes a brand string (case-insensitive, whitespace-tolerant); // anything other than "lark" normalizes to BrandFeishu. +// +// extension/credential.ParseBrand applies the same rule to its own Brand type. +// The two cannot share an implementation: extension is published as a standalone +// SDK and may not import internal. Adding a brand means changing both. func ParseBrand(value string) LarkBrand { if strings.ToLower(strings.TrimSpace(value)) == "lark" { return BrandLark diff --git a/shortcuts/im/convert_lib/helpers.go b/shortcuts/im/convert_lib/helpers.go index 9ef681cbe..e416e0dc1 100644 --- a/shortcuts/im/convert_lib/helpers.go +++ b/shortcuts/im/convert_lib/helpers.go @@ -24,7 +24,7 @@ func ResolveMentionKeys(text string, mentionMap map[string]string) string { } // formatTimestamp converts a Unix timestamp string (seconds or milliseconds) to -// "YYYY-MM-DD HH:mm" local time. Values with fewer than 10 digits are treated as +// "YYYY-MM-DD HH:mm:ss" local time. Values with fewer than 10 digits are treated as // seconds; larger values are treated as milliseconds. // Returns empty string if the input is empty or unparseable. func formatTimestamp(ts string) string {