MCPcopy Create free account
hub / github.com/codeaashu/claude-code / estimateMessageHeight

Function estimateMessageHeight

web/components/chat/VirtualMessageList.tsx:18–30  ·  view source on GitHub ↗
(message: Message)

Source from the content-addressed store, hash-verified

16};
17
18function estimateMessageHeight(message: Message): number {
19 const text =
20 typeof message.content === "string"
21 ? message.content
22 : message.content
23 .filter((b): b is { type: "text"; text: string } => b.type === "text")
24 .map((b) => b.text)
25 .join("");
26
27 if (text.length < 100) return ESTIMATED_HEIGHT.short;
28 if (text.length < 500 || text.includes("```")) return ESTIMATED_HEIGHT.medium;
29 return ESTIMATED_HEIGHT.tall;
30}
31
32interface VirtualMessageListProps {
33 messages: Message[];

Callers 1

VirtualMessageListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected