Skip to content

Commit ae63156

Browse files
committed
feat: add external upgrade plan link to error notification
1 parent 9b716a4 commit ae63156

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/main/kotlin/ee/carlrobert/codegpt/actions/editor/EditCodeCompletionListener.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package ee.carlrobert.codegpt.actions.editor
22

3+
import com.intellij.ide.BrowserUtil
4+
import com.intellij.notification.NotificationAction
35
import com.intellij.notification.NotificationType
46
import com.intellij.openapi.application.runInEdt
57
import com.intellij.openapi.application.runUndoTransparentWriteAction
@@ -37,9 +39,13 @@ class EditCodeCompletionListener(
3739

3840
override fun onError(error: ErrorDetails, ex: Throwable) {
3941
observableProperties.loading.set(false)
42+
4043
OverlayUtil.showNotification(
41-
"Something went wrong while requesting completion. Please try again.",
42-
NotificationType.ERROR
44+
error.message,
45+
NotificationType.ERROR,
46+
NotificationAction.createSimpleExpiring("Upgrade plan") {
47+
BrowserUtil.open("https://codegpt.ee/#pricing")
48+
},
4349
)
4450
}
4551

0 commit comments

Comments
 (0)