@@ -25,7 +25,7 @@ class McpToolDetailPanel(
25
25
private val project : Project ,
26
26
private val serverName : String ,
27
27
private val tool : Tool
28
- ) : JPanel(BorderLayout (0, 8 )) {
28
+ ) : JPanel(BorderLayout (0, 0 )) {
29
29
private val mcpServerManager = CustomMcpServerManager .instance(project)
30
30
private val borderColor = JBColor (0xE5E7EB , 0x3C3F41 )
31
31
private val textGray = JBColor (0x6B7280 , 0x9DA0A8 )
@@ -42,11 +42,11 @@ class McpToolDetailPanel(
42
42
border = CompoundBorder (BorderFactory .createLineBorder(borderColor), JBUI .Borders .empty(4 ))
43
43
preferredSize = Dimension (TOOL_CARD_WIDTH , MAX_TOOL_CARD_HEIGHT )
44
44
45
- val headerPanel = JPanel (BorderLayout (8 , 4 )).apply {
45
+ val headerPanel = JPanel (BorderLayout (4 , 4 )).apply {
46
46
background = UIUtil .getPanelBackground()
47
47
}
48
48
49
- val titleLabel = JBLabel (serverName + " : " + tool.name).apply {
49
+ val titleLabel = JBLabel (tool.name).apply {
50
50
font = JBUI .Fonts .label(14.0f ).asBold()
51
51
}
52
52
@@ -56,9 +56,13 @@ class McpToolDetailPanel(
56
56
}
57
57
58
58
val descriptionText = tool.description ? : " No description available"
59
- val descLabel = JBLabel (descriptionText).apply {
59
+ val descLabel = JTextPane ().apply {
60
+ text = descriptionText
60
61
font = JBUI .Fonts .label(12.0f )
61
62
foreground = textGray
63
+ isEditable = false
64
+ background = null
65
+ border = null
62
66
}
63
67
64
68
headerPanel.add(titleWrapper, BorderLayout .NORTH )
@@ -69,7 +73,6 @@ class McpToolDetailPanel(
69
73
}
70
74
71
75
val detailsButton = JButton (" Details" ).apply {
72
- font = JBUI .Fonts .label(14.0f )
73
76
isFocusPainted = false
74
77
addActionListener { showToolDetails() }
75
78
}
@@ -80,8 +83,6 @@ class McpToolDetailPanel(
80
83
add(footerPanel, BorderLayout .SOUTH )
81
84
}
82
85
83
- private val json = Json { prettyPrint = true }
84
-
85
86
private fun showToolDetails () {
86
87
val dialog = McpToolDetailDialog (project, serverName, tool, mcpServerManager)
87
88
dialog.show()
0 commit comments