mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix: Fixed the issue where the prompt word edit box had no scroll bar #3221 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -11,6 +11,11 @@ import {
|
|||||||
DropdownMenuLabel,
|
DropdownMenuLabel,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from '@/components/ui/dropdown-menu';
|
} from '@/components/ui/dropdown-menu';
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from '@/components/ui/tooltip';
|
||||||
import { IModalProps } from '@/interfaces/common';
|
import { IModalProps } from '@/interfaces/common';
|
||||||
import { Operator } from '@/pages/agent/constant';
|
import { Operator } from '@/pages/agent/constant';
|
||||||
import { AgentInstanceContext, HandleContext } from '@/pages/agent/context';
|
import { AgentInstanceContext, HandleContext } from '@/pages/agent/context';
|
||||||
@ -33,6 +38,8 @@ function OperatorItemList({ operators }: OperatorItemProps) {
|
|||||||
<ul className="space-y-2">
|
<ul className="space-y-2">
|
||||||
{operators.map((x) => {
|
{operators.map((x) => {
|
||||||
return (
|
return (
|
||||||
|
<Tooltip key={x}>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={x}
|
key={x}
|
||||||
className="hover:bg-background-card py-1 px-3 cursor-pointer rounded-sm flex gap-2 items-center justify-start"
|
className="hover:bg-background-card py-1 px-3 cursor-pointer rounded-sm flex gap-2 items-center justify-start"
|
||||||
@ -46,6 +53,11 @@ function OperatorItemList({ operators }: OperatorItemProps) {
|
|||||||
<OperatorIcon name={x}></OperatorIcon>
|
<OperatorIcon name={x}></OperatorIcon>
|
||||||
{t(`flow.${lowerFirst(x)}`)}
|
{t(`flow.${lowerFirst(x)}`)}
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">
|
||||||
|
<p>{t(`flow.${lowerFirst(x)}Description`)}</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -103,9 +103,12 @@ function PromptContent({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<ContentEditable
|
<ContentEditable
|
||||||
className={cn('relative px-2 py-1 focus-visible:outline-none', {
|
className={cn(
|
||||||
|
'relative px-2 py-1 focus-visible:outline-none max-h-[50vh] overflow-auto',
|
||||||
|
{
|
||||||
'min-h-40': multiLine,
|
'min-h-40': multiLine,
|
||||||
})}
|
},
|
||||||
|
)}
|
||||||
onBlur={handleBlur}
|
onBlur={handleBlur}
|
||||||
onFocus={handleFocus}
|
onFocus={handleFocus}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user