mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 04:02:53 +00:00
fix: show skill proposal support files on inspect
This commit is contained in:
@@ -192,6 +192,14 @@ function formatSkillProposalList(manifest: SkillProposalManifest): string {
|
||||
|
||||
function formatSkillProposalInspect(read: SkillProposalReadResult): string {
|
||||
const { record } = read;
|
||||
const supportFiles =
|
||||
read.supportFiles && read.supportFiles.length > 0
|
||||
? [
|
||||
"",
|
||||
"Support files:",
|
||||
...read.supportFiles.flatMap((file) => ["", `--- ${file.path} ---`, file.content]),
|
||||
]
|
||||
: [];
|
||||
return [
|
||||
`ID: ${record.id}`,
|
||||
`Status: ${record.status}`,
|
||||
@@ -202,6 +210,7 @@ function formatSkillProposalInspect(read: SkillProposalReadResult): string {
|
||||
record.statusReason ? `Reason: ${record.statusReason}` : undefined,
|
||||
"",
|
||||
read.content,
|
||||
...supportFiles,
|
||||
]
|
||||
.filter((line) => line !== undefined)
|
||||
.join("\n");
|
||||
|
||||
@@ -139,6 +139,8 @@ describe("skills workshop cli", () => {
|
||||
|
||||
await runCommand(["skills", "workshop", "inspect", proposalId!]);
|
||||
expect(mocks.runtimeStdout.at(-1)).toContain("status: proposal");
|
||||
expect(mocks.runtimeStdout.at(-1)).toContain("--- references/weather.md ---");
|
||||
expect(mocks.runtimeStdout.at(-1)).toContain("Use current conditions before recommendations.");
|
||||
|
||||
const revisedPath = path.join(mocks.workspaceDir, "revised-proposal.md");
|
||||
await fs.writeFile(
|
||||
|
||||
Reference in New Issue
Block a user