mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 07:20:22 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// the agent reports a model id. This includes custom models.json entries.
|
||||
|
||||
import { loadConfig } from "../config/config.js";
|
||||
import { resolveMoltbotAgentDir } from "./agent-paths.js";
|
||||
import { ensureMoltbotModelsJson } from "./models-config.js";
|
||||
import { resolveOpenClawAgentDir } from "./agent-paths.js";
|
||||
import { ensureOpenClawModelsJson } from "./models-config.js";
|
||||
|
||||
type ModelEntry = { id: string; contextWindow?: number };
|
||||
|
||||
@@ -12,8 +12,8 @@ const loadPromise = (async () => {
|
||||
try {
|
||||
const { discoverAuthStorage, discoverModels } = await import("@mariozechner/pi-coding-agent");
|
||||
const cfg = loadConfig();
|
||||
await ensureMoltbotModelsJson(cfg);
|
||||
const agentDir = resolveMoltbotAgentDir();
|
||||
await ensureOpenClawModelsJson(cfg);
|
||||
const agentDir = resolveOpenClawAgentDir();
|
||||
const authStorage = discoverAuthStorage(agentDir);
|
||||
const modelRegistry = discoverModels(authStorage, agentDir);
|
||||
const models = modelRegistry.getAll() as ModelEntry[];
|
||||
|
||||
Reference in New Issue
Block a user