feat: support escaping the comma character in the API key. (#5088)

feat: support escaping the comma character in the API key.
This commit is contained in:
chenxi 2025-04-20 10:25:28 +08:00 committed by GitHub
parent a224d9243f
commit 116be6dc9b

View File

@ -206,8 +206,9 @@ const ProviderSetting: FC<Props> = ({ provider: _provider }) => {
if (apiKey.includes(',')) {
const keys = apiKey
.split(',')
.split(/(?<!\\),/)
.map((k) => k.trim())
.map(k => k.replace(/\\,/g, ','))
.filter((k) => k)
const result = await ApiCheckPopup.show({