V4.6.5-alpha (#609)
This commit is contained in:
@@ -2,11 +2,11 @@ import type { ChatItemType } from '@fastgpt/global/core/chat/type.d';
|
||||
import type { ChatMessageItemType } from '@fastgpt/global/core/ai/type.d';
|
||||
import type { ModuleItemType, FlowModuleItemType } from '@fastgpt/global/core/module/type.d';
|
||||
import type { Edge, Node } from 'reactflow';
|
||||
import { connectionLineStyle } from '@/web/core/modules/constants/flowUi';
|
||||
import { customAlphabet } from 'nanoid';
|
||||
import { EmptyModule } from '@fastgpt/global/core/module/template/system/empty';
|
||||
import { moduleTemplatesFlat } from '@/web/core/modules/template/system';
|
||||
import { adaptRole_Message2Chat } from '@fastgpt/global/core/chat/adapt';
|
||||
import { EDGE_TYPE } from '@fastgpt/global/core/module/node/constant';
|
||||
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 6);
|
||||
|
||||
export const gptMessage2ChatType = (messages: ChatMessageItemType[]): ChatItemType[] => {
|
||||
@@ -100,14 +100,12 @@ export const appModule2FlowEdge = ({
|
||||
module.outputs.forEach((output) =>
|
||||
output.targets.forEach((target) => {
|
||||
edges.push({
|
||||
style: connectionLineStyle,
|
||||
source: module.moduleId,
|
||||
target: target.moduleId,
|
||||
sourceHandle: output.key,
|
||||
targetHandle: target.key,
|
||||
id: nanoid(),
|
||||
animated: true,
|
||||
type: 'buttonedge',
|
||||
type: EDGE_TYPE,
|
||||
data: { onDelete }
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user