The 3s gate was too tight — users reading the prompt and retyping
consistently blow past it and get stuck in a loop ("press /clear
again within 3s" forever). Fixes:
- bump CONFIRM_WINDOW_MS 3_000 → 30_000
- drop the time number from the confirmation message to remove the
pressure vibe: "press /clear again to confirm — starts a new session"
- reset the gate from createSlashHandler whenever any non-destructive
slash command runs, so stale arming from 20s ago can't silently
turn the next /clear into an unintended confirm
- export the gate + isDestructiveCommand helper for that wiring
- add armed() introspection method
Follow-up to #4069 /
|
||
|---|---|---|
| .. | ||
| asCommandDispatch.test.ts | ||
| constants.test.ts | ||
| createGatewayEventHandler.test.ts | ||
| createSlashHandler.test.ts | ||
| destructive.test.ts | ||
| messages.test.ts | ||
| paths.test.ts | ||
| providers.test.ts | ||
| reasoning.test.ts | ||
| rpc.test.ts | ||
| syntax.test.ts | ||
| text.test.ts | ||
| theme.test.ts | ||
| useConfigSync.test.ts | ||