(profileName: string)
| 51 | * 按 profile 名称获取 API Key |
| 52 | */ |
| 53 | export function getApiKeyByProfile(profileName: string): string { |
| 54 | const data = loadAuthProfiles() |
| 55 | const profile = data.profiles[profileName] |
| 56 | return profile?.key || '' |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * 按 provider 名称获取 API Key(模糊匹配,取第一个匹配的 profile) |
no test coverage detected