Skip to content

Commit

Permalink
feat: generate uuid with human-id infiniflow#918
Browse files Browse the repository at this point in the history
  • Loading branch information
cike8899 committed Jun 11, 2024
1 parent cf2f659 commit e1ed0b9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"dayjs": "^1.11.10",
"elkjs": "^0.9.3",
"eventsource-parser": "^1.1.2",
"human-id": "^4.1.1",
"i18next": "^23.7.16",
"i18next-browser-languagedetector": "^8.0.0",
"js-base64": "^3.7.5",
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/flow/chat/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ChatDrawer = ({ visible, hideModal }: IModalProps<any>) => {
open={visible}
getContainer={false}
width={470}
zIndex={10000}
// zIndex={10000}
>
<FlowChatBox></FlowChatBox>
</Drawer>
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/flow/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import React, {
useState,
} from 'react';
import { Node, Position, ReactFlowInstance } from 'reactflow';
import { v4 as uuidv4 } from 'uuid';
// import { shallow } from 'zustand/shallow';
import { useDebounceEffect } from 'ahooks';
import { humanId } from 'human-id';
import { useParams } from 'umi';
import useGraphStore, { RFState } from './store';
import { buildDslComponentsByGraph } from './utils';
Expand Down Expand Up @@ -79,7 +79,7 @@ export const useHandleDrop = () => {
y: event.clientY,
});
const newNode = {
id: uuidv4(),
id: `${type}:${humanId()}`,
type: 'textUpdater',
position: position || {
x: 0,
Expand Down

0 comments on commit e1ed0b9

Please sign in to comment.