diff --git a/src/main/kotlin/org/jetbrains/kotlin/jupyter/connection.kt b/src/main/kotlin/org/jetbrains/kotlin/jupyter/connection.kt index d9aa03e13..78bf2dba2 100644 --- a/src/main/kotlin/org/jetbrains/kotlin/jupyter/connection.kt +++ b/src/main/kotlin/org/jetbrains/kotlin/jupyter/connection.kt @@ -31,7 +31,6 @@ class JupyterConnection(val config: KernelConfig): Closeable { connection.iopub.send(makeReplyMessage(msg, "status", content = jsonObject("execution_state" to status))) } - //fun send fun sendWrapped(incomingMessage: Message, msg: Message) { sendStatus("busy", incomingMessage) send(msg) diff --git a/src/main/kotlin/org/jetbrains/kotlin/jupyter/protocol.kt b/src/main/kotlin/org/jetbrains/kotlin/jupyter/protocol.kt index a7c5b7aa5..8a14c1a18 100644 --- a/src/main/kotlin/org/jetbrains/kotlin/jupyter/protocol.kt +++ b/src/main/kotlin/org/jetbrains/kotlin/jupyter/protocol.kt @@ -25,16 +25,22 @@ fun JupyterConnection.Socket.shellMessagesHandler(msg: Message, repl: ReplForJup when (msgType) { "kernel_info_request" -> sendWrapped(msg, makeReplyMessage(msg, "kernel_info_reply", - content = jsonObject( - "protocol_version" to protocolVersion, - "language" to "Kotlin", - "language_version" to KotlinCompilerVersion.VERSION, - "language_info" to jsonObject( - "name" to "kotlin", - "codemirror_mode" to "text/x-kotlin", - "file_extension" to "kt" - ) - ))) + content = jsonObject( + "protocol_version" to protocolVersion, + "language" to "Kotlin", + "language_version" to KotlinCompilerVersion.VERSION, + "language_info" to jsonObject( + "name" to "kotlin", + "codemirror_mode" to "text/x-kotlin", + "file_extension" to "kt" + ), + + // Jupyter lab Console support + "banner" to "Kotlin language, version ${KotlinCompilerVersion.VERSION}", + "implementation" to "Kotlin", + "implementation_version" to KotlinCompilerVersion.VERSION, + "status" to "ok" + ))) "history_request" -> sendWrapped(msg, makeReplyMessage(msg, "history_reply", content = jsonObject(