fix: remove duplicate embeddings category, refactor render code (#9446)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
a973e747cb
commit
bb01fd00fc
3 changed files with 7 additions and 12 deletions
|
|
@ -20,13 +20,6 @@ export const BundleItem = memo(
|
|||
sensitiveSort,
|
||||
handleKeyDownInput,
|
||||
}: BundleItemProps) => {
|
||||
if (
|
||||
!dataFilter[item.name] ||
|
||||
Object.keys(dataFilter[item.name]).length === 0
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const isOpen = openCategories.includes(item.name);
|
||||
|
||||
const handleOpenChange = useCallback(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { memo, useCallback, useMemo, useState } from "react";
|
||||
import { memo, useMemo } from "react";
|
||||
import {
|
||||
SidebarGroup,
|
||||
SidebarGroupContent,
|
||||
|
|
@ -28,8 +28,12 @@ export const MemoizedSidebarGroup = memo(
|
|||
referenceArray.findIndex((value) => value === a.name) -
|
||||
referenceArray.findIndex((value) => value === b.name)
|
||||
);
|
||||
});
|
||||
}, [BUNDLES, search, sortedCategories]);
|
||||
}).filter(
|
||||
(item: { name: string | number }) =>
|
||||
dataFilter[item.name] &&
|
||||
Object.keys(dataFilter[item.name]).length > 0,
|
||||
);
|
||||
}, [BUNDLES, search, sortedCategories, dataFilter]);
|
||||
|
||||
return (
|
||||
<SidebarGroup className="p-3">
|
||||
|
|
|
|||
|
|
@ -242,7 +242,6 @@ export const SIDEBAR_BUNDLES = [
|
|||
{ display_name: "Amazon", name: "amazon", icon: "Amazon" },
|
||||
{ display_name: "Anthropic", name: "anthropic", icon: "Anthropic" },
|
||||
{ display_name: "Apify", name: "apify", icon: "Apify" },
|
||||
|
||||
{ display_name: "arXiv", name: "arxiv", icon: "arXiv" },
|
||||
{ display_name: "AssemblyAI", name: "assemblyai", icon: "AssemblyAI" },
|
||||
{ display_name: "Azure", name: "azure", icon: "Azure" },
|
||||
|
|
@ -258,7 +257,6 @@ export const SIDEBAR_BUNDLES = [
|
|||
{ display_name: "DeepSeek", name: "deepseek", icon: "DeepSeek" },
|
||||
{ display_name: "Docling", name: "docling", icon: "Docling" },
|
||||
{ display_name: "DuckDuckGo", name: "duckduckgo", icon: "DuckDuckGo" },
|
||||
{ display_name: "Embeddings", name: "embeddings", icon: "Binary" },
|
||||
{ display_name: "Exa", name: "exa", icon: "Exa" },
|
||||
{ display_name: "Firecrawl", name: "firecrawl", icon: "FirecrawlCrawlApi" },
|
||||
{ display_name: "Git", name: "git", icon: "GitLoader" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue