Skip to content

Commit b6587f2

Browse files
committed
fix(custom-agent): ensure null safety in agent state resetting #51
1 parent e10a195 commit b6587f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/customize/customize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
title: Agent
3+
title: Customize Features
44
nav_order: 5
55
has_children: true
66
---

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ class AutoDevInputSection(private val project: Project, val disposable: Disposab
223223
}
224224

225225
fun resetAgent() {
226-
(customRag.selectedItem as CustomAgentConfig).state = CustomAgentState.START
226+
(customRag.selectedItem as? CustomAgentConfig)?.state.let {
227+
CustomAgentState.START
228+
}
229+
227230
customRag.selectedItem = defaultRag
228231
}
229232

0 commit comments

Comments
 (0)