feat: catch errors when sending messages #918 (#1113)

### What problem does this PR solve?

feat: catch errors when sending messages #918

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-06-11 15:46:12 +08:00
committed by GitHub
parent e28d13e3b4
commit 8902d92d0e
10 changed files with 51 additions and 44 deletions

View File

@@ -19,6 +19,7 @@ import {
} from '../hooks';
import { TextUpdaterNode } from './node';
import ChatDrawer from '../chat/drawer';
import styles from './index.less';
const nodeTypes = { textUpdater: TextUpdaterNode };
@@ -29,9 +30,11 @@ const edgeTypes = {
interface IProps {
sideWidth: number;
chatDrawerVisible: boolean;
hideChatDrawer(): void;
}
function FlowCanvas({ sideWidth }: IProps) {
function FlowCanvas({ sideWidth, chatDrawerVisible, hideChatDrawer }: IProps) {
const {
nodes,
edges,
@@ -99,6 +102,10 @@ function FlowCanvas({ sideWidth }: IProps) {
visible={drawerVisible}
hideModal={hideDrawer}
></FlowDrawer>
<ChatDrawer
visible={chatDrawerVisible}
hideModal={hideChatDrawer}
></ChatDrawer>
</div>
);
}