Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

2.0 KB
Raw Blame
import {
  CodeIcon,
  FileIcon,
  FlaskConicalIcon,
  ImageIcon,
  MapIcon,
  MusicIcon,
  NewspaperIcon,
  SearchIcon,
  Share2Icon,
  VideoIcon,
} from 'lucide-react';

export const CATEGORY_ICON_MAP: Record<string, any> = {
  files: FileIcon,
  general: SearchIcon,
  images: ImageIcon,
  it: CodeIcon,
  map: MapIcon,
  music: MusicIcon,
  news: NewspaperIcon,
  science: FlaskConicalIcon,
  social_media: Share2Icon,
  videos: VideoIcon,
};

export const ENGINE_ICON_MAP: Record<string, string> = {
  'arxiv': 'https://icons.duckduckgo.com/ip3/arxiv.org.ico',
  'bilibili': 'https://icons.duckduckgo.com/ip3/bilibili.com.ico',
  'bing': 'https://icons.duckduckgo.com/ip3/www.bing.com.ico',
  'bing news': 'https://icons.duckduckgo.com/ip3/www.bing.com.ico',
  'brave': 'https://icons.duckduckgo.com/ip3/brave.com.ico',
  'brave.news': 'https://icons.duckduckgo.com/ip3/brave.com.ico',
  'duckduckgo': 'https://icons.duckduckgo.com/ip3/www.duckduckgo.com.ico',
  'github': 'https://icons.duckduckgo.com/ip3/github.com.ico',
  'google': 'https://icons.duckduckgo.com/ip3/google.com.ico',
  'google scholar': 'https://icons.duckduckgo.com/ip3/scholar.google.com.ico',
  'npm': 'https://icons.duckduckgo.com/ip3/npmjs.com.ico',
  'openairepublications': 'https://icons.duckduckgo.com/ip3/doi.org.ico',
  'pubmed': 'https://icons.duckduckgo.com/ip3/pubmed.ncbi.nlm.nih.gov.ico',
  'qwant': 'https://icons.duckduckgo.com/ip3/www.qwant.com.ico',
  'sogou wechat': 'https://icons.duckduckgo.com/ip3/weixin.sogou.com.ico',
  'youtube': 'https://icons.duckduckgo.com/ip3/youtube.com.ico',
};

/** Characters of a crawled page returned to the model; longer pages end with the shared window notice. */
export const CRAWL_CONTENT_LIMITED_COUNT = 25_000;

/**
 * Largest crawled page saved as a document. Saving parses the page into an editor
 * snapshot synchronously, so a multi-megabyte body (a JS bundle, a data dump) blocks
 * the event loop; such a page is still returned to the model, just not saved.
 */
export const CRAWL_SAVE_MAX_CHARS = 1_000_000;

export const SEARCH_ITEM_LIMITED_COUNT = 30;