Skip to content

Commit 25d8df6

Browse files
committed
fix(chat): handle index not ready exception with notification
Add a warning notification when the index is not ready during code completion to improve user feedback.
1 parent ebbb7e8 commit 25d8df6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/kotlin/cc/unitmesh/devti/actions/chat/CodeCompleteChatAction.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cc.unitmesh.devti.actions.chat
22

3+
import cc.unitmesh.devti.AutoDevNotifications
34
import cc.unitmesh.devti.gui.AutoDevToolWindowFactory
45
import cc.unitmesh.devti.gui.chat.message.ChatActionType
56
import cc.unitmesh.devti.gui.chat.NormalChatCodingPanel
@@ -75,6 +76,7 @@ class CodeCompleteChatAction : AnAction() {
7576
chatCodingService.handlePromptAndResponse(contentPanel, prompter, chatContext, true)
7677
}
7778
} catch (ignore: IndexNotReadyException) {
79+
AutoDevNotifications.warn(project, "Index not ready")
7880
return@runReadAction
7981
}
8082
}

0 commit comments

Comments
 (0)