feat(cli-uwf): thread read Content + step-details — #357 #358
Reference in New Issue
Block a user
Delete Branch "feat/357-thread-read-content"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
thread read: add### Contentsection showing agent's markdown body before### Output--detailflaguwf thread step-details <step-hash>— dumps full detail (turns, tool calls) as yamlWhy
Agent now outputs frontmatter markdown with both content body and meta.
thread readshould show both. Old--detailwas unreadable; replaced with dedicatedstep-detailscommand for debugging.Changes
cli-uwf/src/commands/thread.ts—extractLastAssistantContent(), updatedformatThreadReadMarkdown, newcmdThreadStepDetailscli-uwf/src/cli.ts— registerstep-detailssubcommand, remove--detailoptioncli-uwf/src/__tests__/thread.test.ts— 9 testsRef
Closes #357
LGTM ✅
总结: thread read 现在展示 Content(agent body)+ Output(meta),
--detail拆成独立step-details命令,职责更清晰。亮点:
extractLastAssistantContent— 从 detail turns 倒序找最后一条非空 assistant content,边界处理完善(缺失 node、空 turns、whitespace-only)step-details用expandDeep递归展开 CAS refs,YAML 输出适合调试合并 🚀