MCPcopy
hub / github.com/infinitered/reactotron / genericPreview

Function genericPreview

lib/reactotron-mcp/src/serialization.ts:59–64  ·  view source on GitHub ↗

Generic short preview of a payload.

(payload: any)

Source from the content-addressed store, hash-verified

57
58/** Generic short preview of a payload. */
59function genericPreview(payload: any): string {
60 if (payload == null) return ""
61 const text = compactJson(payload)
62 if (text.length <= MAX_PAYLOAD_PREVIEW_CHARS) return text
63 return text.slice(0, MAX_PAYLOAD_PREVIEW_CHARS) + "..."
64}
65
66/**
67 * Summarize a Command for timeline overview: keeps metadata fields,

Callers 1

summarizeCommandFunction · 0.85

Calls 1

compactJsonFunction · 0.85

Tested by

no test coverage detected