Skip to content

Commit 3890a73

Browse files
committed
fix(actions): add ActionUpdateThread.EDT to ensure UI updates occur on the new EDT thread for smoother user experience.
1 parent a6614a3 commit 3890a73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/kotlin/cc/unitmesh/devti/actions/chat/base/ChatBaseAction.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import cc.unitmesh.devti.gui.chat.ChatCodingPanel
55
import cc.unitmesh.devti.gui.chat.ChatContext
66
import cc.unitmesh.devti.provider.ContextPrompter
77
import cc.unitmesh.devti.gui.sendToChatPanel
8+
import com.intellij.openapi.actionSystem.ActionUpdateThread
89
import com.intellij.openapi.actionSystem.AnAction
910
import com.intellij.openapi.actionSystem.AnActionEvent
1011
import com.intellij.openapi.actionSystem.CommonDataKeys
@@ -19,6 +20,8 @@ abstract class ChatBaseAction : AnAction() {
1920
private val logger = logger<ChatBaseAction>()
2021
}
2122

23+
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.EDT
24+
2225
open fun chatCompletedPostAction(event: AnActionEvent, panel: ChatCodingPanel): ((response: String) -> Unit)? = null
2326

2427
abstract fun getActionType(): ChatActionType

0 commit comments

Comments
 (0)