fix(ui): fix web UI after tsdown migration and typing changes

This commit is contained in:
Gustavo Madeira Santana
2026-02-03 13:56:20 -05:00
parent 1c4db91593
commit 5935c4d23d
24 changed files with 499 additions and 43 deletions

View File

@@ -0,0 +1,24 @@
import { loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
import { resolveBundledSkillsDir, type BundledSkillsResolveOptions } from "./bundled-dir.js";
export type BundledSkillsContext = {
dir?: string;
names: Set<string>;
};
export function resolveBundledSkillsContext(
opts: BundledSkillsResolveOptions = {},
): BundledSkillsContext {
const dir = resolveBundledSkillsDir(opts);
const names = new Set<string>();
if (!dir) {
return { dir, names };
}
const result = loadSkillsFromDir({ dir, source: "openclaw-bundled" });
for (const skill of result.skills) {
if (skill.name.trim()) {
names.add(skill.name);
}
}
return { dir, names };
}