(outputs: nbformat.IOutput[])
| 1183 | * From the outputs, get the text/plain or stream outputs as a simple string. |
| 1184 | */ |
| 1185 | export function getPlainTextOrStreamOutput(outputs: nbformat.IOutput[]) { |
| 1186 | if (outputs.length > 0) { |
| 1187 | const data = outputs[0].data; |
| 1188 | if (data && data.hasOwnProperty('text/plain')) { |
| 1189 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 1190 | return concatMultilineString((data as any)['text/plain']); |
| 1191 | } |
| 1192 | if (outputs[0].output_type === 'stream') { |
| 1193 | const stream = outputs[0] as nbformat.IStream; |
| 1194 | return concatMultilineString(stream.text); |
| 1195 | } |
| 1196 | } |
| 1197 | return; |
| 1198 | } |
| 1199 | |
| 1200 | function getKernelStartupLogMessage(kernel: IBaseKernel, displayOptions: DisplayOptions) { |
| 1201 | // No need to block kernel startup on UI updates. |
no test coverage detected