export { botTag, formatThreadTime } from "@rakazo/core"; export function filterBots( bots: T[], query: string, ): T[] { const needle = query.trim().toLowerCase(); if (!needle) return bots; return bots.filter((bot) => `${bot.name} ${bot.title} ${bot.preview}`.toLowerCase().includes(needle), ); } export function userInitials(name: string) { const initials = name .split(/\s+/) .filter(Boolean) .map((part) => part[0]) .join("") .slice(0, 2) .toUpperCase(); return initials || "?"; }