MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / buildLogDescription

Function buildLogDescription

src/utils/logEmbeds.js:26–42  ·  view source on GitHub ↗
({ headline, lines = [], quoted = false, meta = [] } = {})

Source from the content-addressed store, hash-verified

24}
25
26export function buildLogDescription({ headline, lines = [], quoted = false, meta = [] } = {}) {
27 const parts = [];
28
29 if (headline) {
30 parts.push(headline);
31 }
32
33 if (lines.length > 0) {
34 parts.push(quoted ? buildQuotedBlock(lines) : lines.join('\n'));
35 }
36
37 if (meta.length > 0) {
38 parts.push(formatMetaLine(meta));
39 }
40
41 return parts.join('\n\n').slice(0, 4096);
42}
43
44export function fieldsToLines(fields = []) {
45 return fields.map((field) => formatLogLine(stripFieldLabel(field.name), field.value));

Callers 1

createLogEmbedFunction · 0.90

Calls 2

buildQuotedBlockFunction · 0.85
formatMetaLineFunction · 0.85

Tested by

no test coverage detected