Skip to content

Commit f355400

Browse files
committed
refactor(devti): replace InProgress icon with LOADING icon across multiple components #371
1 parent 7e7f5a1 commit f355400

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

core/src/main/kotlin/cc/unitmesh/devti/mcp/editor/McpLlmConfigDialog.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ class McpLlmConfigDialog(
4242

4343
override fun createCenterPanel(): JComponent {
4444
val systemPrompt = """
45-
# Configuration Instructions
46-
4745
You can also add specific instructions for the chatbot here.
4846
""".trimIndent()
4947

core/src/main/kotlin/cc/unitmesh/devti/mcp/editor/McpPreviewEditor.kt

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ open class McpPreviewEditor(
5959
private lateinit var toolsContainer: JPanel
6060
private lateinit var chatbotSelector: JComboBox<String>
6161
private lateinit var chatInput: JBTextField
62-
private lateinit var sendButton: ActionButton
62+
private lateinit var testButton: ActionButton
6363
private lateinit var configButton: JButton
6464
private lateinit var resultLabel: JLabel
6565
private lateinit var resultPanel: JPanel
@@ -178,22 +178,20 @@ open class McpPreviewEditor(
178178
background = UIUtil.getPanelBackground()
179179
border = CompoundBorder(
180180
BorderFactory.createMatteBorder(1, 0, 0, 0, borderColor),
181-
JBUI.Borders.empty(16)
181+
JBUI.Borders.empty(4)
182182
)
183183
}
184184

185185
val chatbotPanel = BorderLayoutPanel().apply {
186186
background = UIUtil.getPanelBackground()
187-
border = JBUI.Borders.emptyBottom(12)
187+
border = JBUI.Borders.emptyBottom(0)
188188
}
189189

190-
val selectorPanel = JPanel(FlowLayout(FlowLayout.LEFT, 8, 0)).apply {
190+
val selectorPanel = JPanel(FlowLayout(FlowLayout.LEFT, 0, 0)).apply {
191191
background = UIUtil.getPanelBackground()
192192
}
193193

194-
val chatbotLabel = JBLabel("Chatbot:").apply {
195-
font = JBUI.Fonts.label(14.0f)
196-
}
194+
val chatbotLabel = JBLabel("Model")
197195

198196
val llmConfigs = LlmConfig.load()
199197
val modelNames = if (llmConfigs.isEmpty()) {
@@ -202,12 +200,9 @@ open class McpPreviewEditor(
202200
llmConfigs.map { it.name }.toTypedArray()
203201
}
204202

205-
chatbotSelector = com.intellij.openapi.ui.ComboBox(modelNames).apply {
206-
font = JBUI.Fonts.label(14.0f)
207-
}
203+
chatbotSelector = com.intellij.openapi.ui.ComboBox(modelNames)
208204

209205
configButton = JButton("Configure").apply {
210-
font = JBUI.Fonts.label(14.0f)
211206
isFocusPainted = false
212207
addActionListener { showConfigDialog() }
213208
}
@@ -229,20 +224,19 @@ open class McpPreviewEditor(
229224
}
230225

231226
chatInput = JBTextField().apply {
232-
font = JBUI.Fonts.label(14.0f)
233227
border = CompoundBorder(
234228
BorderFactory.createLineBorder(borderColor),
235-
JBUI.Borders.empty(8)
229+
JBUI.Borders.empty(4)
236230
)
237231
addActionListener { sendMessage() }
238232
}
239233

240-
val sendPresentation = Presentation("Send").apply {
234+
val sendPresentation = Presentation("Test").apply {
241235
icon = AutoDevIcons.SEND
242-
description = "Send message"
236+
description = "Test Called tools"
243237
}
244238

245-
sendButton = ActionButton(
239+
testButton = ActionButton(
246240
DumbAwareAction.create { sendMessage() },
247241
sendPresentation,
248242
"McpSendAction",
@@ -251,7 +245,7 @@ open class McpPreviewEditor(
251245
val sendButtonPanel = JPanel(FlowLayout(FlowLayout.CENTER, 0, 0)).apply {
252246
background = UIUtil.getPanelBackground()
253247
isOpaque = false
254-
add(sendButton)
248+
add(testButton)
255249
}
256250

257251
inputPanel.addToCenter(chatInput)
@@ -276,7 +270,6 @@ open class McpPreviewEditor(
276270

277271
if (allTools.isEmpty()) {
278272
val noToolsLabel = JBLabel("No tools available. Please check MCP server configuration.").apply {
279-
font = JBUI.Fonts.label(14.0f)
280273
foreground = textGray
281274
horizontalAlignment = SwingConstants.CENTER
282275
}

0 commit comments

Comments
 (0)