refactor: normalize cli command hints
This commit is contained in:
@@ -10,6 +10,7 @@ import { loadConfig } from "../config/config.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import { formatDocsLink } from "../terminal/links.js";
|
||||
import { theme } from "../terminal/theme.js";
|
||||
import { formatCliCommand } from "./command-format.js";
|
||||
|
||||
export type SkillsListOptions = {
|
||||
json?: boolean;
|
||||
@@ -101,7 +102,7 @@ export function formatSkillsList(report: SkillStatusReport, opts: SkillsListOpti
|
||||
|
||||
if (skills.length === 0) {
|
||||
const message = opts.eligible
|
||||
? "No eligible skills found. Run `clawdbot skills list` to see all skills."
|
||||
? `No eligible skills found. Run \`${formatCliCommand("clawdbot skills list")}\` to see all skills.`
|
||||
: "No skills found.";
|
||||
return appendClawdHubHint(message, opts.json);
|
||||
}
|
||||
@@ -148,7 +149,7 @@ export function formatSkillInfo(
|
||||
return JSON.stringify({ error: "not found", skill: skillName }, null, 2);
|
||||
}
|
||||
return appendClawdHubHint(
|
||||
`Skill "${skillName}" not found. Run \`clawdbot skills list\` to see available skills.`,
|
||||
`Skill "${skillName}" not found. Run \`${formatCliCommand("clawdbot skills list")}\` to see available skills.`,
|
||||
opts.json,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user