fix: preserve spaces in API keys; update i18n tips to use commas or newlines (#10751)

fix(api): preserve spaces in API keys; i18n: clarify tips

Tips now say "Use commas to separate multiple keys." Full-width commas are auto-normalized.
This commit is contained in:
Shemol 2025-10-17 00:50:09 +08:00 committed by GitHub
parent 76271cbf77
commit 79c697c34d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -4079,7 +4079,7 @@
"api_host_tooltip": "Override only when your provider requires a custom OpenAI-compatible endpoint.",
"api_key": {
"label": "API Key",
"tip": "Multiple keys separated by commas or spaces"
"tip": "Use commas to separate multiple keys"
},
"api_version": "API Version",
"aws-bedrock": {

View File

@ -4079,7 +4079,7 @@
"api_host_tooltip": "仅在服务商需要自定义的 OpenAI 兼容地址时覆盖。",
"api_key": {
"label": "API 密钥",
"tip": "多个密钥使用逗号或空格分隔"
"tip": "多个密钥使用逗号分隔"
},
"api_version": "API 版本",
"aws-bedrock": {

View File

@ -4079,7 +4079,7 @@
"api_host_tooltip": "僅在服務商需要自訂的 OpenAI 相容端點時才覆蓋。",
"api_key": {
"label": "API 金鑰",
"tip": "多個金鑰使用逗號或空格分隔"
"tip": "多個金鑰使用逗號分隔"
},
"api_version": "API 版本",
"aws-bedrock": {

View File

@ -5,7 +5,7 @@
* @returns {string} API key
*/
export function formatApiKeys(value: string): string {
return value.replaceAll('', ',').replaceAll(' ', ',').replaceAll('\n', ',')
return value.replaceAll('', ',').replaceAll('\n', ',')
}
/**