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

Function buildDigestLines

biko/biko.ts:470–484  ·  view source on GitHub ↗
(records: DigestRecord[])

Source from the content-addressed store, hash-verified

468 if (record.day !== currentDay) {
469 if (lines.length > 0) lines.push("");
470 currentDay = record.day;
471 lines.push(`📅 <b>${htmlEscape(record.day)}</b>`);
472 }
473 lines.push(formatDigestLine(record));
474 }
475
476 return lines;
477}
478
479function splitDigest(header: string, lines: string[]): string[] {
480 const continuationHeader = "📦 <b>Biko 消息整理</b>(续)\n\n";
481 const parts: string[] = [];
482 let current = header;
483
484 for (const line of lines) {
485 const separator = current.endsWith("\n\n") ? "" : "\n";
486 if ((current + separator + line).length > MAX_CHUNK_LENGTH) {
487 parts.push(current);

Callers 1

BikoPluginClass · 0.85

Calls 2

formatDigestLineFunction · 0.85
htmlEscapeFunction · 0.70

Tested by

no test coverage detected