Skip to content

Commit 47a1e49

Browse files
committed
refactor(agent): print file paths and improve reset state functionality
- Print beforeFilePath and afterFilePath for debugging purposes - Refactor resetState function to use a val for syncPublisher - Add call to onUpdateChange method in resetState
1 parent 4786458 commit 47a1e49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/kotlin/cc/unitmesh/devti/observer/agent/AgentStateService.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,11 @@ class AgentStateService(val project: Project) {
193193

194194
fun resetState() {
195195
state = AgentState()
196-
ApplicationManager.getApplication().messageBus
196+
val syncPublisher = ApplicationManager.getApplication().messageBus
197197
.syncPublisher(PlanUpdateListener.TOPIC)
198-
.onPlanUpdate(mutableListOf())
198+
199+
syncPublisher.onUpdateChange(mutableListOf())
200+
syncPublisher.onPlanUpdate(mutableListOf())
199201
}
200202

201203
fun getPlan(): MutableList<AgentTaskEntry> {

0 commit comments

Comments
 (0)