MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / splitMessage

Method splitMessage

src/runtime/adapters/slack.ts:469–490  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

467 }
468
469 private splitMessage(text: string): string[] {
470 if (this.isSlackMessageWithinLimit(text)) {
471 return [text];
472 }
473
474 const chunks: string[] = [];
475 let remaining = text;
476
477 while (remaining.length > 0) {
478 if (this.isSlackMessageWithinLimit(remaining)) {
479 chunks.push(remaining);
480 break;
481 }
482
483 let splitAt = this.findSlackSafeSplitPoint(remaining);
484
485 chunks.push(remaining.slice(0, splitAt));
486 remaining = remaining.slice(splitAt).trimStart();
487 }
488
489 return chunks;
490 }
491
492 private async sendLongMessage(
493 client: any,

Callers 1

sendLongMessageMethod · 0.95

Calls 2

Tested by

no test coverage detected