mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 17:16:52 +08:00
### What problem does this PR solve? Feat: Display the agent node running timeline #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -5,6 +5,7 @@ import {
|
||||
ReactFlow,
|
||||
} from '@xyflow/react';
|
||||
import '@xyflow/react/dist/style.css';
|
||||
import { useEffect } from 'react';
|
||||
import { ChatSheet } from '../chat/chat-sheet';
|
||||
import {
|
||||
AgentChatContext,
|
||||
@ -106,8 +107,12 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
|
||||
hideDrawer,
|
||||
});
|
||||
|
||||
const { addEventList, setCurrentMessageId, currentEventListWithoutMessage } =
|
||||
useCacheChatLog();
|
||||
const {
|
||||
addEventList,
|
||||
setCurrentMessageId,
|
||||
currentEventListWithoutMessage,
|
||||
clearEventList,
|
||||
} = useCacheChatLog();
|
||||
|
||||
const { showLogSheet, logSheetVisible, hideLogSheet } = useShowLogSheet({
|
||||
setCurrentMessageId,
|
||||
@ -119,6 +124,12 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
|
||||
|
||||
const { addCanvasNode } = useAddNode(reactFlowInstance);
|
||||
|
||||
useEffect(() => {
|
||||
if (!chatVisible) {
|
||||
clearEventList();
|
||||
}
|
||||
}, [chatVisible, clearEventList]);
|
||||
|
||||
return (
|
||||
<div className={styles.canvasWrapper}>
|
||||
<svg
|
||||
|
||||
Reference in New Issue
Block a user