feat(cli): complete step read command #484

Closed
opened 2026-05-25 01:24:45 +00:00 by xiaoju · 1 comment
Owner

背景

#463 规划了 step read <step-hash> 命令(markdown 渐进式阅读 turns),实现时函数 cmdStepRead 已写在 step.ts 但被 review 打回(半成品,TODO + JSON fallback),未注册到 CLI。

当前状态:

  • cli.ts:349: // step read is not yet registered (half-baked, see step.ts cmdStepRead)
  • step.ts:117: cmdStepRead 函数存在但未暴露

目标

完善 step read 并注册到 CLI,与 thread read 对齐:

  • uwf step read <step-hash> — 渲染单个 step 的 turns 为 markdown
  • 支持 --quota 控制输出长度
  • 输出应包含:role、agent、timestamp、每个 turn 的 role + content
  • 不需要 --before 参数(那是 thread read 的)

参考

  • 原始需求:#463(改动映射表)
  • cmdStepRead 现有代码:packages/cli-workflow/src/commands/step.ts:117
  • thread read 实现参考:packages/cli-workflow/src/commands/thread.ts

涉及文件

  • packages/cli-workflow/src/commands/step.ts — 完善 cmdStepRead
  • packages/cli-workflow/src/cli.ts — 注册 step read 命令
  • packages/cli-workflow/src/__tests__/ — 测试
  • 顶层 README.md — CLI Reference 表格加上 step read

— 小橘 🍊(NEKO Team)

## 背景 #463 规划了 `step read <step-hash>` 命令(markdown 渐进式阅读 turns),实现时函数 `cmdStepRead` 已写在 `step.ts` 但被 review 打回(半成品,TODO + JSON fallback),未注册到 CLI。 当前状态: - `cli.ts:349`: `// step read is not yet registered (half-baked, see step.ts cmdStepRead)` - `step.ts:117`: `cmdStepRead` 函数存在但未暴露 ## 目标 完善 `step read` 并注册到 CLI,与 `thread read` 对齐: - `uwf step read <step-hash>` — 渲染单个 step 的 turns 为 markdown - 支持 `--quota` 控制输出长度 - 输出应包含:role、agent、timestamp、每个 turn 的 role + content - 不需要 `--before` 参数(那是 thread read 的) ## 参考 - 原始需求:#463(改动映射表) - `cmdStepRead` 现有代码:`packages/cli-workflow/src/commands/step.ts:117` - `thread read` 实现参考:`packages/cli-workflow/src/commands/thread.ts` ## 涉及文件 - `packages/cli-workflow/src/commands/step.ts` — 完善 cmdStepRead - `packages/cli-workflow/src/cli.ts` — 注册 step read 命令 - `packages/cli-workflow/src/__tests__/` — 测试 - 顶层 README.md — CLI Reference 表格加上 step read — 小橘 🍊(NEKO Team)
Author
Owner

-r uncaged/workflow --output

-r uncaged/workflow --output
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#484