Feat: Add Arxiv GoogleScholar operator #3221 (#9102)

### What problem does this PR solve?

Feat: Add Arxiv GoogleScholar operator #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-30 09:43:12 +08:00
committed by GitHub
parent b9d3846bb4
commit 98c78073c7
17 changed files with 466 additions and 121 deletions

View File

@ -1,4 +1,9 @@
import { BlockButton } from '@/components/ui/button';
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from '@/components/ui/tooltip';
import { cn } from '@/lib/utils';
import { Position } from '@xyflow/react';
import { PencilLine, X } from 'lucide-react';
@ -25,17 +30,32 @@ export function ToolCard({
className,
...props
}: PropsWithChildren & React.HTMLAttributes<HTMLLIElement>) {
return (
<li
{...props}
className={cn(
'flex bg-background-card p-1 rounded-sm justify-between',
className,
)}
>
{children}
</li>
);
const element = useMemo(() => {
return (
<li
{...props}
className={cn(
'flex bg-background-card p-1 rounded-sm justify-between',
className,
)}
>
{children}
</li>
);
}, [children, className, props]);
if (children === Operator.Code) {
return (
<Tooltip>
<TooltipTrigger asChild>{element}</TooltipTrigger>
<TooltipContent>
<p>It doesn't have any config.</p>
</TooltipContent>
</Tooltip>
);
}
return element;
}
type ActionButtonProps<T> = {

View File

@ -26,6 +26,7 @@ const Menus = [
Operator.YahooFinance,
Operator.PubMed,
Operator.GoogleScholar,
Operator.ArXiv,
],
},
{