SurfSense/surfsense_web/contracts/enums/toolIcons.tsx
Anish Sarkar 79bc123439 feat: implement lazy imports for token refresh in Confluence and Jira connectors
- Refactored token refresh logic in ConfluenceHistoryConnector and JiraHistoryConnector to use lazy imports, avoiding circular dependencies.
- Enhanced the ComposerAction component to manage tool availability based on connected types, adding support for Jira and Confluence tools.
- Updated tool icon management to include Jira and Confluence, improving the user interface for tool interactions.
2026-03-21 12:41:06 +05:30

52 lines
1.6 KiB
TypeScript

import {
BookOpen,
Brain,
Database,
FileText,
Globe,
ImageIcon,
Link2,
type LucideIcon,
Podcast,
ScanLine,
Sparkles,
Wrench,
} from "lucide-react";
const TOOL_ICONS: Record<string, LucideIcon> = {
search_knowledge_base: Database,
generate_podcast: Podcast,
generate_report: FileText,
link_preview: Link2,
display_image: ImageIcon,
generate_image: Sparkles,
scrape_webpage: ScanLine,
web_search: Globe,
search_surfsense_docs: BookOpen,
save_memory: Brain,
recall_memory: Brain,
};
export function getToolIcon(name: string): LucideIcon {
return TOOL_ICONS[name] ?? Wrench;
}
export const CONNECTOR_TOOL_ICON_PATHS: Record<string, { src: string; alt: string }> = {
gmail: { src: "/connectors/google-gmail.svg", alt: "Gmail" },
google_calendar: { src: "/connectors/google-calendar.svg", alt: "Google Calendar" },
google_drive: { src: "/connectors/google-drive.svg", alt: "Google Drive" },
notion: { src: "/connectors/notion.svg", alt: "Notion" },
linear: { src: "/connectors/linear.svg", alt: "Linear" },
jira: { src: "/connectors/jira.svg", alt: "Jira" },
confluence: { src: "/connectors/confluence.svg", alt: "Confluence" },
};
export const CONNECTOR_ICON_TO_TYPES: Record<string, string[]> = {
gmail: ["GOOGLE_GMAIL_CONNECTOR", "COMPOSIO_GMAIL_CONNECTOR"],
google_calendar: ["GOOGLE_CALENDAR_CONNECTOR", "COMPOSIO_GOOGLE_CALENDAR_CONNECTOR"],
google_drive: ["GOOGLE_DRIVE_CONNECTOR", "COMPOSIO_GOOGLE_DRIVE_CONNECTOR"],
notion: ["NOTION_CONNECTOR"],
linear: ["LINEAR_CONNECTOR"],
jira: ["JIRA_CONNECTOR"],
confluence: ["CONFLUENCE_CONNECTOR"],
};