-
Notifications
You must be signed in to change notification settings - Fork 269
merge: support chat on remote connections #6008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…anes on local or remote (#5463) * Fixing bugs IDE-16164 and IDE-16163
This reverts commit a5e07dd.
…#5489) https://developer.mozilla.org/en-US/docs/Web/API/Clipboard `navigator.clipboard` is only accessible from a "secure context", which JCEF does not think we are using, because the URI authority is not localhost or https. Since we are hooking onto the CEF resource request handler, it does not matter what we use for the scheme/authority as long as there is no conflict with real resources. Previous implementation used a different load mechanism which somehow met the secure context criteria.
Merge main into feature/remote-chat-lsp
on remote, it can take 10+ seconds for chat to be visible. additionally, delete some unneeded assets to slightly reduce load time
Per internal discussion, feature deemed not ready for external users due to https://youtrack.jetbrains.com/issue/IJPL-203169
Qodana Community for JVM13 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
@@ -139,7 +142,7 @@ | |||
|
|||
ApplicationManager.getApplication().invokeAndWait { | |||
selectionRange = ApplicationManager.getApplication().runReadAction<Range?> { | |||
val editor = FileEditorManager.getInstance(project).selectedTextEditor | |||
val editor = FileEditorManager.getInstance(project).selectedTextEditorWithRemotes.firstOrNull() |
Check warning
Code scanning / QDJVMC
Unstable API Usage Warning
@@ -217,7 +217,7 @@ | |||
logger.debug { "$FEATURE_NAME: Processing InsertCodeAtCursorPosition: $message" } | |||
|
|||
withContext(EDT) { | |||
val editor: Editor = FileEditorManager.getInstance(context.project).selectedTextEditor ?: return@withContext | |||
val editor: Editor = FileEditorManager.getInstance(context.project).selectedTextEditorWithRemotes.firstOrNull() ?: return@withContext |
Check warning
Code scanning / QDJVMC
Unstable API Usage Warning
@@ -178,7 +178,7 @@ | |||
|
|||
override suspend fun processInsertCodeAtCursorPosition(message: IncomingCwcMessage.InsertCodeAtCursorPosition) { | |||
withContext(EDT) { | |||
val editor: Editor = FileEditorManager.getInstance(context.project).selectedTextEditor ?: return@withContext | |||
val editor: Editor = FileEditorManager.getInstance(context.project).selectedTextEditorWithRemotes.firstOrNull() ?: return@withContext |
Check warning
Code scanning / QDJVMC
Unstable API Usage Warning
val editor = computeOnEdt { | ||
FileEditorManager.getInstance(project).selectedTextEditor | ||
when { | ||
isRunningOnRemoteBackend() -> editorManager.selectedTextEditorWithRemotes.firstOrNull() |
Check warning
Code scanning / QDJVMC
Unstable API Usage Warning
val editor = computeOnEdt { | ||
FileEditorManager.getInstance(project).selectedTextEditor | ||
when { | ||
isRunningOnRemoteBackend() -> editorManager.selectedTextEditorWithRemotes.firstOrNull() |
Check warning
Code scanning / QDJVMC
Unstable API Usage Warning
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.wm.ToolWindow | ||
|
||
class DefaultProblemsViewMutator : ProblemsViewMutator { |
Check warning
Code scanning / QDJVMC
Extension class should be final and non-public Warning
) : CefRequestHandlerAdapter() { | ||
private val myResources: MutableMap<String, () -> CefResourceHandler?> = HashMap() | ||
|
||
private val REJECTING_RESOURCE_HANDLER: CefResourceHandler = object : CefResourceHandlerAdapter() { |
Check notice
Code scanning / QDJVMC
Private property naming convention Note
} | ||
} | ||
|
||
private val RESOURCE_REQUEST_HANDLER = resourceHandlerWrapper { path -> |
Check notice
Code scanning / QDJVMC
Private property naming convention Note
private fun streamHandler(path: String, stream: InputStream) = | ||
JBCefStreamResourceHandler( | ||
stream, | ||
if (path.endsWith(".wasm") == true) "application/wasm" else URLConnection.getFileNameMap().getContentTypeFor(path), |
Check notice
Code scanning / QDJVMC
Boolean expression can be simplified Note
} | ||
} | ||
|
||
fun addResource(path: String, stream: InputStream?) = |
Check warning
Code scanning / QDJVMC
Unused symbol Warning
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.