Skip to content

Commit 9d96605

Browse files
committed
refactor(devti): update action update thread for UI-related actions
- Set EditPlanAction to update on EDT (Event Dispatch Thread) for UI consistency- Change PlanReviewAction from BGT to EDT for improved UI responsiveness
1 parent 44feba8 commit 9d96605

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/src/main/kotlin/cc/unitmesh/devti/observer/plan/EditPlanAction.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ import cc.unitmesh.devti.gui.chat.message.ChatActionType
77
import com.intellij.openapi.actionSystem.AnAction
88
import com.intellij.openapi.actionSystem.AnActionEvent
99
import cc.unitmesh.devti.observer.agent.AgentStateService
10+
import com.intellij.openapi.actionSystem.ActionUpdateThread
1011

1112
class EditPlanAction : AnAction(AutoDevBundle.message("sketch.plan.edit")) {
13+
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT
14+
1215
override fun actionPerformed(event: AnActionEvent) {
1316
val project = event.project ?: return
1417

core/src/main/kotlin/cc/unitmesh/devti/observer/plan/PlanReviewAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import kotlinx.coroutines.launch
2020
import kotlinx.coroutines.runBlocking
2121

2222
class PlanReviewAction : AnAction(AutoDevBundle.message("sketch.plan.review"), null, AutoDevIcons.REVIEWER) {
23-
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
23+
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT
2424

2525
override fun actionPerformed(anActionEvent: AnActionEvent) {
2626
val project = anActionEvent.project ?: return

0 commit comments

Comments
 (0)