MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / clampForPlatform

Function clampForPlatform

src/schedule/delivery.ts:57–60  ·  view source on GitHub ↗
(text: string, platform: DeliveryTarget['platform'])

Source from the content-addressed store, hash-verified

55
56/** Hard-truncate to a platform's message limit, keeping the head (the verdict lives there). PURE. */
57export function clampForPlatform(text: string, platform: DeliveryTarget['platform']): string {
58 const max = MAX_LEN[platform];
59 return text.length <= max ? text : text.slice(0, max - 1) + '…';
60}
61
62/**
63 * Send `text` to a parsed target. Best-effort: loads ~/.qodex/.env so tokens are present

Callers 3

bot-slack.test.tsFile · 0.90
deliverRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected