mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Use sonner to replace the requested prompt message component #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -65,7 +65,7 @@ const FormSheet = ({
|
||||
return (
|
||||
<Sheet open={visible} modal={false}>
|
||||
<SheetContent
|
||||
className={cn('top-20 p-0 flex flex-col pb-20 ', {
|
||||
className={cn('top-20 p-0 flex flex-col pb-20', {
|
||||
'right-[620px]': chatVisible,
|
||||
})}
|
||||
closeIcon={false}
|
||||
|
||||
@ -87,7 +87,6 @@ function AgentForm({ node }: INextOperatorForm) {
|
||||
const defaultValues = useValues(node);
|
||||
|
||||
const { extraOptions } = useBuildPromptExtraPromptOptions();
|
||||
console.log('🚀 ~ AgentForm ~ prompts:', extraOptions);
|
||||
|
||||
const ExceptionMethodOptions = Object.values(AgentExceptionMethod).map(
|
||||
(x) => ({
|
||||
|
||||
8
web/src/pages/agent/hooks/use-calculate-sheet-right.ts
Normal file
8
web/src/pages/agent/hooks/use-calculate-sheet-right.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { useSize } from 'ahooks';
|
||||
|
||||
export function useCalculateSheetRight() {
|
||||
const size = useSize(document.querySelector('body'));
|
||||
const bodyWidth = size?.width ?? 0;
|
||||
|
||||
return bodyWidth > 1800 ? 'right-[620px]' : `right-1/3`;
|
||||
}
|
||||
@ -5,6 +5,7 @@ import {
|
||||
SheetTitle,
|
||||
} from '@/components/ui/sheet';
|
||||
import { IModalProps } from '@/interfaces/common';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { NotebookText } from 'lucide-react';
|
||||
import 'react18-json-view/src/style.css';
|
||||
import { useCacheChatLog } from '../hooks/use-cache-chat-log';
|
||||
@ -24,7 +25,7 @@ export function LogSheet({
|
||||
}: LogSheetProps) {
|
||||
return (
|
||||
<Sheet open onOpenChange={hideModal} modal={false}>
|
||||
<SheetContent className="top-20 right-[620px]">
|
||||
<SheetContent className={cn('top-20 right-[620px]')}>
|
||||
<SheetHeader>
|
||||
<SheetTitle className="flex items-center gap-1">
|
||||
<NotebookText className="size-4" />
|
||||
|
||||
Reference in New Issue
Block a user