/** * Message splitter for messenger platforms * * Splits long messages into chunks that fit within platform limits * while preserving readability (splitting at newlines or spaces). */ /** * Default maximum message length (Discord limit) */ export declare const DEFAULT_MAX_LENGTH = 2000; /** * Options for message splitting */ export interface SplitOptions { /** Maximum length per chunk (default: 2000) */ maxLength?: number; /** Preferred split points (default: ['\n', ' ']) */ splitPoints?: string[]; /** Suffix to add to split chunks (default: none) */ chunkSuffix?: string; /** Prefix to add to continuation chunks (default: none) */ continuationPrefix?: string; } /** * Split a message into chunks that fit within the maximum length * * @param text - Text to split * @param options - Split options * @returns Array of text chunks */ export declare function splitMessage(text: string, options?: SplitOptions): string[]; /** * Split message for Discord (2000 char limit) */ export declare function splitForDiscord(text: string): string[]; /** * Split message for Slack (40000 char limit for regular messages) * Note: Slack has different limits for different contexts */ export declare function splitForSlack(text: string): string[]; /** * Estimate number of chunks a message will be split into */ export declare function estimateChunks(text: string, maxLength?: number): number; /** * Truncate text with ellipsis if too long */ export declare function truncateWithEllipsis(text: string, maxLength: number, ellipsis?: string): string; /** * Split text into code blocks if it contains code * Preserves code block formatting */ export declare function splitWithCodeBlocks(text: string, maxLength?: number): string[]; //# sourceMappingURL=message-splitter.d.ts.map