MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getTextAfterTokens

Function getTextAfterTokens

admin_board/admin_board.ts:134–146  ·  view source on GitHub ↗
(text: string, count: number)

Source from the content-addressed store, hash-verified

132 )
133 .trim();
134}
135
136function splitLongText(text: string, maxLength = MAX_MESSAGE_LENGTH): string[] {
137 if (text.length <= maxLength) return [text];
138
139 const chunks: string[] = [];
140 const lines = text.split("\n");
141 let current = "";
142
143 for (const line of lines) {
144 const next = current ? `${current}\n${line}` : line;
145 if (next.length <= maxLength) {
146 current = next;
147 continue;
148 }
149

Callers 4

handleSeatActionFunction · 0.85
handleClearCacheActionFunction · 0.85
handleTrimActionFunction · 0.85
AdminBoardPluginClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected