mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix: Improve Agent templates functionality and fix some UI style issues #3221 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import {
|
|
Sheet,
|
|
SheetContent,
|
|
SheetHeader,
|
|
SheetTitle,
|
|
} from '@/components/ui/sheet';
|
|
import { IModalProps } from '@/interfaces/common';
|
|
import { NotebookText } from 'lucide-react';
|
|
import 'react18-json-view/src/style.css';
|
|
import { useCacheChatLog } from '../hooks/use-cache-chat-log';
|
|
import { WorkFlowTimeline } from './workFlowTimeline';
|
|
|
|
type LogSheetProps = IModalProps<any> &
|
|
Pick<
|
|
ReturnType<typeof useCacheChatLog>,
|
|
'currentEventListWithoutMessageById' | 'currentMessageId'
|
|
> & { sendLoading: boolean };
|
|
|
|
export function LogSheet({
|
|
hideModal,
|
|
currentEventListWithoutMessageById,
|
|
currentMessageId,
|
|
sendLoading,
|
|
}: LogSheetProps) {
|
|
return (
|
|
<Sheet open onOpenChange={hideModal} modal={false}>
|
|
<SheetContent className="top-20 right-[620px]">
|
|
<SheetHeader>
|
|
<SheetTitle className="flex items-center gap-1">
|
|
<NotebookText className="size-4" />
|
|
Log
|
|
</SheetTitle>
|
|
</SheetHeader>
|
|
<section className="max-h-[82vh] overflow-auto mt-6">
|
|
<WorkFlowTimeline
|
|
currentEventListWithoutMessage={currentEventListWithoutMessageById(
|
|
currentMessageId,
|
|
)}
|
|
currentMessageId={currentMessageId}
|
|
sendLoading={sendLoading}
|
|
/>
|
|
</section>
|
|
</SheetContent>
|
|
</Sheet>
|
|
);
|
|
}
|