mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
style: optimize mcp arg name display layout when tool or prompt descr… (#5467)
* style: optimize mcp arg name display layout when tool or prompt description is short * style: optimize mcp arg name display layout, make it simple * fix: remove unused import
This commit is contained in:
parent
37f09d3cb8
commit
c8240421e9
@ -1,5 +1,5 @@
|
||||
import { MCPPrompt } from '@renderer/types'
|
||||
import { Collapse, Descriptions, Empty, Flex, Tag, Tooltip, Typography } from 'antd'
|
||||
import { Collapse, Descriptions, Empty, Flex, Tooltip, Typography } from 'antd'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import styled from 'styled-components'
|
||||
|
||||
@ -22,11 +22,11 @@ const MCPPromptsSection = ({ prompts }: MCPPromptsSectionProps) => {
|
||||
<Descriptions.Item
|
||||
key={index}
|
||||
label={
|
||||
<Flex vertical gap={4}>
|
||||
<Flex gap={4}>
|
||||
<Typography.Text strong>{arg.name}</Typography.Text>
|
||||
{arg.required && (
|
||||
<Tooltip title="Required field">
|
||||
<Tag color="red">Required</Tag>
|
||||
<span style={{ color: '#f5222d' }}>*</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
@ -51,11 +51,11 @@ const MCPToolsSection = ({ tools, server, onToggleTool }: MCPToolsSectionProps)
|
||||
<Descriptions.Item
|
||||
key={key}
|
||||
label={
|
||||
<Flex vertical gap={4}>
|
||||
<Flex gap={4}>
|
||||
<Typography.Text strong>{key}</Typography.Text>
|
||||
{tool.inputSchema.required?.includes(key) && (
|
||||
<Tooltip title="Required field">
|
||||
<Tag color="red">Required</Tag>
|
||||
<span style={{ color: '#f5222d' }}>*</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user