mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 17:51:24 +00:00
fix: flow type
This commit is contained in:
@@ -17,8 +17,8 @@ const ContextModal = ({
|
|||||||
isOpen={true}
|
isOpen={true}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
title={`完整对话记录(${context.length}条)`}
|
title={`完整对话记录(${context.length}条)`}
|
||||||
minW={['90vw', '600px']}
|
|
||||||
h={['90vh', '80vh']}
|
h={['90vh', '80vh']}
|
||||||
|
minW={['90vw', '600px']}
|
||||||
isCentered
|
isCentered
|
||||||
>
|
>
|
||||||
<ModalBody pt={0} whiteSpace={'pre-wrap'} textAlign={'justify'} fontSize={'sm'}>
|
<ModalBody pt={0} whiteSpace={'pre-wrap'} textAlign={'justify'} fontSize={'sm'}>
|
||||||
|
@@ -76,7 +76,6 @@ const QuoteModal = ({
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ModalCloseButton />
|
|
||||||
<ModalBody pt={0} whiteSpace={'pre-wrap'} textAlign={'justify'} fontSize={'sm'}>
|
<ModalBody pt={0} whiteSpace={'pre-wrap'} textAlign={'justify'} fontSize={'sm'}>
|
||||||
{rawSearch.map((item) => (
|
{rawSearch.map((item) => (
|
||||||
<Box
|
<Box
|
||||||
|
@@ -7,7 +7,6 @@ import Divider from '../modules/Divider';
|
|||||||
import Container from '../modules/Container';
|
import Container from '../modules/Container';
|
||||||
import RenderInput from '../render/RenderInput';
|
import RenderInput from '../render/RenderInput';
|
||||||
import type { ClassifyQuestionAgentItemType } from '@/types/app';
|
import type { ClassifyQuestionAgentItemType } from '@/types/app';
|
||||||
import { Handle, Position } from 'reactflow';
|
|
||||||
import { customAlphabet } from 'nanoid';
|
import { customAlphabet } from 'nanoid';
|
||||||
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 4);
|
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 4);
|
||||||
import MyIcon from '@/components/Icon';
|
import MyIcon from '@/components/Icon';
|
||||||
|
@@ -16,7 +16,8 @@ import {
|
|||||||
edgeOptions,
|
edgeOptions,
|
||||||
connectionLineStyle,
|
connectionLineStyle,
|
||||||
FlowModuleTypeEnum,
|
FlowModuleTypeEnum,
|
||||||
FlowInputItemTypeEnum
|
FlowInputItemTypeEnum,
|
||||||
|
FlowValueTypeEnum
|
||||||
} from '@/constants/flow';
|
} from '@/constants/flow';
|
||||||
import { appModule2FlowNode, appModule2FlowEdge } from '@/utils/adapt';
|
import { appModule2FlowNode, appModule2FlowEdge } from '@/utils/adapt';
|
||||||
import {
|
import {
|
||||||
@@ -231,9 +232,14 @@ const AppEdit = ({ app, fullScreen, onFullScreen }: Props) => {
|
|||||||
);
|
);
|
||||||
const onConnect = useCallback(
|
const onConnect = useCallback(
|
||||||
({ connect }: { connect: Connection }) => {
|
({ connect }: { connect: Connection }) => {
|
||||||
const sourceType = nodes
|
const source = nodes.find((node) => node.id === connect.source)?.data;
|
||||||
.find((node) => node.id === connect.source)
|
const sourceType = (() => {
|
||||||
?.data?.outputs.find((output) => output.key === connect.sourceHandle)?.valueType;
|
if (source?.flowType === FlowModuleTypeEnum.classifyQuestion) {
|
||||||
|
return FlowValueTypeEnum.boolean;
|
||||||
|
}
|
||||||
|
return source?.outputs.find((output) => output.key === connect.sourceHandle)?.valueType;
|
||||||
|
})();
|
||||||
|
|
||||||
const targetType = nodes
|
const targetType = nodes
|
||||||
.find((node) => node.id === connect.target)
|
.find((node) => node.id === connect.target)
|
||||||
?.data?.inputs.find((input) => input.key === connect.targetHandle)?.valueType;
|
?.data?.inputs.find((input) => input.key === connect.targetHandle)?.valueType;
|
||||||
|
Reference in New Issue
Block a user