MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / getPlainTextOrStreamOutput

Function getPlainTextOrStreamOutput

src/kernels/kernel.ts:1185–1198  ·  view source on GitHub ↗
(outputs: nbformat.IOutput[])

Source from the content-addressed store, hash-verified

1183 * From the outputs, get the text/plain or stream outputs as a simple string.
1184 */
1185export 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
1200function getKernelStartupLogMessage(kernel: IBaseKernel, displayOptions: DisplayOptions) {
1201 // No need to block kernel startup on UI updates.

Callers 4

api.vscode.test.tsFile · 0.90
startDebugSessionMethod · 0.90
appendDebuggerPathsMethod · 0.90
connectToLocalMethod · 0.90

Calls 1

concatMultilineStringFunction · 0.90

Tested by

no test coverage detected