mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 21:30:17 +08:00
chore: satisfy clippy::nonminimal_bool and prettier to unblock CI
- codex_config: rewrite `!(A && !B)` as `!A || B` (De Morgan- equivalent) — also reads more directly as "no OAuth, or already has provider API key". - UsageScriptModal: reflow conditional onto one line per prettier.
This commit is contained in:
@@ -177,8 +177,7 @@ const UsageScriptModal: React.FC<UsageScriptModalProps> = ({
|
||||
const auth = (config as any).auth || {};
|
||||
const configToml = (config as any).config || "";
|
||||
const apiKey =
|
||||
typeof auth.OPENAI_API_KEY === "string" &&
|
||||
auth.OPENAI_API_KEY.trim()
|
||||
typeof auth.OPENAI_API_KEY === "string" && auth.OPENAI_API_KEY.trim()
|
||||
? auth.OPENAI_API_KEY
|
||||
: extractCodexExperimentalBearerToken(configToml);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user