mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 02:21:25 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import path from "node:path";
|
||||
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { CONFIG_DIR } from "../utils.js";
|
||||
import { hasBinary, isConfigPathTruthy, resolveConfigPath, resolveHookConfig } from "./config.js";
|
||||
import type { HookEligibilityContext, HookEntry, HookInstallSpec } from "./types.js";
|
||||
@@ -75,7 +75,7 @@ function normalizeInstallOptions(entry: HookEntry): HookInstallOption[] {
|
||||
|
||||
if (!label) {
|
||||
if (spec.kind === "bundled") {
|
||||
label = "Bundled with Moltbot";
|
||||
label = "Bundled with OpenClaw";
|
||||
} else if (spec.kind === "npm" && spec.package) {
|
||||
label = `Install ${spec.package} (npm)`;
|
||||
} else if (spec.kind === "git" && spec.repository) {
|
||||
@@ -91,12 +91,12 @@ function normalizeInstallOptions(entry: HookEntry): HookInstallOption[] {
|
||||
|
||||
function buildHookStatus(
|
||||
entry: HookEntry,
|
||||
config?: MoltbotConfig,
|
||||
config?: OpenClawConfig,
|
||||
eligibility?: HookEligibilityContext,
|
||||
): HookStatusEntry {
|
||||
const hookKey = resolveHookKey(entry);
|
||||
const hookConfig = resolveHookConfig(config, hookKey);
|
||||
const managedByPlugin = entry.hook.source === "moltbot-plugin";
|
||||
const managedByPlugin = entry.hook.source === "openclaw-plugin";
|
||||
const disabled = managedByPlugin ? false : hookConfig?.enabled === false;
|
||||
const always = entry.metadata?.always === true;
|
||||
const emoji = entry.metadata?.emoji ?? entry.frontmatter.emoji;
|
||||
@@ -202,7 +202,7 @@ function buildHookStatus(
|
||||
export function buildWorkspaceHookStatus(
|
||||
workspaceDir: string,
|
||||
opts?: {
|
||||
config?: MoltbotConfig;
|
||||
config?: OpenClawConfig;
|
||||
managedHooksDir?: string;
|
||||
entries?: HookEntry[];
|
||||
eligibility?: HookEligibilityContext;
|
||||
|
||||
Reference in New Issue
Block a user