cicy-desktop 2.1.212 → 2.1.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -422,10 +422,11 @@ function injectGatewayKey(apiKey, gatewayUrl = GATEWAY_URL, globalJsonPath = GLO
|
|
|
422
422
|
try {
|
|
423
423
|
const cur = readGlobalConfig(globalJsonPath);
|
|
424
424
|
const p = cur.providers;
|
|
425
|
-
// stt
|
|
426
|
-
//
|
|
427
|
-
//
|
|
428
|
-
|
|
425
|
+
// All gateway routes (incl. stt) just need to be SET — any value the operator
|
|
426
|
+
// chose counts. We seed missing slots below but never override a user's pick
|
|
427
|
+
// (e.g. routing stt to a Groq Whisper provider), so the pre-check must accept
|
|
428
|
+
// any truthy routing, not demand the exact gateway slot.
|
|
429
|
+
const routed = p && p.default && Object.keys(GATEWAY_DEFAULT_ROUTING).every((cli) => p.default[cli]);
|
|
429
430
|
const itemsOk = p && Array.isArray(p.items) && Object.entries(GATEWAY_PROVIDER_TEMPLATES).every(([key, tpl]) => {
|
|
430
431
|
const it = p.items.find((x) => x && x.key === key);
|
|
431
432
|
return it && it.apiKey === apiKey && it.url === gatewayUrl && Object.keys(tpl).every((f) => it[f] !== undefined);
|
|
@@ -440,11 +441,10 @@ function injectGatewayKey(apiKey, gatewayUrl = GATEWAY_URL, globalJsonPath = GLO
|
|
|
440
441
|
for (const [cli, slot] of Object.entries(GATEWAY_DEFAULT_ROUTING)) {
|
|
441
442
|
if (!p.default[cli]) { p.default[cli] = slot; changed = true; }
|
|
442
443
|
}
|
|
443
|
-
//
|
|
444
|
-
//
|
|
445
|
-
//
|
|
446
|
-
//
|
|
447
|
-
if (p.default.stt !== "defaultOpenAi") { p.default.stt = "defaultOpenAi"; changed = true; }
|
|
444
|
+
// NOTE: stt is part of GATEWAY_DEFAULT_ROUTING above, so the only-if-absent
|
|
445
|
+
// loop already seeds default.stt="defaultOpenAi" on a fresh machine. We do NOT
|
|
446
|
+
// force it here — that would clobber an operator who routed stt elsewhere
|
|
447
|
+
// (e.g. a Groq Whisper provider) on every title-sync.
|
|
448
448
|
if (!Array.isArray(p.items)) p.items = [];
|
|
449
449
|
for (const [key, tpl] of Object.entries(GATEWAY_PROVIDER_TEMPLATES)) {
|
|
450
450
|
let item = p.items.find((it) => it && it.key === key);
|