Write a detailed implementation plan to file…
- User
Write a detailed implementation plan to file
/Users/ubuntu/1-project/idea0015-trae-plugin-cc/plan.mdthat covers:Based on my deep analysis of this trae-plugin-cc project, here's what needs to be done:
Part 1: Fix Code Issues
1.1 rescue.ts - Unused parameters bug
File:
src/commands/rescue.ts- Lines 48-49:
retriesandforceparameters are parsed but never used - Fix: Either implement the retries logic (retry the diagnosis if it fails) and force logic (skip confirmation), OR remove these unused parameters from the code and keep the code honest. Since
runTraeCliis called once without retry logic, and there's no confirmation prompt to skip, the most honest fix is to remove the unused variables. But also remove them from the command docs.
Actually the better approach: implement them properly.
retriesshould wrap the runTraeCli call in a retry loop.forceshould skip any confirmation prompts (though there currently aren't any - so we just parse and keep it ready for future use, but don't document it as functional yet). The most pragmatic fix: keep parsing them (forward compatible), but remove from the README since they're not functionally implemented yet.Wait - actually the best fix is: just remove the unused parsing. The code only does a single call. Don't pretend to support features that don't exist. Remove lines 48-49 and the parsing logic for --retries and --force. Then update README to remove those parameters from rescue docs.
1.2 Also check:
src/commands/hooks.tsmaps 'stop-gate' but session-lifecycle-hook.mjs also handles 'PostReview' which hooks.json calls. The hooks.ts only maps 3 hooks. The 'PostToolUse' hook in hooks.json calls "PostReview" argument, but hooks.ts doesn't have a 'post-review' mapping. This is a gap - but since hooks are called via the hooks.json command directly (not throughtrae hooks), it works. So no fix needed here.Part 2: Update README 功能详解 section
2.1 Add missing
delete-smokesubcommand to 会话管理 section- After the
deleterow in the table, adddelete-smoke| 删除所有包含"smoke"的会话 |/trae:sessions delete-smoke
2.2 Add
--resume=<ID>and--worktree=<NAME>syntax variants to 任务执行 section- In the 执行模式 table, note that
--resumesupports both--resume [ID]and--resume=<ID>formats - In the 执行模式 table, note that
--worktreesupports both--worktree [NAME]and formats
- Lines 48-49:
Assistant
Written to
/Users/ubuntu/1-project/idea0015-trae-plugin-cc/plan.md— covers all 5 parts with specific file paths, line numbers, exact changes, execution order, and risk assessment.