feat(cli-uwf): thread read Content + step-details — #357 #358

Merged
xiaomo merged 1 commits from feat/357-thread-read-content into main 2026-05-19 06:58:25 +00:00
Owner

What

  • thread read: add ### Content section showing agent's markdown body before ### Output
  • Remove --detail flag
  • New command: uwf thread step-details <step-hash> — dumps full detail (turns, tool calls) as yaml

Why

Agent now outputs frontmatter markdown with both content body and meta. thread read should show both. Old --detail was unreadable; replaced with dedicated step-details command for debugging.

Changes

  • cli-uwf/src/commands/thread.tsextractLastAssistantContent(), updated formatThreadReadMarkdown, new cmdThreadStepDetails
  • cli-uwf/src/cli.ts — register step-details subcommand, remove --detail option
  • cli-uwf/src/__tests__/thread.test.ts — 9 tests

Ref

Closes #357

## What - `thread read`: add `### Content` section showing agent's markdown body before `### Output` - Remove `--detail` flag - New command: `uwf thread step-details <step-hash>` — dumps full detail (turns, tool calls) as yaml ## Why Agent now outputs frontmatter markdown with both content body and meta. `thread read` should show both. Old `--detail` was unreadable; replaced with dedicated `step-details` command for debugging. ## Changes - `cli-uwf/src/commands/thread.ts` — `extractLastAssistantContent()`, updated `formatThreadReadMarkdown`, new `cmdThreadStepDetails` - `cli-uwf/src/cli.ts` — register `step-details` subcommand, remove `--detail` option - `cli-uwf/src/__tests__/thread.test.ts` — 9 tests ## Ref Closes #357
xiaoju added 1 commit 2026-05-19 06:44:58 +00:00
- thread read: add ### Content section (last assistant message) before ### Output
- Remove --detail flag (replaced by step-details command)
- New: uwf thread step-details <step-hash> — full detail dump as yaml

Closes #357
xiaomo approved these changes 2026-05-19 06:58:24 +00:00
xiaomo left a comment
Owner

LGTM

总结: thread read 现在展示 Content(agent body)+ Output(meta),--detail 拆成独立 step-details 命令,职责更清晰。

亮点:

  • extractLastAssistantContent — 从 detail turns 倒序找最后一条非空 assistant content,边界处理完善(缺失 node、空 turns、whitespace-only)
  • Content 在 Output 之前展示,阅读顺序自然
  • step-detailsexpandDeep 递归展开 CAS refs,YAML 输出适合调试
  • 测试从 bun test 迁到 vitest,与 monorepo 统一
  • import 排序和格式化的 cleanup 顺手做了,不影响逻辑
  • 9 个测试覆盖了核心路径和边界

合并 🚀

LGTM ✅ **总结:** thread read 现在展示 Content(agent body)+ Output(meta),`--detail` 拆成独立 `step-details` 命令,职责更清晰。 **亮点:** - `extractLastAssistantContent` — 从 detail turns 倒序找最后一条非空 assistant content,边界处理完善(缺失 node、空 turns、whitespace-only) - Content 在 Output 之前展示,阅读顺序自然 - `step-details` 用 `expandDeep` 递归展开 CAS refs,YAML 输出适合调试 - 测试从 bun test 迁到 vitest,与 monorepo 统一 - import 排序和格式化的 cleanup 顺手做了,不影响逻辑 - 9 个测试覆盖了核心路径和边界 合并 🚀
xiaomo merged commit 2a3a40b9d9 into main 2026-05-19 06:58:25 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#358