co-mono/packages/mom/src
David Chen 9a4fe52654
fix(mom): re-apply msg_too_long truncation logic lost in refactoring (#1776)
The truncation logic and error handling added in e1d3c2b7 (Dec 4, 2025)
was lost when message handling was refactored from slack.ts to main.ts.

Changes:
- Add try/catch to all Slack message functions (respond, replaceMessage,
  respondInThread, setTyping, setWorking)
- Truncate main messages at 35K chars (Slack limit 40K)
- Truncate thread messages at 20K chars
- Add helpful user-facing notes when truncation occurs
- Log Slack API errors as warnings instead of crashing

Fixes: msg_too_long API errors causing process crash

Co-authored-by: mom bot <mom-bot@living-bio.iam.gserviceaccount.com>
2026-03-03 17:45:06 +01:00
..
tools WIP: Major cleanup - move Attachment to consumers, simplify agent API 2025-12-30 22:42:20 +01:00
agent.ts refactor(mom): use SettingsManager with workspace storage 2026-03-02 19:41:38 +01:00
context.ts refactor(mom): use SettingsManager with workspace storage 2026-03-02 19:41:38 +01:00
download.ts Release v0.18.5 2025-12-12 10:00:57 +01:00
events.ts mom: add events system for scheduled wake-ups 2025-12-12 22:45:34 +01:00
log.ts Enable more biome lints and fix things 2025-12-21 22:56:20 +01:00
main.ts fix(mom): re-apply msg_too_long truncation logic lost in refactoring (#1776) 2026-03-03 17:45:06 +01:00
sandbox.ts mom: Docker sandbox support with --sandbox=docker:container-name option 2025-11-26 01:06:00 +01:00
slack.ts Enable more biome lints and fix things 2025-12-21 22:56:20 +01:00
store.ts Enable more biome lints and fix things 2025-12-21 22:56:20 +01:00