Skip to content

Commit

Permalink
Fixes fro review
Browse files Browse the repository at this point in the history
  • Loading branch information
pkukielka committed Aug 19, 2024
1 parent 4729e41 commit a016e2e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 83 deletions.
21 changes: 0 additions & 21 deletions src/main/kotlin/com/sourcegraph/cody/agent/CodyAgentClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.sourcegraph.cody.agent

import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.runInEdt
import com.intellij.openapi.components.service
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.project.Project
import com.sourcegraph.cody.agent.protocol.ProtocolTextDocument
Expand Down Expand Up @@ -36,9 +35,6 @@ class CodyAgentClient(private val project: Project, private val webview: NativeW
private val logger = Logger.getInstance(CodyAgentClient::class.java)
}

// Callback that is invoked when the agent sends a "setConfigFeatures" message.
var onSetConfigFeatures: ConfigFeaturesObserver = project.service<CurrentConfigFeatures>()

/**
* Helper to run client request/notification handlers on the IntelliJ event thread. Use this
* helper for handlers that require access to the IntelliJ editor, for example to read the text
Expand Down Expand Up @@ -191,21 +187,4 @@ class CodyAgentClient(private val project: Project, private val webview: NativeW
// TODO: Implement this.
println("TODO, implement webview/dispose")
}

// TODO: Remove this
@JsonNotification("webview/postMessage")
fun webviewPostMessage(params: WebviewPostMessageParams) {
if (params.message.type == ExtensionMessage.Type.SET_CONFIG_FEATURES) {
runInEdt { onSetConfigFeatures.update(params.message.configFeatures) }
}

logger.debug("webview/postMessage ${params.id}: ${params.message}")
}

// TODO: Remove this
@JsonRequest("webview/create")
fun webviewCreate(params: WebviewCreateParams): CompletableFuture<Void> {
logger.error("webview/create This request should not happen if you are using chat/new.")
return CompletableFuture.completedFuture(null)
}
}
62 changes: 0 additions & 62 deletions src/test/kotlin/com/sourcegraph/cody/agent/CodyAgentClientTest.kt

This file was deleted.

0 comments on commit a016e2e

Please sign in to comment.