@misterhuydo/sentinel 1.0.68 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.cairn/session.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"message": "Auto-checkpoint at 2026-03-22T16:
|
|
3
|
-
"checkpoint_at": "2026-03-22T16:
|
|
2
|
+
"message": "Auto-checkpoint at 2026-03-22T16:26:17.040Z",
|
|
3
|
+
"checkpoint_at": "2026-03-22T16:26:17.042Z",
|
|
4
4
|
"active_files": [],
|
|
5
5
|
"notes": [],
|
|
6
6
|
"mtime_snapshot": {}
|
package/package.json
CHANGED
|
@@ -318,9 +318,15 @@ async def _dispatch(event: dict, client, cfg_loader, store) -> None:
|
|
|
318
318
|
|
|
319
319
|
# ── Turn processor ────────────────────────────────────────────────────────────
|
|
320
320
|
|
|
321
|
+
_MAX_HISTORY_TURNS = 20 # keep last 20 exchanges (~40 messages) to stay well within context limits
|
|
322
|
+
|
|
321
323
|
async def _run_turn(session: _Session, message: str, client, cfg_loader, store) -> None:
|
|
322
324
|
channel = session.channel
|
|
323
325
|
|
|
326
|
+
# Trim history to avoid context overflow on long conversations
|
|
327
|
+
if len(session.history) > _MAX_HISTORY_TURNS * 2:
|
|
328
|
+
session.history = session.history[-(_MAX_HISTORY_TURNS * 2):]
|
|
329
|
+
|
|
324
330
|
# Typing indicator
|
|
325
331
|
await _post(client, channel, "_thinking..._")
|
|
326
332
|
|