Skip to content

Commit

Permalink
fix new file event
Browse files Browse the repository at this point in the history
  • Loading branch information
reymondzzzz committed Sep 5, 2024
1 parent 5b16800 commit 1413387
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Events {
if(type == null) return null

return when(type) {
EventNames.FromChat.NEW_FILE.value -> p2?.deserialize(payload, Editor.NewFile::class.java)
EventNames.FromChat.NEW_FILE.value -> payload?.asString?.let { Editor.NewFile(it) }
EventNames.FromChat.OPEN_SETTINGS.value -> OpenSettings()
EventNames.FromChat.SETUP_HOST.value -> {
val host = p2?.deserialize<Host>(payload, Host::class.java) ?: return null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.smallcloud.refactai.panes.sharedchat.browser

import com.intellij.openapi.project.DumbAware
import com.smallcloud.refactai.io.Response
import com.smallcloud.refactai.io.sendRequest
import org.cef.browser.CefBrowser
import org.cef.browser.CefFrame
import org.cef.callback.CefCallback
Expand All @@ -15,10 +13,7 @@ import org.cef.network.CefRequest
import org.cef.network.CefResponse
import java.io.IOException
import java.io.InputStream
import java.net.HttpURLConnection
import java.net.URI
import java.net.URLConnection
import java.util.concurrent.Future

class RequestHandlerFactory : CefSchemeHandlerFactory {
override fun create(
Expand Down

0 comments on commit 1413387

Please sign in to comment.