(_: unknown, msg: IMessage)
| 112 | } |
| 113 | this.hookedSesions.add(session); |
| 114 | const handler = (_: unknown, msg: IMessage) => { |
| 115 | if (msg.header.msg_type !== 'update_display_data' && msg.header.msg_type !== 'display_data') { |
| 116 | return; |
| 117 | } |
| 118 | const iopubMsg = msg as KernelMessage.IUpdateDisplayDataMsg | KernelMessage.IDisplayDataMsg; |
| 119 | const displayId = iopubMsg.content.transient?.display_id; |
| 120 | if (!displayId || !isDisplayIdTrackedForAnExtension(session, displayId)) { |
| 121 | return; |
| 122 | } |
| 123 | const newOutput = cellOutputToVSCCellOutput({ |
| 124 | output_type: 'display_data', |
| 125 | data: iopubMsg.content.data, |
| 126 | metadata: iopubMsg.content.metadata, |
| 127 | transient: iopubMsg.content.transient |
| 128 | } as nbformat.IDisplayData); |
| 129 | this._onDidReceiveDisplayUpdate.fire(newOutput); |
| 130 | }; |
| 131 | session.iopubMessage.connect(handler); |
| 132 | this.disposables.push({ |
| 133 | dispose: () => { |
nothing calls this directly
no test coverage detected