export function isCacheableRemoteChatMediaUrl(url: string): boolean {
  return url.startsWith("http://") || url.startsWith("https://");
}

export function normalizeChatImageSource(url: string): string {
  if (
    url.startsWith("data:") ||
    url.startsWith("http") ||
    url.startsWith("blob:")
  ) {
    return url;
  }
  return `data:image/png;base64,${url}`;
}

export function isBrowserLocalChatImageSource(src: string): boolean {
  return src.startsWith("blob:") || src.startsWith("data:");
}
