Skip to content

Commit 11e6b2f

Browse files
committed
Satisfy no-dynamic-delete in runtime catalog overlay
1 parent 7f17bf5 commit 11e6b2f

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
@@ -1312,15 +1312,13 @@ export function runtimeSettingsWithCatalog(
13121312
}
13131313
// OAuth-marked catalog rows carry live profile tokens; they overlay
13141314
// credential-less placeholders but never a hand-named API-key row (CL-6728).
1315-
const overlaid = { ...fromCatalog };
1316-
for (const name of Object.keys(overlaid)) {
1317-
if (
1318-
(isCodexProviderName(name) || isXaiProviderName(name)) &&
1319-
isHandNamedProviderEntry(settings.providers[name])
1320-
) {
1321-
delete overlaid[name];
1322-
}
1323-
}
1315+
const overlaid = Object.fromEntries(
1316+
Object.entries(fromCatalog).filter(
1317+
([name]) =>
1318+
(!isCodexProviderName(name) && !isXaiProviderName(name)) ||
1319+
!isHandNamedProviderEntry(settings.providers[name]),
1320+
),
1321+
);
13241322
return {
13251323
...settings,
13261324
providers: {

0 commit comments

Comments
 (0)