mirror of
https://github.com/stablyai/orca.git
synced 2026-11-04 11:07:42 +00:00
13 lines
502 B
TypeScript
13 lines
502 B
TypeScript
export const NATIVE_CHAT_USER_MESSAGE_MAX_UNFOLDED_LINES = 8
|
|
const MAX_UNFOLDED_LENGTH = 600
|
|
/** Tailwind's `max-h-44`, which the folded bubble is clipped to. */
|
|
export const NATIVE_CHAT_USER_MESSAGE_FOLDED_PX = 176
|
|
|
|
// Decided from the text alone, so the row's first layout is already its folded one.
|
|
export function nativeChatUserMessageFolds(text: string): boolean {
|
|
return (
|
|
text.length > MAX_UNFOLDED_LENGTH ||
|
|
text.split('\n').length > NATIVE_CHAT_USER_MESSAGE_MAX_UNFOLDED_LINES
|
|
)
|
|
}
|