Add support for isWorkspaceRemote message type in IntelliJ extension

This commit is contained in:
Nate 2025-07-02 13:27:12 -07:00
parent d82adcc130
commit a61722ffe0
2 changed files with 9 additions and 3 deletions

View file

@ -41,11 +41,12 @@ class MessageTypes {
"getTerminalContents",
"showToast",
"openUrl",
"isWorkspaceRemote",
// These only come from the GUI for now but should be here to prevent confusion
"toggleDevTools",
"showTutorial",
// These are jetbrains only and only come from the GUI for now
// But again including for consistency
"copyText",

View file

@ -202,6 +202,11 @@ class IdeProtocolClient(
respond(contents)
}
"isWorkspaceRemote" -> {
val isRemote = ide.isWorkspaceRemote()
respond(isRemote)
}
"saveFile" -> {
val params = Gson().fromJson(
dataElement.toString(),
@ -475,7 +480,7 @@ class IdeProtocolClient(
val editor = EditorUtils.getEditor(project)
val rif = editor?.getHighlightedRIF() ?: return
val serializedRif = com.github.continuedev.continueintellijextension.RangeInFileWithContents(
val serializedRif = com.github.continuedev.continueintellijextension.RangeInFileWithContents(
filepath = rif.filepath,
range = rif.range,
contents = rif.contents