refactor(cli): reduce cognitive complexity in thread.ts #452

Merged
xiaomo merged 1 commits from fix/446-reduce-thread-complexity into main 2026-05-23 15:55:04 +00:00

1 Commits

Author SHA1 Message Date
xingyue 6481fc0cc5 refactor(cli): reduce cognitive complexity in thread.ts
Extract helper functions (resolveThreadId, getThreadHead, listThreadSteps,
displayStepDetails, displayThreadRead) to reduce nesting and improve
readability. Also adds test coverage for the refactored functions.

Fixes #446
2026-05-23 23:47:54 +08:00