refactor: migrate to ModelRegistry.create factory
ModelRegistry's public constructor became private in pi-coding-agent 0.64. Direct `new ModelRegistry(...)` calls no longer compile. Switch the five production sites to the factory (`ModelRegistry.create`) and update the four test modules that mocked the class as a constructor to now mock it as an object with `create` and `inMemory` static methods. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -375,7 +375,7 @@ export async function runDaemon(opts: DaemonOptions = {}) {
|
||||
const authStorage = AuthStorage.create(getFusionAuthPath());
|
||||
const legacyAuthStorage = createReadOnlyAuthFileStorage(getLegacyAuthPaths());
|
||||
const mergedAuthStorage = mergeAuthStorageReads(authStorage, [legacyAuthStorage]);
|
||||
const modelRegistry = new ModelRegistry(mergedAuthStorage, getModelRegistryModelsPath());
|
||||
const modelRegistry = ModelRegistry.create(mergedAuthStorage, getModelRegistryModelsPath());
|
||||
const dashboardAuthStorage = wrapAuthStorageWithApiKeyProviders(mergedAuthStorage, modelRegistry);
|
||||
|
||||
// PackageManager may be used for skills adapter even if extension loading fails
|
||||
|
||||
Reference in New Issue
Block a user