mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 01:54:32 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { installSkill } from "../agents/skills-install.js";
|
||||
import { buildWorkspaceSkillStatus } from "../agents/skills-status.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import type { WizardPrompter } from "../wizard/prompts.js";
|
||||
import { detectBinary, resolveNodeManagerOptions } from "./onboard-helpers.js";
|
||||
@@ -26,10 +26,10 @@ function formatSkillHint(skill: {
|
||||
}
|
||||
|
||||
function upsertSkillEntry(
|
||||
cfg: MoltbotConfig,
|
||||
cfg: OpenClawConfig,
|
||||
skillKey: string,
|
||||
patch: { apiKey?: string },
|
||||
): MoltbotConfig {
|
||||
): OpenClawConfig {
|
||||
const entries = { ...cfg.skills?.entries };
|
||||
const existing = (entries[skillKey] as { apiKey?: string } | undefined) ?? {};
|
||||
entries[skillKey] = { ...existing, ...patch };
|
||||
@@ -43,11 +43,11 @@ function upsertSkillEntry(
|
||||
}
|
||||
|
||||
export async function setupSkills(
|
||||
cfg: MoltbotConfig,
|
||||
cfg: OpenClawConfig,
|
||||
workspaceDir: string,
|
||||
runtime: RuntimeEnv,
|
||||
prompter: WizardPrompter,
|
||||
): Promise<MoltbotConfig> {
|
||||
): Promise<OpenClawConfig> {
|
||||
const report = buildWorkspaceSkillStatus(workspaceDir, { config: cfg });
|
||||
const eligible = report.skills.filter((s) => s.eligible);
|
||||
const missing = report.skills.filter((s) => !s.eligible && !s.disabled && !s.blockedByAllowlist);
|
||||
@@ -101,7 +101,7 @@ export async function setupSkills(
|
||||
options: resolveNodeManagerOptions(),
|
||||
})) as "npm" | "pnpm" | "bun";
|
||||
|
||||
let next: MoltbotConfig = {
|
||||
let next: OpenClawConfig = {
|
||||
...cfg,
|
||||
skills: {
|
||||
...cfg.skills,
|
||||
@@ -154,9 +154,9 @@ export async function setupSkills(
|
||||
if (result.stderr) runtime.log(result.stderr.trim());
|
||||
else if (result.stdout) runtime.log(result.stdout.trim());
|
||||
runtime.log(
|
||||
`Tip: run \`${formatCliCommand("moltbot doctor")}\` to review skills + requirements.`,
|
||||
`Tip: run \`${formatCliCommand("openclaw doctor")}\` to review skills + requirements.`,
|
||||
);
|
||||
runtime.log("Docs: https://docs.molt.bot/skills");
|
||||
runtime.log("Docs: https://docs.openclaw.ai/skills");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user