simplify setup diagnostics to single event
One setup_complete event at the end, not per-skill events. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,26 +10,21 @@ npx tsx scripts/send-diagnostics.ts --event setup_complete --success --data '{}'
|
||||
|
||||
If no output, the user opted out permanently — stop here.
|
||||
|
||||
## 2. Prepare events
|
||||
|
||||
For each channel skill invoked during setup (e.g. `/add-telegram`), prepare a `skill_applied` event. Then prepare a `setup_complete` event for setup itself.
|
||||
|
||||
Run `--dry-run` for each to get the final payload:
|
||||
## 2. Dry run
|
||||
|
||||
```bash
|
||||
npx tsx scripts/send-diagnostics.ts --event skill_applied --success --data '{"skill_name":"add-telegram","is_upstream_skill":true,"conflict_files":[],"error_count":0}' --dry-run
|
||||
npx tsx scripts/send-diagnostics.ts --event setup_complete --success --data '{"channels_selected":["telegram"],"error_count":0,"failed_step":null,"exit_code":null}' --dry-run
|
||||
```
|
||||
|
||||
Use `--failure` instead of `--success` if that step failed. Fill in the values based on what actually happened during the session.
|
||||
Use `--failure` instead of `--success` if setup failed. Fill in the values based on what happened during the session.
|
||||
|
||||
## 3. Ask the user
|
||||
|
||||
Show all payloads and ask once:
|
||||
Show the payload and ask:
|
||||
|
||||
> "Would you like to send anonymous diagnostics to help improve NanoClaw? Here's exactly what would be sent:"
|
||||
>
|
||||
> (show JSON payloads)
|
||||
> (show JSON payload)
|
||||
>
|
||||
> **Yes** / **No** / **Never ask again**
|
||||
|
||||
@@ -37,6 +32,6 @@ Use AskUserQuestion.
|
||||
|
||||
## 4. Handle response
|
||||
|
||||
- **Yes**: Run each command again without `--dry-run`. Confirm: "Diagnostics sent."
|
||||
- **Yes**: Run the command again without `--dry-run`. Confirm: "Diagnostics sent."
|
||||
- **No**: Do nothing.
|
||||
- **Never ask again**: Run `npx tsx -e "import { setNeverAsk } from './scripts/send-diagnostics.ts'; setNeverAsk();"` — confirm: "Got it — you won't be asked again."
|
||||
|
||||
Reference in New Issue
Block a user