Skip to content

Commit d8b27d8

Browse files
mitya52reymondzzzz
authored andcommitted
add warning for 2025* versions with link to the docs
1 parent 2ba458d commit d8b27d8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/main/kotlin/com/smallcloud/refactai/Initializer.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.smallcloud.refactai
22

3+
import com.intellij.openapi.application.ApplicationInfo
4+
import com.intellij.openapi.util.registry.Registry
35
import com.intellij.ui.jcef.JBCefApp
46
import com.intellij.ide.plugins.PluginInstaller
57
import com.intellij.openapi.Disposable
@@ -39,6 +41,21 @@ class Initializer : ProjectActivity, Disposable {
3941
if (!JBCefApp.isSupported()) {
4042
emitInfo(RefactAIBundle.message("notifications.chatCanNotStartWarning"), false)
4143
}
44+
45+
// notifications.chatCanFreezeWarning
46+
// Show warning for 2025.* IDE versions with JCEF out-of-process enabled
47+
if (JBCefApp.isSupported()) {
48+
val appInfo = ApplicationInfo.getInstance()
49+
val is2025 = appInfo.majorVersion == "2025"
50+
val outOfProc = try {
51+
Registry.get("ide.browser.jcef.out-of-process.enabled").asBoolean()
52+
} catch (_: Throwable) {
53+
false
54+
}
55+
if (is2025 && outOfProc) {
56+
emitInfo(RefactAIBundle.message("notifications.chatCanFreezeWarning"), false)
57+
}
58+
}
4259
}
4360
getLSPProcessHolder(project)
4461
project.getService(LSPActiveDocNotifierService::class.java)

src/main/resources/bundles/RefactAI.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ statusBar.notificationAstVecdbLimitMsg=AST or VecDB file number limit reached, y
6363
6464
errorReport.actionText=Open GitHub Issue
6565
notifications.chatCanNotStartWarning=<html>The chat feature could not start in your JetBrains IDE. Please refer to the <a href="https://docs.refact.ai/guides/plugins/jetbrains/troubleshooting/">documentation</a> for setup and troubleshooting steps.</html>
66+
notifications.chatCanFreezeWarning=<html>The plugin requires VM changes to work with your JetBrains IDE. Please refer to the <a href="https://docs.refact.ai/guides/plugins/jetbrains/troubleshooting/">documentation</a> for VM flags setup steps.</html>
6667
6768
codeVision.openChat.name=Refact.ai Hint(Open Chat)
6869
codeVision.problems.name=Refact.ai Hint(Find Problems)

0 commit comments

Comments
 (0)