@@ -37,7 +37,7 @@ import { NOTEBOOK_WEBVIEW_BOUNDARY } from 'vs/workbench/contrib/notebook/browser
37
37
import { preloadsScriptStr } from 'vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads' ;
38
38
import { transformWebviewThemeVars } from 'vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping' ;
39
39
import { MarkupCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel' ;
40
- import { CellUri , INotebookRendererInfo , NotebookSetting , RendererMessagingSpec } from 'vs/workbench/contrib/notebook/common/notebookCommon' ;
40
+ import { CellUri , INotebookRendererInfo , isTextStreamMime , NotebookSetting , RendererMessagingSpec } from 'vs/workbench/contrib/notebook/common/notebookCommon' ;
41
41
import { INotebookKernel } from 'vs/workbench/contrib/notebook/common/notebookKernelService' ;
42
42
import { IScopedRendererMessaging } from 'vs/workbench/contrib/notebook/common/notebookRendererMessagingService' ;
43
43
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService' ;
@@ -46,6 +46,7 @@ import { WebviewWindowDragMonitor } from 'vs/workbench/contrib/webview/browser/w
46
46
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService' ;
47
47
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService' ;
48
48
import { FromWebviewMessage , IAckOutputHeight , IClickedDataUrlMessage , ICodeBlockHighlightRequest , IContentWidgetTopRequest , IControllerPreload , ICreationContent , ICreationRequestMessage , IFindMatch , IMarkupCellInitialization , RendererMetadata , ToWebviewMessage } from './webviewMessages' ;
49
+ import { compressOutputItemStreams } from 'vs/workbench/contrib/notebook/browser/view/renderers/stdOutErrorPreProcessor' ;
49
50
50
51
export interface ICachedInset < K extends ICommonCellInfo > {
51
52
outputId : string ;
@@ -1278,12 +1279,14 @@ var requirejs = (function() {
1278
1279
let updatedContent : ICreationContent | undefined = undefined ;
1279
1280
if ( content . type === RenderOutputType . Extension ) {
1280
1281
const output = content . source . model ;
1281
- const first = output . outputs . find ( op => op . mime === content . mimeType ) ! ;
1282
+ const firstBuffer = isTextStreamMime ( content . mimeType ) ?
1283
+ compressOutputItemStreams ( content . mimeType , output . outputs ) :
1284
+ output . outputs . find ( op => op . mime === content . mimeType ) ! . data . buffer ;
1282
1285
updatedContent = {
1283
1286
type : RenderOutputType . Extension ,
1284
1287
outputId : outputCache . outputId ,
1285
- mimeType : first . mime ,
1286
- valueBytes : first . data . buffer ,
1288
+ mimeType : content . mimeType ,
1289
+ valueBytes : firstBuffer ,
1287
1290
metadata : output . metadata ,
1288
1291
} ;
1289
1292
}
0 commit comments