MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / contentBlocksPreviewText

Function contentBlocksPreviewText

packages/kilo-chat/src/utils.ts:125–136  ·  view source on GitHub ↗
(content: Array<PreviewBlock>)

Source from the content-addressed store, hash-verified

123 * `contentBlocksPreviewText` returns.
124 */
125export type AttachmentPreviewLabel =
126 | { kind: 'filename'; filename: string }
127 | { kind: 'image' }
128 | { kind: 'attachment' };
129
130export function contentBlocksAttachmentPreviewLabels(
131 content: Array<PreviewBlock>
132): AttachmentPreviewLabel[] {
133 return content
134 .filter(
135 (b): b is { type: 'attachment'; filename?: string; mimeType?: string } =>
136 b.type === 'attachment'
137 )
138 .map(a =>
139 a.filename

Callers 5

utils.test.tsFile · 0.90
getReplyPreviewTextFunction · 0.90
ReplyPreviewFunction · 0.90
getReplyPreviewTextFunction · 0.90

Calls 2

joinMethod · 0.80
contentBlocksToTextFunction · 0.70

Tested by

no test coverage detected