Files
ragflow/web/src/pages/agent/log-sheet/index.tsx
chanx 26042343d8 Fix: Improve Agent templates functionality and fix some UI style issues (#9129)
### 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)
2025-07-31 16:09:45 +08:00

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>
);
}