mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Adjust the style of the agent operator form tool #10703 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -14,7 +14,7 @@ const TabsList = React.forwardRef<
|
||||
<TabsPrimitive.List
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'inline-flex h-10 items-center justify-center rounded-md p-1 ',
|
||||
'inline-flex h-10 items-center justify-center rounded-md p-1 bg-bg-card',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
@ -29,7 +29,7 @@ const TabsTrigger = React.forwardRef<
|
||||
<TabsPrimitive.Trigger
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-text-title-invert data-[state=active]:text-text-primary data-[state=active]:shadow-sm',
|
||||
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-bg-base data-[state=active]:text-text-primary data-[state=active]:shadow-sm',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@ -66,12 +66,10 @@ export function ToolPopover({ children }: PropsWithChildren) {
|
||||
<PopoverContent className="w-80 p-4">
|
||||
<Tabs defaultValue={ToolType.Common}>
|
||||
<TabsList>
|
||||
<TabsTrigger value={ToolType.Common} className="bg-bg-card">
|
||||
<TabsTrigger value={ToolType.Common}>
|
||||
{t('flow.builtIn')}
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value={ToolType.MCP} className="bg-bg-card">
|
||||
MCP
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value={ToolType.MCP}>MCP</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value={ToolType.Common}>
|
||||
<ToolCommand
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { CheckIcon } from 'lucide-react';
|
||||
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import {
|
||||
Command,
|
||||
CommandEmpty,
|
||||
@ -9,7 +8,6 @@ import {
|
||||
CommandList,
|
||||
} from '@/components/ui/command';
|
||||
import { useListMcpServer } from '@/hooks/use-mcp-request';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Operator } from '@/pages/agent/constant';
|
||||
import OperatorIcon from '@/pages/agent/operator-icon';
|
||||
import { t } from 'i18next';
|
||||
@ -68,16 +66,7 @@ function ToolCommandItem({
|
||||
}: ToolCommandItemProps & PropsWithChildren) {
|
||||
return (
|
||||
<CommandItem className="cursor-pointer" onSelect={() => toggleOption(id)}>
|
||||
<div
|
||||
className={cn(
|
||||
'mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary',
|
||||
isSelected
|
||||
? 'bg-primary text-primary-foreground'
|
||||
: 'opacity-50 [&_svg]:invisible',
|
||||
)}
|
||||
>
|
||||
<CheckIcon className="h-4 w-4" />
|
||||
</div>
|
||||
<Checkbox checked={isSelected} />
|
||||
{children}
|
||||
</CommandItem>
|
||||
);
|
||||
|
||||
@ -19,7 +19,7 @@ export function transferOutputs(outputs: Record<string, any>) {
|
||||
export function Output({ list }: OutputProps) {
|
||||
return (
|
||||
<section className="space-y-2">
|
||||
<div>{t('flow.output')}</div>
|
||||
<div className="text-sm">{t('flow.output')}</div>
|
||||
<ul>
|
||||
{list.map((x, idx) => (
|
||||
<li
|
||||
|
||||
Reference in New Issue
Block a user