diff --git a/gradle.properties b/gradle.properties index 3b93dde47a..8913062bfd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,4 +24,4 @@ kotlin.stdlib.default.dependency=false nodeBinaries.commit=8755ae4c05fd476cd23f2972049111ba436c86d4 nodeBinaries.version=v20.12.2 cody.autocomplete.enableFormatting=true -cody.commit=65a42c66054cdbe2872de865835167eed9fabc20 +cody.commit=aa6e4fe6f24bede84f304705eeaf68ba2ef3546f diff --git a/src/main/kotlin/com/sourcegraph/cody/agent/CodyAgent.kt b/src/main/kotlin/com/sourcegraph/cody/agent/CodyAgent.kt index fc19b7e59d..763e446bd9 100644 --- a/src/main/kotlin/com/sourcegraph/cody/agent/CodyAgent.kt +++ b/src/main/kotlin/com/sourcegraph/cody/agent/CodyAgent.kt @@ -150,14 +150,20 @@ private constructor( val token = CancellationToken() val binaryPath = nodeBinary(token).absolutePath + val jsonRpcArgs = arrayOf("api", "jsonrpc-stdio") val command: List = if (System.getenv("CODY_DIR") != null) { val script = File(System.getenv("CODY_DIR"), "agent/dist/index.js") logger.info("using Cody agent script " + script.absolutePath) if (shouldSpawnDebuggableAgent()) { - listOf(binaryPath, "--inspect-brk", "--enable-source-maps", script.absolutePath) + listOf( + binaryPath, + "--inspect-brk", + "--enable-source-maps", + script.absolutePath, + *jsonRpcArgs) } else { - listOf(binaryPath, "--enable-source-maps", script.absolutePath) + listOf(binaryPath, "--enable-source-maps", script.absolutePath, *jsonRpcArgs) } } else { val script = @@ -165,9 +171,14 @@ private constructor( ?: throw CodyAgentException( "Sourcegraph Cody + Code Search plugin path not found") if (shouldSpawnDebuggableAgent()) { - listOf(binaryPath, "--inspect", "--enable-source-maps", script.toFile().absolutePath) + listOf( + binaryPath, + "--inspect", + "--enable-source-maps", + script.toFile().absolutePath, + *jsonRpcArgs) } else { - listOf(binaryPath, script.toFile().absolutePath) + listOf(binaryPath, script.toFile().absolutePath, *jsonRpcArgs) } }