mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-05 10:05:05 +08:00
### 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:
@ -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> = {
|
||||
|
||||
@ -26,6 +26,7 @@ const Menus = [
|
||||
Operator.YahooFinance,
|
||||
Operator.PubMed,
|
||||
Operator.GoogleScholar,
|
||||
Operator.ArXiv,
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user