mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 08:52:21 +00:00
fix(skill-install): use openclaw-compatible slug
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
- Moderation: stop treating generic webhook integration docs as suspicious unless they include explicit Discord or Slack webhook endpoints (#1716) (thanks @langningchen-openclaw).
|
||||
- Search: preserve vector scores across candidate expansion and require all query tokens to match exact-token filters so relevant skills are not crowded out (#1759, #1762) (thanks @LinPower).
|
||||
- Stats maintenance: keep skill stat migration fields synchronized by treating top-level stat fields as canonical during backfill/reconcile fallback reads (#1704) (thanks @momothemage).
|
||||
- Skill install: render OpenClaw CLI commands with the bare slug that the current CLI accepts (#1807).
|
||||
- Skills: keep historical tags out of public skill detail surfaces while preserving manager visibility (#1804) (thanks @deepujain).
|
||||
- Skills moderation: keep hash-based scanner callbacks from overwriting skill-level moderation for older versions (#1805) (thanks @deepujain).
|
||||
- Skills: prevent backport publishes from clobbering `latest` state and guard malformed persisted latest semver values during publish comparisons (#1832) (thanks @momothemage).
|
||||
|
||||
@@ -83,7 +83,7 @@ export function SkillInstallSurface({
|
||||
|
||||
const selectedPrompt = PROMPT_OPTIONS.find((option) => option.mode === promptMode) ?? PROMPT_OPTIONS[1];
|
||||
const installTarget = buildSkillInstallTarget(ownerHandle, ownerId, slug);
|
||||
const openClawCommand = formatOpenClawInstallCommand(ownerHandle, ownerId, slug);
|
||||
const openClawCommand = formatOpenClawInstallCommand(slug);
|
||||
const clawHubCommand = formatClawHubInstallCommand(slug, packageManager);
|
||||
const promptPreview = formatOpenClawPrompt({
|
||||
mode: promptMode,
|
||||
@@ -188,7 +188,7 @@ export function SkillInstallSurface({
|
||||
<div className="skill-install-command-header">
|
||||
<div className="skill-install-command-copy">
|
||||
<p className="skill-install-command-label">OpenClaw CLI</p>
|
||||
<p className="skill-install-command-caption">Canonical install target</p>
|
||||
<p className="skill-install-command-caption">Bare skill slug</p>
|
||||
</div>
|
||||
<InstallCopyButton
|
||||
text={openClawCommand}
|
||||
|
||||
@@ -22,9 +22,7 @@ describe("skill detail install helpers", () => {
|
||||
});
|
||||
|
||||
it("formats the OpenClaw and ClawHub commands", () => {
|
||||
expect(formatOpenClawInstallCommand("steipete", ownerPublisherId, "weather")).toBe(
|
||||
"openclaw skills install steipete/weather",
|
||||
);
|
||||
expect(formatOpenClawInstallCommand("weather")).toBe("openclaw skills install weather");
|
||||
expect(formatClawHubInstallCommand("weather", "npm")).toBe("npx clawhub@latest install weather");
|
||||
expect(formatClawHubInstallCommand("weather", "pnpm")).toBe(
|
||||
"pnpm dlx clawhub@latest install weather",
|
||||
|
||||
@@ -194,12 +194,8 @@ export function buildSkillPageUrl(
|
||||
return new URL(path, getClawHubSiteUrl()).toString();
|
||||
}
|
||||
|
||||
export function formatOpenClawInstallCommand(
|
||||
ownerHandle: string | null,
|
||||
ownerId: SkillOwnerId | null,
|
||||
slug: string,
|
||||
) {
|
||||
return `openclaw skills install ${buildSkillInstallTarget(ownerHandle, ownerId, slug)}`;
|
||||
export function formatOpenClawInstallCommand(slug: string) {
|
||||
return `openclaw skills install ${slug}`;
|
||||
}
|
||||
|
||||
export function formatClawHubInstallCommand(slug: string, pm: SkillPackageManager) {
|
||||
|
||||
Reference in New Issue
Block a user