Skip to content

fix(skills): parse mixed cli json output#82

Closed
wzh4869 wants to merge 1 commit intoqingchencloud:mainfrom
wzh4869:codex/fix-skills-json-parse
Closed

fix(skills): parse mixed cli json output#82
wzh4869 wants to merge 1 commit intoqingchencloud:mainfrom
wzh4869:codex/fix-skills-json-parse

Conversation

@wzh4869
Copy link
Copy Markdown

@wzh4869 wzh4869 commented Mar 15, 2026

变更描述

修复 Web 模式下 Skills 页面解析 CLI 输出失败的问题。openclaw skills ... --json 在前后夹带 warning / update 提示时,原逻辑直接 JSON.parse 会报 trailing characters。

本次改动:

  • 为 dev-api 新增混杂输出 JSON 提取逻辑
  • skills_list / skills_info / skills_check 改为使用该逻辑
  • 新增回归测试
  • 删除已失效的 docker-tasking 残留测试
  • 在 CI 中补充 npm test

变更类型

  • Bug 修复 (fix)
  • 构建/CI 配置 (ci/build)

测试清单

  • 本地运行 npm run build 前端构建通过
  • 本地运行 cargo check Rust 编译通过
  • 在 macOS 上测试通过
  • 在 Windows 上测试通过
  • 在 Linux 上测试通过
  • 新功能已添加对应测试
  • 所有现有测试通过

相关 Issue

closes #77
closes #64

Copy link
Copy Markdown
Contributor

@1186258278 1186258278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢贡献!这个 PR 修复的 #77/#64 问题我们在 v0.9.2 中已经通过 extractCliJson 函数修复并发布了。你的实现思路和我们一致,但合并可能会产生冲突。建议:1) 如果你的实现有额外改进(比如测试用例),可以 rebase 到最新 main 后重新提交;2) 或者关闭此 PR,我们会在 release notes 中感谢你的贡献。

@wzh4869
Copy link
Copy Markdown
Author

wzh4869 commented Mar 16, 2026

收到,幸苦 review 了💗

@wzh4869 wzh4869 closed this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SKILLS页面错误 Skills 页面加载失败,提示 JSON 解析错误

2 participants