fix: mcp tool description & tool select ui (#5948)

This commit is contained in:
heheer
2025-11-18 16:43:45 +08:00
committed by GitHub
parent 29e9e3fecd
commit b6d3083585
6 changed files with 89 additions and 28 deletions
@@ -154,13 +154,17 @@ const EditForm = ({
>
<Flex alignItems={'center'} py={3} px={3}>
<Box maxW={'full'} pl={2} position="relative" width="calc(100% - 30px)">
<Flex alignItems="center" gap={2} mb={1}>
<Box>{renderHttpMethod(tool.method)}</Box>
<Flex alignItems="center" gap={2} mb={1} w={'full'}>
<Box flex={'0 0 40px'}>{renderHttpMethod(tool.method)}</Box>
<Box
color={'myGray.900'}
fontSize={'14px'}
lineHeight={'20px'}
letterSpacing={'0.25px'}
whiteSpace={'nowrap'}
overflow={'hidden'}
textOverflow={'ellipsis'}
maxW={'200px'}
>
{tool.name}
</Box>
@@ -170,6 +174,10 @@ const EditForm = ({
fontSize={'14px'}
lineHeight={'20px'}
letterSpacing={'0.25px'}
whiteSpace={'nowrap'}
overflow={'hidden'}
textOverflow={'ellipsis'}
maxW={'200px'}
>
{tool.path}
</Box>
@@ -371,7 +371,7 @@ const RenderList = React.memo(function RenderList({
objectFit={'contain'}
borderRadius={'sm'}
/>
<Box fontWeight={'bold'} ml={3} color={'myGray.900'} flex={'1'}>
<Box fontWeight={'bold'} ml={3} color={'myGray.900'} overflow={'hidden'}>
{t(parseI18nString(template.name, i18n.language))}
</Box>
{isSystemTool && (
@@ -408,16 +408,19 @@ const RenderList = React.memo(function RenderList({
borderRadius={'sm'}
flexShrink={0}
/>
<Box flex={'1 0 0'} ml={3}>
<Box
color={'myGray.900'}
fontWeight={'500'}
fontSize={'sm'}
className="textEllipsis"
>
{t(parseI18nString(template.name, i18n.language))}
</Box>
<Box
px={3}
color={'myGray.900'}
fontWeight={'500'}
fontSize={'sm'}
maxW={'200px'}
whiteSpace={'nowrap'}
overflow={'hidden'}
textOverflow={'ellipsis'}
>
{t(parseI18nString(template.name, i18n.language))}
</Box>
<Box flex={1} />
{selected ? (
<Button