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(notify): pass STATUS, FAIL_REASON, BODY as env vars to notify hook
- Add NotifyContext type with status, failReason, body fields
- buildNotifyEnv injects STATUS, FAIL_REASON, BODY when provided
- maybeNotifyTaskCompletion extracts last assistant message as BODY
- launchNotifyScript accepts optional context parameter
- Add unit tests for new context env var injection
- Update docs with env variable table and iTerm2/macOS notify examples
Copy file name to clipboardExpand all lines: docs/configuration_en.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,12 +67,45 @@ When thinking mode is enabled, controls the depth of the model’s reasoning:
67
67
68
68
Set a full path to a shell script. When the AI assistant finishes a round of tasks, the script is executed automatically, which can be used to send notifications (e.g., a Slack message).
69
69
70
+
The following context is injected as environment variables when the notify script runs:
71
+
72
+
| Variable | Description |
73
+
|----------|-------------|
74
+
|`DURATION`| Session duration in seconds (integer) |
75
+
|`STATUS`| Session status: `"completed"` or `"failed"`|
76
+
|`FAIL_REASON`| Failure reason (only set on failure) |
77
+
|`BODY`| The text content of the last AI assistant reply |
78
+
70
79
```json
71
80
{
72
81
"notify": "/path/to/slack-notify.sh"
73
82
}
74
83
```
75
84
85
+
**iTerm2 Notification Example**:
86
+
87
+
On iTerm2 you can use the OSC 9 escape sequence for native notifications. Create a script (e.g., `~/.deepcode/notify.sh`):
0 commit comments