Skip to content

Commit 15660fb

Browse files
authored
Merge pull request #5892 from continuedev/dallin/jetbrains-highlighted-code
Fix Cmd J not working in Jetbrains
2 parents 413f685 + 59647a3 commit 15660fb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,16 @@ class IdeProtocolClient(
504504
val editor = EditorUtils.getEditor(project)
505505
val rif = editor?.getHighlightedRIF() ?: return
506506

507+
val serializedRif = com.github.continuedev.continueintellijextension.RangeInFileWithContents(
508+
filepath = rif.filepath,
509+
range = rif.range,
510+
contents = rif.contents
511+
)
512+
507513
continuePluginService.sendToWebview(
508514
"highlightedCode",
509515
HighlightedCodePayload(
510-
rangeInFileWithContents = rif,
516+
rangeInFileWithContents = serializedRif,
511517
shouldRun = edit
512518
)
513519
)

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/types.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ data class ApplyState(
232232
)
233233

234234
data class HighlightedCodePayload(
235-
val rangeInFileWithContents: RangeInFileWithContents,
235+
val rangeInFileWithContents: com.github.continuedev.continueintellijextension.RangeInFileWithContents,
236236
val prompt: String? = null,
237237
val shouldRun: Boolean? = null
238238
)

0 commit comments

Comments
 (0)