From ea0c267815fbd549cf1c5351d08e7cd9196d0a1e Mon Sep 17 00:00:00 2001 From: Konstantin Hudyakov Date: Mon, 14 Apr 2025 17:35:16 +0300 Subject: [PATCH] [terminal] IJ-CR-160250 Clarify the requirements for the RPC method that returns the channel GitOrigin-RevId: 5f6c8a84da8062db07067e307c63a8a94cee8559 --- .../block/reworked/session/rpc/TerminalSessionApi.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/session/rpc/TerminalSessionApi.kt b/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/session/rpc/TerminalSessionApi.kt index 5efd34b1052b..4af5614ba75b 100644 --- a/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/session/rpc/TerminalSessionApi.kt +++ b/plugins/terminal/src/org/jetbrains/plugins/terminal/block/reworked/session/rpc/TerminalSessionApi.kt @@ -14,6 +14,11 @@ import org.jetbrains.annotations.ApiStatus @ApiStatus.Internal @Rpc interface TerminalSessionApi : RemoteApi { + /** + * Note, that implementation should return the separate instance of the channel at least for each [com.intellij.codeWithMe.ClientId]. + * Because the RPC logic closes the returned channel once the client disconnects, + * so it may interrupt the reading of the channel on the backend. + */ suspend fun getInputChannel(sessionId: TerminalSessionId): SendChannel suspend fun getOutputFlow(sessionId: TerminalSessionId): Flow>