Skip to content

Commit 768e4c0

Browse files
committed
feat(gui): add resetAgent() method to clear custom agent selection in chat coding panel and input section. #51
1 parent 16240e0 commit 768e4c0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/kotlin/cc/unitmesh/devti/gui/chat/ChatCodingPanel.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ class ChatCodingPanel(private val chatCodingService: ChatCodingService, val disp
227227
this.focusInput()
228228
}
229229

230-
// TODO: add session and stop manage
231-
fun clearChat() {
230+
/**
231+
* Resets the chat session by clearing the current session and updating the UI.
232+
*/
233+
fun resetChatSession() {
232234
chatCodingService.clearSession()
233235
progressBar.isVisible = false
234236
myList.removeAll()

src/main/kotlin/cc/unitmesh/devti/gui/toolbar/NewChatAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class NewChatAction : DumbAwareAction(), CustomComponentAction {
4747
return@addActionListener
4848
}
4949

50-
codingPanel.clearChat()
50+
codingPanel.resetChatSession()
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)