Skip to content

Commit 4cef76c

Browse files
committed
feat(gui): replace AutoDevIcons with NewChatAction and simplify MessageView- Remove unused import of AutoDevIcons in MessageView.kt
- Add import of NewChatAction in NormalChatActionButton(NewSketchAction()) with createActionButtonCodingPanel.kt - Replace create(NewChatAction()) - Simplify header border in NormalChatCodingPanel.kt
1 parent 2c9769e commit 4cef76c

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/NormalChatCodingPanel.kt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import cc.unitmesh.devti.gui.chat.ui.AutoDevInputSection
1414
import cc.unitmesh.devti.gui.chat.ui.AutoDevInputTrigger
1515
import cc.unitmesh.devti.gui.chat.view.MessageView
1616
import cc.unitmesh.devti.gui.toolbar.CopyAllMessagesAction
17+
import cc.unitmesh.devti.gui.toolbar.NewChatAction
1718
import cc.unitmesh.devti.gui.toolbar.NewSketchAction
1819
import cc.unitmesh.devti.provider.TextContextPrompter
1920
import cc.unitmesh.devti.provider.devins.LanguageProcessor
@@ -144,22 +145,17 @@ class NormalChatCodingPanel(private val chatCodingService: ChatCodingService, va
144145
.runProcessWithProgressAsynchronously(task, BackgroundableProcessIndicator(task))
145146
}
146147
})
147-
148-
149148
val header = panel {
150149
row {
151150
val buttonBox = Box.createHorizontalBox()
152151
buttonBox.add(Box.createHorizontalGlue())
153-
buttonBox.add(createActionButton(NewSketchAction()))
152+
buttonBox.add(createActionButton(NewChatAction()))
154153
buttonBox.add(createActionButton(CopyAllMessagesAction()))
155154
cell(buttonBox).alignRight()
156155
}
157156
}
158157

159-
header.border = JBUI.Borders.compound(
160-
JBUI.Borders.customLine(UIUtil.getBoundsColor(), 0, 0, 1, 0),
161-
JBUI.Borders.empty(0, 4)
162-
)
158+
header.border = JBUI.Borders.customLine(UIUtil.getBoundsColor(), 0, 0, 1, 0)
163159

164160
panelContent = panel {
165161
row { cell(header).fullWidth() }
@@ -169,7 +165,6 @@ class NormalChatCodingPanel(private val chatCodingService: ChatCodingService, va
169165
row {
170166
cell(inputSection).fullWidth()
171167
}
172-
173168
}.also {
174169
it.border = JBUI.Borders.empty()
175170
it.background = PanelBackground

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/view/MessageView.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package cc.unitmesh.devti.gui.chat.view
22

3-
import cc.unitmesh.devti.AutoDevIcons
43
import cc.unitmesh.devti.gui.chat.message.ChatRole
54
import cc.unitmesh.devti.inline.fullWidth
65
import cc.unitmesh.devti.sketch.ui.ExtensionLangSketch

0 commit comments

Comments
 (0)