mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 19:31:24 +00:00
fix(skills): warn when bundled dir missing
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
|
||||
import { createSubsystemLogger } from "../../logging/subsystem.js";
|
||||
import { resolveBundledSkillsDir, type BundledSkillsResolveOptions } from "./bundled-dir.js";
|
||||
|
||||
const skillsLogger = createSubsystemLogger("skills");
|
||||
let hasWarnedMissingBundledDir = false;
|
||||
|
||||
export type BundledSkillsContext = {
|
||||
dir?: string;
|
||||
names: Set<string>;
|
||||
@@ -12,6 +16,12 @@ export function resolveBundledSkillsContext(
|
||||
const dir = resolveBundledSkillsDir(opts);
|
||||
const names = new Set<string>();
|
||||
if (!dir) {
|
||||
if (!hasWarnedMissingBundledDir) {
|
||||
hasWarnedMissingBundledDir = true;
|
||||
skillsLogger.warn(
|
||||
"Bundled skills directory could not be resolved; built-in skills may be missing.",
|
||||
);
|
||||
}
|
||||
return { dir, names };
|
||||
}
|
||||
const result = loadSkillsFromDir({ dir, source: "openclaw-bundled" });
|
||||
|
||||
Reference in New Issue
Block a user