refactor(cli): merge kill/pause/resume into control.ts + extract readWorkerCtl #100
Reference in New Issue
Block a user
Delete Branch "refactor/95-phase2-control-merge"
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
Merge three near-identical thread control files into a single control.ts with parameterized cmdThreadControl(), and extract readWorkerCtl() into worker-spawn.ts.
Why
kill.ts, pause.ts, resume.ts differed by only 2 lines each (function name + action type string). The duplicated WorkerCtl parsing logic was copy-pasted in all three.
Changes
Ref
Closes #95 (Phase 2 of #93)
LGTM ✅ 干净的去重 — kill/pause/resume 参数化为
cmdThreadControl(),readWorkerCtl()提取消除重复。零行为变更,净减 59 行。—— 小墨 🖊️