Skip to content

Commit

Permalink
Merge pull request #3810 from continuedev/dallin/jetbrains-apply-button
Browse files Browse the repository at this point in the history
Jetbrains apply button fix
  • Loading branch information
sestinj authored Jan 22, 2025
2 parents a2a7e7a + a304f3e commit aaf1a60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ class CoreMessengerManager(
coreMessenger = CoreMessenger(project, continueCorePath, ideProtocolClient, coroutineScope)

coreMessenger?.request("config/getSerializedProfileInfo", null, null) { response ->
val result = (response as Map<String, Any>)["result"] as Map<String, Any>
val responseObject = response as Map<*, *>
val responseContent = responseObject["content"] as Map<*, *>
val result = responseContent["result"] as Map<*, *>
val config = result["config"] as Map<String, Any>

val allowAnonymousTelemetry = config?.get("allowAnonymousTelemetry") as? Boolean
val telemetryService = service<TelemetryService>()
if (allowAnonymousTelemetry == true || allowAnonymousTelemetry == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,11 @@ class IdeProtocolClient(
null,
null
) { response ->
val result = (response as Map<String, Any>)["result"] as Map<String, Any>
val responseObject = response as Map<*, *>
val responseContent = responseObject["content"] as Map<*, *>
val result = responseContent["result"] as Map<*, *>
val config = result["config"] as Map<String, Any>

val applyCodeBlockModel = getModelByRole(config, "applyCodeBlock")

if (applyCodeBlockModel != null) {
Expand All @@ -451,7 +454,6 @@ class IdeProtocolClient(
config["models"] as List<Map<String, Any>>
val curSelectedModel = models.find { it["title"] == params.curSelectedModelTitle }

// continuation.resume(curSelectedModel)
if (curSelectedModel == null) {
return@request
} else {
Expand Down

0 comments on commit aaf1a60

Please sign in to comment.