mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 20:04:32 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
VENICE_DEFAULT_MODEL_REF,
|
||||
VENICE_MODEL_CATALOG,
|
||||
} from "../agents/venice-models.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import {
|
||||
OPENROUTER_DEFAULT_MODEL_REF,
|
||||
VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF,
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
MOONSHOT_DEFAULT_MODEL_REF,
|
||||
} from "./onboard-auth.models.js";
|
||||
|
||||
export function applyZaiConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyZaiConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[ZAI_DEFAULT_MODEL_REF] = {
|
||||
...models[ZAI_DEFAULT_MODEL_REF],
|
||||
@@ -57,7 +57,7 @@ export function applyZaiConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyOpenrouterProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyOpenrouterProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[OPENROUTER_DEFAULT_MODEL_REF] = {
|
||||
...models[OPENROUTER_DEFAULT_MODEL_REF],
|
||||
@@ -76,7 +76,7 @@ export function applyOpenrouterProviderConfig(cfg: MoltbotConfig): MoltbotConfig
|
||||
};
|
||||
}
|
||||
|
||||
export function applyVercelAiGatewayProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyVercelAiGatewayProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF] = {
|
||||
...models[VERCEL_AI_GATEWAY_DEFAULT_MODEL_REF],
|
||||
@@ -95,7 +95,7 @@ export function applyVercelAiGatewayProviderConfig(cfg: MoltbotConfig): MoltbotC
|
||||
};
|
||||
}
|
||||
|
||||
export function applyVercelAiGatewayConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyVercelAiGatewayConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const next = applyVercelAiGatewayProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -117,7 +117,7 @@ export function applyVercelAiGatewayConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyOpenrouterConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyOpenrouterConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const next = applyOpenrouterProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -139,7 +139,7 @@ export function applyOpenrouterConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyMoonshotProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyMoonshotProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[MOONSHOT_DEFAULT_MODEL_REF] = {
|
||||
...models[MOONSHOT_DEFAULT_MODEL_REF],
|
||||
@@ -182,7 +182,7 @@ export function applyMoonshotProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyMoonshotConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyMoonshotConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const next = applyMoonshotProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -204,7 +204,7 @@ export function applyMoonshotConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyKimiCodeProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyKimiCodeProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[KIMI_CODE_MODEL_REF] = {
|
||||
...models[KIMI_CODE_MODEL_REF],
|
||||
@@ -247,7 +247,7 @@ export function applyKimiCodeProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applyKimiCodeConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyKimiCodeConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const next = applyKimiCodeProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -269,7 +269,7 @@ export function applyKimiCodeConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
};
|
||||
}
|
||||
|
||||
export function applySyntheticProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applySyntheticProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[SYNTHETIC_DEFAULT_MODEL_REF] = {
|
||||
...models[SYNTHETIC_DEFAULT_MODEL_REF],
|
||||
@@ -316,7 +316,7 @@ export function applySyntheticProviderConfig(cfg: MoltbotConfig): MoltbotConfig
|
||||
};
|
||||
}
|
||||
|
||||
export function applySyntheticConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applySyntheticConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const next = applySyntheticProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -413,7 +413,7 @@ export function applyXiaomiConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
* Apply Venice provider configuration without changing the default model.
|
||||
* Registers Venice models and sets up the provider, but preserves existing model selection.
|
||||
*/
|
||||
export function applyVeniceProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyVeniceProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[VENICE_DEFAULT_MODEL_REF] = {
|
||||
...models[VENICE_DEFAULT_MODEL_REF],
|
||||
@@ -462,7 +462,7 @@ export function applyVeniceProviderConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
* Apply Venice provider configuration AND set Venice as the default model.
|
||||
* Use this when Venice is the primary provider choice during onboarding.
|
||||
*/
|
||||
export function applyVeniceConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
export function applyVeniceConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const next = applyVeniceProviderConfig(cfg);
|
||||
const existingModel = next.agents?.defaults?.model;
|
||||
return {
|
||||
@@ -485,7 +485,7 @@ export function applyVeniceConfig(cfg: MoltbotConfig): MoltbotConfig {
|
||||
}
|
||||
|
||||
export function applyAuthProfileConfig(
|
||||
cfg: MoltbotConfig,
|
||||
cfg: OpenClawConfig,
|
||||
params: {
|
||||
profileId: string;
|
||||
provider: string;
|
||||
@@ -493,7 +493,7 @@ export function applyAuthProfileConfig(
|
||||
email?: string;
|
||||
preferProfileFirst?: boolean;
|
||||
},
|
||||
): MoltbotConfig {
|
||||
): OpenClawConfig {
|
||||
const profiles = {
|
||||
...cfg.auth?.profiles,
|
||||
[params.profileId]: {
|
||||
|
||||
Reference in New Issue
Block a user