1/**
2 * Returns a shortened preview of the provided content capped at the given length.
3 * Appends an ellipsis when the content exceeds the maximum.
4 */
5export function getPreviewText(content: string, max = 150): string {
6 return content.length > max ? content.slice(0, max) + '...' : content;
7}