Port truncation logic from coding-agent to mom

- Add truncate.ts with 2000 lines / 50KB limits
- Update bash tool with tail truncation and temp file output
- Update read tool with head truncation and offset hints
- Remove redundant context history truncation (tools already provide actionable hints)

fixes #155
This commit is contained in:
Mario Zechner 2025-12-09 16:05:08 +01:00
parent de3fd172a9
commit 02c7f9ea51
5 changed files with 380 additions and 92 deletions

View file

@ -18,6 +18,9 @@
### Added
- Port truncation logic from coding-agent: bash and read tools now use consistent 2000 lines OR 50KB limits with actionable notices
- Remove redundant context history truncation (tools already provide truncation with actionable hints)
- Message backfill on startup (#103)
- Fetches missed messages from Slack using `conversations.history` API when mom restarts
- Backfills up to 3 pages (3000 messages) per channel since last logged timestamp