Skip to content

Commit 1569ed8

Browse files
authored
Refactor: Delete flow.ts (#13498)
### What problem does this PR solve? Feat: Delete flow.ts ### Type of change - [x] Refactoring
1 parent a3e6c2e commit 1569ed8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+54
-260
lines changed

web/src/app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import vi_VN from 'antd/locale/vi_VN';
1313
import zhCN from 'antd/locale/zh_CN';
1414
import zh_HK from 'antd/locale/zh_HK';
1515
import dayjs from 'dayjs';
16+
import 'dayjs/locale/ar';
17+
import 'dayjs/locale/zh-cn';
1618
import advancedFormat from 'dayjs/plugin/advancedFormat';
1719
import customParseFormat from 'dayjs/plugin/customParseFormat';
1820
import localeData from 'dayjs/plugin/localeData';
1921
import weekOfYear from 'dayjs/plugin/weekOfYear';
2022
import weekYear from 'dayjs/plugin/weekYear';
2123
import weekday from 'dayjs/plugin/weekday';
22-
import 'dayjs/locale/ar';
23-
import 'dayjs/locale/zh-cn';
2424
import React, { useEffect, useState } from 'react';
2525
import { RouterProvider } from 'react-router';
2626
import { ThemeProvider, useTheme } from './components/theme-provider';

web/src/interfaces/database/flow.ts

Lines changed: 0 additions & 191 deletions
This file was deleted.

web/src/pages/agent/canvas/node/agent-node.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IAgentNode } from '@/interfaces/database/flow';
1+
import { BaseNode } from '@/interfaces/database/agent';
22
import { cn } from '@/lib/utils';
33
import { Handle, NodeProps, Position } from '@xyflow/react';
44
import { get } from 'lodash';
@@ -20,7 +20,7 @@ function InnerAgentNode({
2020
data,
2121
isConnectable = true,
2222
selected,
23-
}: NodeProps<IAgentNode<AgentFormSchemaType>>) {
23+
}: NodeProps<BaseNode<AgentFormSchemaType>>) {
2424
const edges = useGraphStore((state) => state.edges);
2525
const { t } = useTranslation();
2626

web/src/pages/agent/canvas/node/begin-node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BaseNode } from '@/interfaces/database/flow';
1+
import { BaseNode } from '@/interfaces/database/agent';
22
import { cn } from '@/lib/utils';
33
import { NodeProps, Position } from '@xyflow/react';
44
import get from 'lodash/get';

web/src/pages/agent/canvas/node/categorize-node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ICategorizeNode } from '@/interfaces/database/flow';
1+
import { ICategorizeNode } from '@/interfaces/database/agent';
22
import { NodeProps, Position } from '@xyflow/react';
33
import { get } from 'lodash';
44
import { memo } from 'react';

web/src/pages/agent/canvas/node/file-node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IBeginNode } from '@/interfaces/database/flow';
1+
import { IBeginNode } from '@/interfaces/database/agent';
22
import { cn } from '@/lib/utils';
33
import { NodeProps, Position } from '@xyflow/react';
44
import get from 'lodash/get';

web/src/pages/agent/canvas/node/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IRagNode } from '@/interfaces/database/flow';
1+
import { IRagNode } from '@/interfaces/database/agent';
22
import { NodeProps, Position } from '@xyflow/react';
33
import { PropsWithChildren, memo } from 'react';
44
import { NodeHandleId } from '../../constant';

web/src/pages/agent/canvas/node/iteration-node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
IIterationNode,
33
IIterationStartNode,
4-
} from '@/interfaces/database/flow';
4+
} from '@/interfaces/database/agent';
55
import { cn } from '@/lib/utils';
66
import { NodeProps, NodeResizeControl, Position } from '@xyflow/react';
77
import { memo } from 'react';

web/src/pages/agent/canvas/node/keyword-node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useTheme } from '@/components/theme-provider';
2-
import { IKeywordNode } from '@/interfaces/database/flow';
2+
import { IKeywordNode } from '@/interfaces/database/agent';
33
import { Handle, NodeProps, Position } from '@xyflow/react';
44
import classNames from 'classnames';
55
import { get } from 'lodash';

web/src/pages/agent/canvas/node/message-node.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NodeCollapsible } from '@/components/collapse';
2-
import { IMessageNode } from '@/interfaces/database/flow';
2+
import { IMessageNode } from '@/interfaces/database/agent';
33
import { cn } from '@/lib/utils';
44
import { useGetVariableLabelOrTypeByValue } from '@/pages/agent/hooks/use-get-begin-query';
55
import { NodeProps } from '@xyflow/react';

0 commit comments

Comments
 (0)