docs: document DM history limits (#883)
Thanks @pkrmf. Co-authored-by: Marc Terns <tenxurz@gmail.com>
This commit is contained in:
@@ -479,6 +479,30 @@ Group messages default to **require mention** (either metadata mention or regex
|
||||
|
||||
`messages.groupChat.historyLimit` sets the global default for group history context. Channels can override with `channels.<channel>.historyLimit` (or `channels.<channel>.accounts.*.historyLimit` for multi-account). Set `0` to disable history wrapping.
|
||||
|
||||
#### DM history limits
|
||||
|
||||
DM conversations use session-based history managed by the agent. You can limit the number of user turns retained per DM session:
|
||||
|
||||
```json5
|
||||
{
|
||||
channels: {
|
||||
telegram: {
|
||||
dmHistoryLimit: 30, // limit DM sessions to 30 user turns
|
||||
dms: {
|
||||
"123456789": { historyLimit: 50 } // per-user override (user ID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Resolution order:
|
||||
1. Per-DM override: `channels.<provider>.dms[userId].historyLimit`
|
||||
2. Provider default: `channels.<provider>.dmHistoryLimit`
|
||||
3. No limit (all history retained)
|
||||
|
||||
Supported providers: `telegram`, `whatsapp`, `discord`, `slack`, `signal`, `imessage`, `msteams`.
|
||||
|
||||
Per-agent override (takes precedence when set, even `[]`):
|
||||
```json5
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user