mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-20 17:52:23 +00:00
feat: add external upgrade plan link to error notification
This commit is contained in:
parent
b7c4ce973d
commit
acd0e10ed8
1 changed files with 8 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package ee.carlrobert.codegpt.actions.editor
|
||||
|
||||
import com.intellij.ide.BrowserUtil
|
||||
import com.intellij.notification.NotificationAction
|
||||
import com.intellij.notification.NotificationType
|
||||
import com.intellij.openapi.application.runInEdt
|
||||
import com.intellij.openapi.application.runUndoTransparentWriteAction
|
||||
|
|
@ -37,9 +39,13 @@ class EditCodeCompletionListener(
|
|||
|
||||
override fun onError(error: ErrorDetails, ex: Throwable) {
|
||||
observableProperties.loading.set(false)
|
||||
|
||||
OverlayUtil.showNotification(
|
||||
"Something went wrong while requesting completion. Please try again.",
|
||||
NotificationType.ERROR
|
||||
error.message,
|
||||
NotificationType.ERROR,
|
||||
NotificationAction.createSimpleExpiring("Upgrade plan") {
|
||||
BrowserUtil.open("https://codegpt.ee/#pricing")
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue