mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
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:
parent
a224d9243f
commit
116be6dc9b
@ -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({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user