Skip to content

Commit 115c6ed

Browse files
committed
Satisfy no-dynamic-delete in runtime catalog overlay
1 parent b6fed7e commit 115c6ed

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎src/config/index.ts‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,15 +1289,13 @@ export function runtimeSettingsWithCatalog(
12891289
}
12901290
// OAuth-marked catalog rows carry live profile tokens; they overlay
12911291
// credential-less placeholders but never a hand-named API-key row (CL-6728).
1292-
const overlaid = { ...fromCatalog };
1293-
for (const name of Object.keys(overlaid)) {
1294-
if (
1295-
(isCodexProviderName(name) || isXaiProviderName(name)) &&
1296-
isHandNamedProviderEntry(settings.providers[name])
1297-
) {
1298-
delete overlaid[name];
1299-
}
1300-
}
1292+
const overlaid = Object.fromEntries(
1293+
Object.entries(fromCatalog).filter(
1294+
([name]) =>
1295+
(!isCodexProviderName(name) && !isXaiProviderName(name)) ||
1296+
!isHandNamedProviderEntry(settings.providers[name]),
1297+
),
1298+
);
13011299
return {
13021300
...settings,
13031301
providers: {

0 commit comments

Comments
 (0)