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: add configurable truncation direction for notification messages
Messages exceeding service limits can now be truncated from the beginning
or end, controlled via `truncateFrom` ("end" default, "start" keeps the
conclusion). Configurable globally and per-service, with `...` indicator.
Copy file name to clipboardExpand all lines: README.md
+42-1Lines changed: 42 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ In long-running development tasks or deep research sessions, it's common to swit
27
27
- ✅ **Privacy & Control**: Completely opt-in; no notifications are sent until you enable and configure a service.
28
28
- ✅ **Event Filtering**: Selectively enable or disable notifications for specific event types.
29
29
- ✅ **Rich Content**: Notifications include the actual assistant response text for better context.
30
+
- ✅ **Truncation Direction**: Choose whether to keep the beginning or end of long messages when they exceed service limits.
30
31
31
32
## Installation
32
33
@@ -117,7 +118,8 @@ Create your `.everynotify.json` with the tokens for the services you want to use
117
118
"error": true,
118
119
"permission": false,
119
120
"question": true
120
-
}
121
+
},
122
+
"truncateFrom": "end"
121
123
}
122
124
```
123
125
@@ -135,6 +137,41 @@ You can control which events trigger notifications by adding an `events` block t
135
137
|`permission`| opencode is waiting for you to grant permission for a tool or file access. |
136
138
|`question`| The `question` tool was used to ask you for clarification. |
137
139
140
+
### Message Truncation
141
+
142
+
Each notification service has a maximum message length (e.g., Pushover: 1024 chars, Discord: 2000 chars). When a message exceeds the limit, EveryNotify truncates it and adds `...` as an indicator.
143
+
144
+
The `truncateFrom` option controls which part of the message is kept:
|`"end"`| Keep beginning, trim end (default) | When the start of the message has the context |
149
+
|`"start"`| Keep end, trim beginning | When the conclusion/result at the end matters |
150
+
151
+
**Global setting** applies to all services:
152
+
153
+
```json
154
+
{
155
+
"truncateFrom": "start"
156
+
}
157
+
```
158
+
159
+
**Per-service override** — for example, keep message endings on Pushover but beginnings on Slack:
160
+
161
+
```json
162
+
{
163
+
"truncateFrom": "end",
164
+
"pushover": {
165
+
"enabled": true,
166
+
"token": "...",
167
+
"userKey": "...",
168
+
"truncateFrom": "start"
169
+
}
170
+
}
171
+
```
172
+
173
+
Service-level `truncateFrom` takes priority over the global setting.
174
+
138
175
### Rich Message Content
139
176
140
177
EveryNotify provides rich context in its notifications by extracting the assistant's last response. Instead of generic "Task completed" messages, you receive the actual summary or answer provided by opencode.
@@ -227,6 +264,10 @@ For Pushover users, you can customize the `priority` level:
See [Message Truncation](#message-truncation) under Configuration Options for details on the `truncateFrom` setting. This is especially useful for services with tight message limits like Pushover (1024 chars), where the end of a message often contains the most important information (the result or conclusion).
270
+
230
271
### Session Enrichment
231
272
232
273
EveryNotify automatically calculates the time elapsed since the first user message in a session. This duration is included in the notification text to give you context on how long the task took to complete.
0 commit comments