mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-18 23:11:12 +02:00
feat(web): add SearxNG connector metadata
This commit is contained in:
parent
0f56de340d
commit
467da1e345
5 changed files with 8 additions and 3 deletions
|
|
@ -52,7 +52,8 @@ export function SourceDetailSheet({
|
||||||
const [summaryOpen, setSummaryOpen] = useState(false);
|
const [summaryOpen, setSummaryOpen] = useState(false);
|
||||||
|
|
||||||
// Check if this is a source type that should render directly from node
|
// Check if this is a source type that should render directly from node
|
||||||
const isDirectRenderSource = sourceType === "TAVILY_API" || sourceType === "LINKUP_API";
|
const isDirectRenderSource =
|
||||||
|
sourceType === "TAVILY_API" || sourceType === "LINKUP_API" || sourceType === "SEARXNG_API";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open && chunkId && !isDirectRenderSource) {
|
if (open && chunkId && !isDirectRenderSource) {
|
||||||
|
|
@ -108,7 +109,7 @@ export function SourceDetailSheet({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Direct render for TAVILY_API and LINKUP_API */}
|
{/* Direct render for web search providers */}
|
||||||
{isDirectRenderSource && (
|
{isDirectRenderSource && (
|
||||||
<ScrollArea className="h-[calc(100vh-10rem)]">
|
<ScrollArea className="h-[calc(100vh-10rem)]">
|
||||||
<div className="px-6 py-4">
|
<div className="px-6 py-4">
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
export enum EnumConnectorName {
|
export enum EnumConnectorName {
|
||||||
SERPER_API = "SERPER_API",
|
SERPER_API = "SERPER_API",
|
||||||
TAVILY_API = "TAVILY_API",
|
TAVILY_API = "TAVILY_API",
|
||||||
|
SEARXNG_API = "SEARXNG_API",
|
||||||
LINKUP_API = "LINKUP_API",
|
LINKUP_API = "LINKUP_API",
|
||||||
SLACK_CONNECTOR = "SLACK_CONNECTOR",
|
SLACK_CONNECTOR = "SLACK_CONNECTOR",
|
||||||
NOTION_CONNECTOR = "NOTION_CONNECTOR",
|
NOTION_CONNECTOR = "NOTION_CONNECTOR",
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ export const getConnectorIcon = (connectorType: EnumConnectorName | string, clas
|
||||||
return <Link {...iconProps} />;
|
return <Link {...iconProps} />;
|
||||||
case EnumConnectorName.TAVILY_API:
|
case EnumConnectorName.TAVILY_API:
|
||||||
return <IconWorldWww {...iconProps} />;
|
return <IconWorldWww {...iconProps} />;
|
||||||
|
case EnumConnectorName.SEARXNG_API:
|
||||||
|
return <Globe {...iconProps} />;
|
||||||
case EnumConnectorName.SLACK_CONNECTOR:
|
case EnumConnectorName.SLACK_CONNECTOR:
|
||||||
return <IconBrandSlack {...iconProps} />;
|
return <IconBrandSlack {...iconProps} />;
|
||||||
case EnumConnectorName.NOTION_CONNECTOR:
|
case EnumConnectorName.NOTION_CONNECTOR:
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export const getConnectorTypeDisplay = (type: string): string => {
|
||||||
const typeMap: Record<string, string> = {
|
const typeMap: Record<string, string> = {
|
||||||
SERPER_API: "Serper API",
|
SERPER_API: "Serper API",
|
||||||
TAVILY_API: "Tavily API",
|
TAVILY_API: "Tavily API",
|
||||||
// Add other connector types here as needed
|
SEARXNG_API: "SearxNG",
|
||||||
};
|
};
|
||||||
return typeMap[type] || type;
|
return typeMap[type] || type;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ export const getConnectorTypeDisplay = (type: string): string => {
|
||||||
const typeMap: Record<string, string> = {
|
const typeMap: Record<string, string> = {
|
||||||
SERPER_API: "Serper API",
|
SERPER_API: "Serper API",
|
||||||
TAVILY_API: "Tavily API",
|
TAVILY_API: "Tavily API",
|
||||||
|
SEARXNG_API: "SearxNG",
|
||||||
SLACK_CONNECTOR: "Slack",
|
SLACK_CONNECTOR: "Slack",
|
||||||
NOTION_CONNECTOR: "Notion",
|
NOTION_CONNECTOR: "Notion",
|
||||||
GITHUB_CONNECTOR: "GitHub",
|
GITHUB_CONNECTOR: "GitHub",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue