You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: require --yes on msg/comment delete and thread/conversation done (#9)
* feat: require --yes for destructive msg/comment delete and thread/conversation done
Ports Doist/twist-cli#190. Extends the existing `tdc thread delete` `--yes`
confirmation pattern to the remaining destructive/state-changing commands:
`tdc msg delete`, `tdc comment delete`, `tdc thread done`, and
`tdc conversation done`.
Without `--yes`, each command prints a preview and exits without mutating.
With `--json` and no `--yes`, it rejects with `MISSING_YES_FLAG`. `--dry-run`
still short-circuits before the `--yes` gate.
Motivation: agents replay/retry commands more freely than humans;
idempotent archive operations produce no error signal on repeat, and deletes
can silently run twice. Requiring `--yes` makes mutation intent explicit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor: address review feedback on --yes gate
- Move `yes?: boolean` into the shared `MutationOptions` type so each
destructive command no longer redefines it locally.
- Reorder `conversation done` to fetch the conversation before the gate
so invalid refs surface a proper error instead of `MISSING_YES_FLAG`.
- Move the `comment delete` and `msg delete` gates to the very top
(before any remote calls) so previews don't trigger fetches or
validation API calls.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments