fix: remove ineffective dynamic imports
This commit is contained in:
parent
7603c30377
commit
685f6c5132
@ -8,6 +8,7 @@ import { consumeRootOptionToken, FLAG_TERMINATOR } from "../infra/cli-root-optio
|
||||
import { resolveOpenClawAgentDir } from "./agent-paths.js";
|
||||
import { normalizeProviderId } from "./model-selection.js";
|
||||
import { ensureOpenClawModelsJson } from "./models-config.js";
|
||||
import { discoverAuthStorage, discoverModels } from "./pi-model-discovery-runtime.js";
|
||||
|
||||
type ModelEntry = { id: string; contextWindow?: number };
|
||||
type ModelRegistryLike = {
|
||||
@ -157,8 +158,6 @@ function ensureContextWindowCacheLoaded(): Promise<void> {
|
||||
}
|
||||
|
||||
try {
|
||||
const { discoverAuthStorage, discoverModels } =
|
||||
await import("./pi-model-discovery-runtime.js");
|
||||
const agentDir = resolveOpenClawAgentDir();
|
||||
const authStorage = discoverAuthStorage(agentDir);
|
||||
const modelRegistry = discoverModels(authStorage, agentDir) as unknown as ModelRegistryLike;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { ensureAuthProfileStore } from "../../agents/auth-profiles.runtime.js";
|
||||
import { clearSessionAuthProfileOverride } from "../../agents/auth-profiles/session-override.js";
|
||||
import { lookupContextTokens } from "../../agents/context.js";
|
||||
import { DEFAULT_CONTEXT_TOKENS } from "../../agents/defaults.js";
|
||||
@ -365,7 +366,6 @@ export async function createModelSelectionState(params: {
|
||||
}
|
||||
|
||||
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
||||
const { ensureAuthProfileStore } = await import("../../agents/auth-profiles.runtime.js");
|
||||
const store = ensureAuthProfileStore(undefined, {
|
||||
allowKeychainPrompt: false,
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user