feat: get node variables in prompt editor (#2087)

* feat: get node variables in prompt editor

* fix

* fix build

* merge

* fix build

* delete default parent

* fix

* fix
This commit is contained in:
heheer
2024-07-23 11:20:23 +08:00
committed by GitHub
parent f24e41f5ec
commit a4787bce5c
23 changed files with 897 additions and 61 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Image } from '@chakra-ui/react';
import { Box, Flex, Image } from '@chakra-ui/react';
import type { ImageProps } from '@chakra-ui/react';
import { LOGO_ICON } from '@fastgpt/global/common/system/constants';
import MyIcon from '../Icon';
@@ -10,12 +10,13 @@ const Avatar = ({ w = '30px', src, ...props }: ImageProps) => {
const isIcon = !!iconPaths[src as any];
return isIcon ? (
<MyIcon name={src as any} w={w} borderRadius={props.borderRadius} />
<Box {...props}>
<MyIcon name={src as any} w={w} borderRadius={props.borderRadius} />
</Box>
) : (
<Image
fallbackSrc={LOGO_ICON}
fallbackStrategy={'onError'}
// borderRadius={'md'}
objectFit={'contain'}
alt=""
w={w}