add ping toggle
This commit is contained in:
@@ -126,15 +126,41 @@ bb run # Send waiting notification
|
||||
Configuration is stored in `~/.iamwaiting/config.edn`:
|
||||
|
||||
```clojure
|
||||
{:webhook-url "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"}
|
||||
{:webhook-url "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"
|
||||
:user-id "123456789012345678" ; Optional: for @mentions
|
||||
:toggles {:idle-prompt true
|
||||
:permission-prompt true
|
||||
:permission-prompt-ping true}}
|
||||
```
|
||||
|
||||
You can also set the webhook URL via environment variable:
|
||||
|
||||
```bash
|
||||
export IAMWAITING_WEBHOOK_URL="https://discord.com/api/webhooks/..."
|
||||
export IAMWAITING_USER_ID="123456789012345678" # Optional
|
||||
```
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
Control which notifications you receive using toggles:
|
||||
|
||||
```bash
|
||||
# Show current toggle status
|
||||
iamwaiting toggle status
|
||||
|
||||
# Toggle notification types on/off
|
||||
iamwaiting toggle idle-prompt on|off
|
||||
iamwaiting toggle permission-prompt on|off
|
||||
|
||||
# Control @mentions on permission prompts
|
||||
iamwaiting toggle permission-prompt-ping on|off
|
||||
```
|
||||
|
||||
**Use cases:**
|
||||
- **Focus time:** Disable pings but keep notifications (`permission-prompt-ping off`)
|
||||
- **Critical only:** Only notify on permission prompts (`idle-prompt off`)
|
||||
- **Silent mode:** Disable all notifications (both toggles `off`)
|
||||
|
||||
## How It Works
|
||||
|
||||
When Claude Code is waiting for user input, the `agent-waiting-for-user` hook is triggered, which:
|
||||
@@ -149,15 +175,33 @@ The notification appears in your Discord channel with:
|
||||
- ⏳ Waiting indicator
|
||||
- 📁 Project name and path
|
||||
- 🕐 Timestamp
|
||||
- @mention (if configured and enabled for permission prompts)
|
||||
|
||||
## Example Notification
|
||||
## Example Notifications
|
||||
|
||||
**Idle prompt (standard notification):**
|
||||
```
|
||||
⏳ **Claude is waiting** in `my-project`
|
||||
📁 Path: `/home/user/repos/my-project`
|
||||
🕐 Time: 14:23:45
|
||||
```
|
||||
|
||||
**Permission prompt with ping enabled:**
|
||||
```
|
||||
<@123456789012345678> ⏳ **Claude is waiting** in `my-project`
|
||||
📁 Path: `/home/user/repos/my-project`
|
||||
🕐 Time: 14:23:45
|
||||
📢 Type: `permission_prompt`
|
||||
```
|
||||
|
||||
**Permission prompt with ping disabled:**
|
||||
```
|
||||
⏳ **Claude is waiting** in `my-project`
|
||||
📁 Path: `/home/user/repos/my-project`
|
||||
🕐 Time: 14:23:45
|
||||
📢 Type: `permission_prompt`
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**"No webhook URL configured"**
|
||||
|
||||
Reference in New Issue
Block a user