ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / workbench / contrib / notebook / browser / notebook.contribution.ts 1309 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
import { Schemas } from '../../../../base/common/network.js' ;
import { IDisposable, Disposable, DisposableStore, dispose } from '../../../../base/common/lifecycle.js' ;
import { parse } from '../../../../base/common/marshalling.js' ;
import { extname, isEqual } from '../../../../base/common/resources.js' ;
import { assertType } from '../../../../base/common/types.js' ;
import { URI } from '../../../../base/common/uri.js' ;
import { toFormattedString } from '../../../../base/common/jsonFormatter.js'
ITextModel ITextBufferFactory ITextBuffer
IModelService
ILanguageSelection ILanguageService
ITextModelContentProvider ITextModelService
nls
Extensions IConfigurationPropertySchema IConfigurationRegistry
SyncDescriptor
InstantiationType registerSingleton
IInstantiationService
LifecyclePhase
Registry
EditorPaneDescriptor IEditorPaneRegistry
Extensions WorkbenchExtensions IWorkbenchContribution IWorkbenchContributionsRegistry WorkbenchPhase registerWorkbenchContribution2
IEditorSerializer IEditorFactoryRegistry EditorExtensions
EditorInput
NotebookEditor
NotebookEditorInput NotebookEditorInputOptions
INotebookService
NotebookService
CellKind CellUri IResolvedNotebookEditorModel NotebookWorkingCopyTypeIdentifier NotebookSetting ICellOutput ICell NotebookCellsChangeType NotebookMetadataUri
IEditorService
IUndoRedoService
INotebookEditorModelResolverService
NotebookDiffEditorInput
NotebookTextDiffEditor
INotebookEditorWorkerService
NotebookEditorWorkerServiceImpl
INotebookCellStatusBarService
NotebookCellStatusBarService
INotebookEditorService
NotebookEditorWidgetService
IJSONContributionRegistry Extensions JSONExtensions
IJSONSchema IJSONSchemaMap
Event
getFormattedOutputJSON getStreamOutputData
NotebookModelResolverServiceImpl
INotebookKernelHistoryService INotebookKernelService
NotebookKernelService
IWorkingCopyIdentifier
IResourceEditorInput
IExtensionService
IWorkingCopyEditorHandler IWorkingCopyEditorService
IConfigurationService
ILabelService
IEditorGroupsService
NotebookRendererMessagingService
INotebookRendererMessagingService
INotebookCellOutlineDataSourceFactory NotebookCellOutlineDataSourceFactory
editorOptionsRegistry
NotebookExecutionStateService
NotebookExecutionService
INotebookExecutionService
INotebookKeymapService
NotebookKeymapService
INotebookExecutionStateService
ILanguageFeaturesService
NotebookInfo
ICodeEditorService
NotebookKernelHistoryService
INotebookLoggingService
NotebookLoggingService
product
NotebookVariables
AccessibleViewRegistry
NotebookAccessibilityHelp
NotebookAccessibleView
DefaultFormatter
NotebookMultiTextDiffEditor
NotebookMultiDiffEditorInput
getFormattedMetadataJSON
INotebookOutlineEntryFactory NotebookOutlineEntryFactory
getFormattedNotebookMetadataJSON
NotebookOutputEditor
NotebookOutputEditorInput
Registry EditorExtensions EditorPane
EditorPaneDescriptor
NotebookEditor
NotebookEditor
NotebookEditorInput
Registry EditorExtensions EditorPane
EditorPaneDescriptor
NotebookTextDiffEditor
NotebookTextDiffEditor
NotebookDiffEditorInput
Registry EditorExtensions EditorPane
EditorPaneDescriptor
NotebookOutputEditor
NotebookOutputEditor
NotebookOutputEditorInput
Registry EditorExtensions EditorPane
EditorPaneDescriptor
NotebookMultiTextDiffEditor
NotebookMultiTextDiffEditor
NotebookMultiDiffEditorInput
_configurationService IConfigurationService
input EditorInput
input
resource input resource
originalResource input original resource
name input
originalName input original
textDiffName input
viewType input viewType
instantiationService IInstantiationService raw
resource originalResource name originalName viewType textDiffName group
data Data raw
data
resource originalResource name viewType data
data resource originalResource name viewType
_configurationService
NotebookMultiDiffEditorInput instantiationService resource name originalResource viewType
NotebookDiffEditorInput instantiationService resource name originalResource viewType
editorInput EditorInput backupResource
resource preferredResource viewType options NotebookEditorInputOptions
input EditorInput
input typeId NotebookEditorInput
input EditorInput
input
data SerializedNotebookEditorData
resource input resource
preferredResource input preferredResource
viewType input viewType
options input options
data
instantiationService IInstantiationService raw
data SerializedNotebookEditorData raw
data
resource preferredResource viewType options data
data resource viewType
input NotebookEditorInput instantiationService resource preferredResource viewType options
input
notebookUri cellIndex outputIndex
input EditorInput
input typeId NotebookOutputEditorInput
input EditorInput
input
data input
data
data
instantiationService IInstantiationService raw EditorInput
data SerializedNotebookOutputEditorData raw
data
input instantiationService NotebookOutputEditorInput data notebookUri data cellIndex data outputIndex
input
Registry EditorExtensions EditorFactory
NotebookEditorInput
NotebookEditorSerializer
Registry EditorExtensions EditorFactory
NotebookDiffEditorInput
NotebookDiffEditorSerializer
Registry EditorExtensions EditorFactory
NotebookOutputEditorInput
NotebookOutputEditorSerializer
_uriComparisonKeyComputer IDisposable
undoRedoService IUndoRedoService
configurationService IConfigurationService
codeEditorService ICodeEditorService
configurationService undoRedoService
configurationService e
e NotebookSetting undoRedoPerCell
configurationService undoRedoService
codeEditorService
configurationService IConfigurationService undoRedoService IUndoRedoService
undoRedoPerCell configurationService NotebookSetting undoRedoPerCell
undoRedoPerCell
_uriComparisonKeyComputer
_uriComparisonKeyComputer undoRedoService CellUri scheme
getComparisonKey uri
undoRedoPerCell
uri
NotebookContribution uri
_uriComparisonKeyComputer
_uriComparisonKeyComputer
uri
data CellUri uri
data
uri
data notebook
override
_uriComparisonKeyComputer
_registration IDisposable
textModelService ITextModelService
_modelService IModelService
_languageService ILanguageService
_notebookModelResolverService INotebookEditorModelResolverService
_registration textModelService CellUri scheme
_registration
resource ITextModel
existing _modelService resource
existing
existing
data CellUri resource
data
ref _notebookModelResolverService data notebook
result ITextModel
ref object
cell ref object notebook cells
cell uri resource
bufferFactory ITextBufferFactory
defaultEOL
textBuffer cell textBuffer ITextBuffer disposable Disposable None
limit
cell textBuffer limit
languageId _languageService cell language
languageSelection languageId _languageService languageId cell cellKind CellKind Markup _languageService _languageService resource cell textBuffer
result _modelService
bufferFactory
languageSelection
resource
result
ref
once Event result onWillDispose ref object notebook onWillDispose
once
ref
result
_disposables IDisposable
textModelService ITextModelService
_modelService IModelService
_languageService ILanguageService
_labelService ILabelService
_notebookModelResolverService INotebookEditorModelResolverService
_disposables textModelService Schemas vscodeNotebookCellMetadata
provideTextContent
_disposables textModelService Schemas vscodeNotebookCellOutput
provideTextContent
_disposables _labelService
scheme Schemas vscodeNotebookCellMetadata
formatting
label
separator
_disposables _labelService
scheme Schemas vscodeNotebookCellOutput
formatting
label
separator
_disposables
resource ITextModel
existing _modelService resource
existing
existing
data CellUri resource Schemas vscodeNotebookCellMetadata
data
ref _notebookModelResolverService data notebook
result ITextModel
mode _languageService
disposables
cell ref object notebook cells
cell handle data handle
cellIndex ref object notebook cells cell
metadataSource ref object notebook transientOptions transientCellMetadata cell metadata cell language
result _modelService
metadataSource
mode
resource
_disposables disposables ref object notebook e
result e rawEvents event event kind NotebookCellsChangeType ChangeCellMetadata event kind NotebookCellsChangeType ChangeCellLanguage event index cellIndex
value ref object notebook transientOptions transientCellMetadata cell metadata cell language
result value
result value
result
ref
once result
disposables
once
ref
result
op ICellOutput content mode ILanguageSelection
op
streamOutputData op outputs
streamOutputData
content streamOutputData
mode _languageService
data
notebook
outputId
cell ICell
result content mode ILanguageSelection
mode _languageService
op cell outputs op op outputId data outputId op alternativeOutputId data outputId
streamOutputData op
streamOutputData
result streamOutputData
result
obj cell outputs output
metadata output metadata
outputItems output outputs opit
mimeType opit mime
data opit data
outputSource obj
result
content outputSource
mode
result
resource ITextModel
existing _modelService resource
existing
existing
data CellUri resource Schemas vscodeNotebookCellOutput
data
ref _notebookModelResolverService data notebook
cell ref object notebook cells cell cell handle data handle
cell
ref
mode _languageService
model _modelService cell outputs mode resource
cellModelListener Event cell onDidChangeOutputs Event None cell onDidChangeOutputItems Event None
model cell outputs
once model
once
cellModelListener
ref
model
resource ITextModel
existing _modelService resource
existing
existing
data CellUri resource
data
resource
ref _notebookModelResolverService data notebook
cell ref object notebook cells cell cell outputs op op outputId data outputId op alternativeOutputId data outputId
cell
ref
result data cell
result
ref
model _modelService result content result mode resource
cellModelListener Event cell onDidChangeOutputs Event None cell onDidChangeOutputItems Event None
newResult data cell
newResult
model newResult content
model newResult mode languageId
once model
once
cellModelListener
ref
model
_disposables IDisposable
textModelService ITextModelService
_modelService IModelService
_languageService ILanguageService
_labelService ILabelService
_notebookModelResolverService INotebookEditorModelResolverService
_disposables textModelService Schemas vscodeNotebookMetadata
provideTextContent
_disposables _labelService
scheme Schemas vscodeNotebookMetadata
formatting
label
separator
_disposables
resource ITextModel
existing _modelService resource
existing
existing
data NotebookMetadataUri resource
data
ref _notebookModelResolverService data
result ITextModel
mode _languageService
disposables
metadataSource ref object notebook transientOptions transientDocumentMetadata ref object notebook metadata
result _modelService
metadataSource
mode
resource
result
ref
_disposables disposables ref object notebook e
result e rawEvents event event kind NotebookCellsChangeType ChangeCellContent event kind NotebookCellsChangeType ChangeDocumentMetadata event kind NotebookCellsChangeType ModelChange
value ref object notebook transientOptions transientDocumentMetadata ref object notebook metadata
result value
result value
once result
disposables
once
ref
result
jsonRegistry Registry JSONExtensions JSONContribution
metadataSchema IJSONSchema
properties
type
description
additionalProperties
allowTrailingCommas
allowComments
jsonRegistry metadataSchema
_disposables
_editorService IEditorService
_notebookEditorModelService INotebookEditorModelResolverService
editorGroups IEditorGroupsService
IResolvedNotebookEditorModel
_disposables Event
_notebookEditorModelService onDidChangeDirty
last current last current last current
_openMissingDirtyNotebookEditors
_disposables _notebookEditorModelService e
group editorGroups groups
conflictInputs group editors input input input viewType e viewType input resource e resource
p group conflictInputs
e p
_disposables
models IResolvedNotebookEditorModel
result IResourceEditorInput
model models
model _editorService resource model resource typeId NotebookEditorInput editorId model viewType model resource
result
resource model resource
options inactive preserveFocus pinned override model viewType
result length
_editorService result
IWorkingCopyEditorHandler
_instantiationService IInstantiationService
_workingCopyEditorService IWorkingCopyEditorService
_extensionService IExtensionService
_notebookService INotebookService
workingCopy IWorkingCopyIdentifier
viewType workingCopy
viewType
_notebookService viewType
workingCopy IWorkingCopyIdentifier
viewType workingCopy
viewType viewType
viewType
workingCopy IWorkingCopyIdentifier editor EditorInput
workingCopy
editor editor viewType workingCopy workingCopy resource editor resource
workingCopy IWorkingCopyIdentifier EditorInput
NotebookEditorInput _instantiationService workingCopy resource workingCopy
_extensionService
_workingCopyEditorService
workingCopy IWorkingCopyIdentifier
notebookType NotebookWorkingCopyTypeIdentifier workingCopy typeId
notebookType notebookType viewType notebookType notebookType
notebookType viewType
_notebookService INotebookService
languageFeaturesService ILanguageFeaturesService
languageFeaturesService
uri NotebookInfo
cellUri CellUri uri
cellUri
notebook _notebookService cellUri notebook
notebook
uri notebook uri
type notebook viewType
workbenchContributionsRegistry Registry WorkbenchExtensions Workbench
NotebookContribution NotebookContribution WorkbenchPhase BlockStartup
CellContentProvider CellContentProvider WorkbenchPhase BlockStartup
CellInfoContentProvider CellInfoContentProvider WorkbenchPhase BlockStartup
NotebookMetadataContentProvider NotebookMetadataContentProvider WorkbenchPhase BlockStartup
RegisterSchemasContribution RegisterSchemasContribution WorkbenchPhase BlockStartup
NotebookEditorManager NotebookEditorManager WorkbenchPhase BlockRestore
NotebookLanguageSelectorScoreRefine NotebookLanguageSelectorScoreRefine WorkbenchPhase BlockRestore
SimpleNotebookWorkingCopyEditorHandler SimpleNotebookWorkingCopyEditorHandler WorkbenchPhase BlockRestore
workbenchContributionsRegistry NotebookVariables LifecyclePhase Eventually
AccessibleViewRegistry
AccessibleViewRegistry
INotebookService NotebookService InstantiationType Delayed
INotebookEditorWorkerService NotebookEditorWorkerServiceImpl InstantiationType Delayed
INotebookEditorModelResolverService NotebookModelResolverServiceImpl InstantiationType Delayed
INotebookCellStatusBarService NotebookCellStatusBarService InstantiationType Delayed
INotebookEditorService NotebookEditorWidgetService InstantiationType Delayed
INotebookKernelService NotebookKernelService InstantiationType Delayed
INotebookKernelHistoryService NotebookKernelHistoryService InstantiationType Delayed
INotebookExecutionService NotebookExecutionService InstantiationType Delayed
INotebookExecutionStateService NotebookExecutionStateService InstantiationType Delayed
INotebookRendererMessagingService NotebookRendererMessagingService InstantiationType Delayed
INotebookKeymapService NotebookKeymapService InstantiationType Delayed
INotebookLoggingService NotebookLoggingService InstantiationType Delayed
INotebookCellOutlineDataSourceFactory NotebookCellOutlineDataSourceFactory InstantiationType Delayed
INotebookOutlineEntryFactory NotebookOutlineEntryFactory InstantiationType Delayed
schemas IJSONSchemaMap
x IConfigurationPropertySchema path IConfigurationPropertySchema x IConfigurationPropertySchema
x type x anyOf
editorOption editorOptionsRegistry
schema editorOption schema
schema
schema
schemas schema
key schema
Object schema key
schemas key schema key
editorOptionsCustomizationSchema IConfigurationPropertySchema
description nls
allOf
properties schemas
tags
configurationRegistry Registry Extensions Configuration
configurationRegistry
id
order
title nls
type
properties
NotebookSetting displayOrder
description nls
type
items
type
NotebookSetting cellToolbarLocation
description nls
type
additionalProperties
markdownDescription nls
type
tags
NotebookSetting showCellStatusBar
description nls
type
enumDescriptions
nls
nls
nls
tags
NotebookSetting cellExecutionTimeVerbosity
description nls
type
enumDescriptions
nls
nls
tags
NotebookSetting textDiffEditorPreview
description nls
type
tags
NotebookSetting diffOverviewRuler
description nls
type
tags
NotebookSetting cellToolbarVisibility
markdownDescription nls
type
tags
NotebookSetting undoRedoPerCell
description nls
type
tags
NotebookSetting compactView
description nls
type
tags
NotebookSetting focusIndicator
description nls
type
tags
NotebookSetting insertToolbarLocation
description nls
type
enumDescriptions
nls
nls
nls
nls
tags
NotebookSetting globalToolbar
description nls
type
tags
NotebookSetting stickyScrollEnabled
description nls
type
tags
NotebookSetting stickyScrollMode
description nls
type
enumDescriptions
nls
nls
tags
NotebookSetting consolidatedOutputButton
description nls
type
tags
NotebookSetting showFoldingControls
description nls
type
enumDescriptions
nls
nls
nls
tags
NotebookSetting dragAndDropEnabled
description nls
type
tags
NotebookSetting consolidatedRunButton
description nls
type
tags
NotebookSetting globalToolbarShowLabel
description nls
type
tags
NotebookSetting textOutputLineLimit
markdownDescription nls
type
tags
minimum
NotebookSetting LinkifyOutputFilePaths
description nls
type
tags
NotebookSetting minimalErrorRendering
description nls
type
tags
NotebookSetting markupFontSize
markdownDescription nls
type
tags
NotebookSetting markdownLineHeight
markdownDescription nls
type
tags
NotebookSetting cellEditorOptionsCustomizations editorOptionsCustomizationSchema
NotebookSetting interactiveWindowCollapseCodeCells
markdownDescription nls
type
NotebookSetting outputLineHeight
markdownDescription nls
type
tags
NotebookSetting outputFontSize
markdownDescription nls
type
tags
NotebookSetting outputFontFamily
markdownDescription nls
type
tags
NotebookSetting outputScrolling
markdownDescription nls
type
tags
product quality product quality
NotebookSetting outputWordWrap
markdownDescription nls
type
tags
NotebookSetting defaultFormatter
description nls
type
DefaultFormatter extensionIds
enumItemLabels DefaultFormatter extensionItemLabels
markdownEnumDescriptions DefaultFormatter extensionDescriptions
NotebookSetting formatOnSave
markdownDescription nls
type
tags
NotebookSetting insertFinalNewline
markdownDescription nls
type
tags
NotebookSetting formatOnCellExecution
markdownDescription nls
type
NotebookSetting confirmDeleteRunningCell
markdownDescription nls
type
NotebookSetting findFilters
markdownDescription nls
type
properties
markupSource
type
markupPreview
type
codeSource
type
codeOutput
type
markupSource
markupPreview
codeSource
codeOutput
tags
NotebookSetting remoteSaving
markdownDescription nls
type
product quality product quality
tags
NotebookSetting scrollToRevealCell
markdownDescription nls
type
markdownEnumDescriptions
nls
nls
nls
NotebookSetting cellGenerate
markdownDescription nls
type
NotebookSetting notebookVariablesView
markdownDescription nls
type
NotebookSetting notebookInlineValues
markdownDescription nls
type
enumDescriptions
nls
nls
nls
NotebookSetting cellFailureDiagnostics
markdownDescription nls
type
NotebookSetting outputBackupSizeLimit
markdownDescription nls
type
NotebookSetting multiCursor
markdownDescription nls
type
NotebookSetting markupFontFamily
markdownDescription nls
type
tags
;
import
{
,
,
}
from
'../../../../editor/common/model.js'
;
import
{
}
from
'../../../../editor/common/services/model.js'
;
import
{
,
}
from
'../../../../editor/common/languages/language.js'
;
import
{
,
}
from
'../../../../editor/common/services/resolverService.js'
;
import
*
as
from
'../../../../nls.js'
;
import
{
,
,
}
from
'../../../../platform/configuration/common/configurationRegistry.js'
;
import
{
}
from
'../../../../platform/instantiation/common/descriptors.js'
;
import
{
,
}
from
'../../../../platform/instantiation/common/extensions.js'
;
import
{
}
from
'../../../../platform/instantiation/common/instantiation.js'
;
import
{
}
from
'../../../services/lifecycle/common/lifecycle.js'
;
import
{
}
from
'../../../../platform/registry/common/platform.js'
;
import
{
,
}
from
'../../../browser/editor.js'
;
import
{
as
,
,
,
,
}
from
'../../../common/contributions.js'
;
import
{
,
,
}
from
'../../../common/editor.js'
;
import
{
}
from
'../../../common/editor/editorInput.js'
;
import
{
}
from
'./notebookEditor.js'
;
import
{
,
}
from
'../common/notebookEditorInput.js'
;
import
{
}
from
'../common/notebookService.js'
;
import
{
}
from
'./services/notebookServiceImpl.js'
;
import
{
,
,
,
,
,
,
,
,
}
from
'../common/notebookCommon.js'
;
import
{
}
from
'../../../services/editor/common/editorService.js'
;
import
{
}
from
'../../../../platform/undoRedo/common/undoRedo.js'
;
import
{
}
from
'../common/notebookEditorModelResolverService.js'
;
import
{
}
from
'../common/notebookDiffEditorInput.js'
;
import
{
}
from
'./diff/notebookDiffEditor.js'
;
import
{
}
from
'../common/services/notebookWorkerService.js'
;
import
{
}
from
'./services/notebookWorkerServiceImpl.js'
;
import
{
}
from
'../common/notebookCellStatusBarService.js'
;
import
{
}
from
'./services/notebookCellStatusBarServiceImpl.js'
;
import
{
}
from
'./services/notebookEditorService.js'
;
import
{
}
from
'./services/notebookEditorServiceImpl.js'
;
import
{
,
as
}
from
'../../../../platform/jsonschemas/common/jsonContributionRegistry.js'
;
import
{
,
}
from
'../../../../base/common/jsonSchema.js'
;
import
{
}
from
'../../../../base/common/event.js'
;
import
{
,
}
from
'./diff/diffElementViewModel.js'
;
import
{
}
from
'../common/notebookEditorModelResolverServiceImpl.js'
;
import
{
,
}
from
'../common/notebookKernelService.js'
;
import
{
}
from
'./services/notebookKernelServiceImpl.js'
;
import
{
}
from
'../../../services/workingCopy/common/workingCopy.js'
;
import
{
}
from
'../../../../platform/editor/common/editor.js'
;
import
{
}
from
'../../../services/extensions/common/extensions.js'
;
import
{
,
}
from
'../../../services/workingCopy/common/workingCopyEditorService.js'
;
import
{
}
from
'../../../../platform/configuration/common/configuration.js'
;
import
{
}
from
'../../../../platform/label/common/label.js'
;
import
{
}
from
'../../../services/editor/common/editorGroupsService.js'
;
import
{
}
from
'./services/notebookRendererMessagingServiceImpl.js'
;
import
{
}
from
'../common/notebookRendererMessagingService.js'
;
import
{
,
}
from
'./viewModel/notebookOutlineDataSourceFactory.js'
;
import
'./controller/coreActions.js'
;
import
'./controller/insertCellActions.js'
;
import
'./controller/executeActions.js'
;
import
'./controller/sectionActions.js'
;
import
'./controller/layoutActions.js'
;
import
'./controller/editActions.js'
;
import
'./controller/cellOutputActions.js'
;
import
'./controller/apiActions.js'
;
import
'./controller/foldingController.js'
;
import
'./controller/chat/notebook.chat.contribution.js'
;
import
'./controller/variablesActions.js'
;
import
'./contrib/editorHint/emptyCellEditorHint.js'
;
import
'./contrib/clipboard/notebookClipboard.js'
;
import
'./contrib/find/notebookFind.js'
;
import
'./contrib/format/formatting.js'
;
import
'./contrib/saveParticipants/saveParticipants.js'
;
import
'./contrib/gettingStarted/notebookGettingStarted.js'
;
import
'./contrib/layout/layoutActions.js'
;
import
'./contrib/marker/markerProvider.js'
;
import
'./contrib/navigation/arrow.js'
;
import
'./contrib/outline/notebookOutline.js'
;
import
'./contrib/profile/notebookProfile.js'
;
import
'./contrib/cellStatusBar/statusBarProviders.js'
;
import
'./contrib/cellStatusBar/contributedStatusBarItemController.js'
;
import
'./contrib/cellStatusBar/executionStatusBarItemController.js'
;
import
'./contrib/editorStatusBar/editorStatusBar.js'
;
import
'./contrib/undoRedo/notebookUndoRedo.js'
;
import
'./contrib/cellCommands/cellCommands.js'
;
import
'./contrib/viewportWarmup/viewportWarmup.js'
;
import
'./contrib/troubleshoot/layout.js'
;
import
'./contrib/debug/notebookBreakpoints.js'
;
import
'./contrib/debug/notebookCellPausing.js'
;
import
'./contrib/debug/notebookDebugDecorations.js'
;
import
'./contrib/execute/executionEditorProgress.js'
;
import
'./contrib/kernelDetection/notebookKernelDetection.js'
;
import
'./contrib/cellDiagnostics/cellDiagnostics.js'
;
import
'./contrib/multicursor/notebookMulticursor.js'
;
import
'./contrib/multicursor/notebookSelectionHighlight.js'
;
import
'./contrib/notebookVariables/notebookInlineVariables.js'
;
import
'./diff/notebookDiffActions.js'
;
import
{
}
from
'../../../../editor/common/config/editorOptions.js'
;
import
{
}
from
'./services/notebookExecutionStateServiceImpl.js'
;
import
{
}
from
'./services/notebookExecutionServiceImpl.js'
;
import
{
}
from
'../common/notebookExecutionService.js'
;
import
{
}
from
'../common/notebookKeymapService.js'
;
import
{
}
from
'./services/notebookKeymapServiceImpl.js'
;
import
{
PLAINTEXT_LANGUAGE_ID
}
from
'../../../../editor/common/languages/modesRegistry.js'
;
import
{
}
from
'../common/notebookExecutionStateService.js'
;
import
{
}
from
'../../../../editor/common/services/languageFeatures.js'
;
import
{
}
from
'../../../../editor/common/languageFeatureRegistry.js'
;
import
{
COMMENTEDITOR_DECORATION_KEY
}
from
'../../comments/browser/commentReply.js'
;
import
{
}
from
'../../../../editor/browser/services/codeEditorService.js'
;
import
{
}
from
'./services/notebookKernelHistoryServiceImpl.js'
;
import
{
}
from
'../common/notebookLoggingService.js'
;
import
{
}
from
'./services/notebookLoggingServiceImpl.js'
;
import
from
'../../../../platform/product/common/product.js'
;
import
{
}
from
'./contrib/notebookVariables/notebookVariables.js'
;
import
{
}
from
'../../../../platform/accessibility/browser/accessibleViewRegistry.js'
;
import
{
}
from
'./notebookAccessibilityHelp.js'
;
import
{
}
from
'./notebookAccessibleView.js'
;
import
{
}
from
'../../format/browser/formatActionsMultiple.js'
;
import
{
}
from
'./diff/notebookMultiDiffEditor.js'
;
import
{
}
from
'./diff/notebookMultiDiffEditorInput.js'
;
import
{
}
from
'../common/model/notebookCellTextModel.js'
;
import
{
,
}
from
'./viewModel/notebookOutlineEntryFactory.js'
;
import
{
}
from
'../common/model/notebookMetadataTextModel.js'
;
import
{
}
from
'./outputEditor/notebookOutputEditor.js'
;
import
{
}
from
'./outputEditor/notebookOutputEditorInput.js'
;
.
as < IEditorPaneRegistry>
(
.
)
.
registerEditorPane
(
.
create
(
,
.
ID
,
'Notebook Editor'
)
,
[
new
SyncDescriptor
(
)
]
)
;
.
as < IEditorPaneRegistry>
(
.
)
.
registerEditorPane
(
.
create
(
,
.
ID
,
'Notebook Diff Editor'
)
,
[
new
SyncDescriptor
(
)
]
)
;
.
as < IEditorPaneRegistry>
(
.
)
.
registerEditorPane
(
.
create
(
,
.
ID
,
'Notebook Output Editor'
)
,
[
new
SyncDescriptor
(
)
]
)
;
.
as < IEditorPaneRegistry>
(
.
)
.
registerEditorPane
(
.
create
(
,
.
ID
,
'Notebook Diff Editor'
)
,
[
new
SyncDescriptor
(
)
]
)
;
class
NotebookDiffEditorSerializer
implements
IEditorSerializer
{
constructor
(
@ IConfigurationService
private
readonly
:
)
{
}
canSerialize
(
)
:
boolean
{
return
true
;
}
serialize
(
:
)
:
string
{
assertType
(
instanceof
NotebookDiffEditorInput
)
;
return
JSON
.
stringify
(
{
:
.
,
:
.
.
,
:
.
getName
(
)
,
:
.
.
getName
(
)
,
:
.
getName
(
)
,
:
.
,
}
)
;
}
deserialize
(
:
,
:
string
)
{
type
Data
=
{
:
URI
;
:
URI
;
:
string
;
:
string
;
:
string
;
:
string
|
undefined
;
:
number
}
;
const
=
<
>
parse
(
)
;
if
(
!
)
{
return
undefined
;
}
const
{
,
,
,
}
=
;
if
(
!
||
!
URI
.
isUri
(
)
||
!
URI
.
isUri
(
)
||
typeof
!==
'string'
||
typeof
!==
'string'
)
{
return
undefined
;
}
if
(
this
.
.
getValue
(
'notebook.experimental.enableNewDiffEditor'
)
)
{
return
.
create
(
,
,
,
undefined
,
,
)
;
}
else
{
return
.
create
(
,
,
,
undefined
,
,
)
;
}
}
static
canResolveBackup
(
:
,
:
URI
)
:
boolean
{
return
false
;
}
}
type
SerializedNotebookEditorData
=
{
:
URI
;
:
URI
;
:
string
;
?
:
}
;
class
NotebookEditorSerializer
implements
IEditorSerializer
{
canSerialize
(
:
)
:
boolean
{
return
.
===
.
ID
;
}
serialize
(
:
)
:
string
{
assertType
(
instanceof
NotebookEditorInput
)
;
const
:
=
{
:
.
,
:
.
,
:
.
,
:
.
}
;
return
JSON
.
stringify
(
)
;
}
deserialize
(
:
,
:
string
)
{
const
=
<
>
parse
(
)
;
if
(
!
)
{
return
undefined
;
}
const
{
,
,
,
}
=
;
if
(
!
||
!
URI
.
isUri
(
)
||
typeof
!==
'string'
)
{
return
undefined
;
}
const
=
.
getOrCreate
(
,
,
,
,
)
;
return
;
}
}
export
type
SerializedNotebookOutputEditorData
=
{
:
URI
;
:
number
;
:
number
}
;
class
NotebookOutputEditorSerializer
implements
IEditorSerializer
{
canSerialize
(
:
)
:
boolean
{
return
.
===
.
ID
;
}
serialize
(
:
)
:
string
|
undefined
{
assertType
(
instanceof
NotebookOutputEditorInput
)
;
const
=
.
getSerializedData
(
)
;
if
(
!
)
{
return
undefined
;
}
return
JSON
.
stringify
(
)
;
}
deserialize
(
:
,
:
string
)
:
|
undefined
{
const
=
<
>
parse
(
)
;
if
(
!
)
{
return
undefined
;
}
const
=
.
createInstance
(
,
.
,
.
,
undefined
,
.
)
;
return
;
}
}
.
as < IEditorFactoryRegistry>
(
.
)
.
registerEditorSerializer
(
.
ID
,
)
;
.
as < IEditorFactoryRegistry>
(
.
)
.
registerEditorSerializer
(
.
ID
,
)
;
.
as < IEditorFactoryRegistry>
(
.
)
.
registerEditorSerializer
(
.
ID
,
)
;
export
class
NotebookContribution
extends
Disposable
implements
IWorkbenchContribution
{
static
readonly
ID
=
'workbench.contrib.notebook'
;
private
?
:
;
constructor
(
@ IUndoRedoService
:
,
@ IConfigurationService
:
,
@ ICodeEditorService
private
readonly
:
,
)
{
super
(
)
;
this
.
updateCellUndoRedoComparisonKey
(
,
)
;
this
.
_register
(
.
onDidChangeConfiguration
(
=>
{
if
(
.
affectsConfiguration
(
.
)
)
{
this
.
updateCellUndoRedoComparisonKey
(
,
)
;
}
}
)
)
;
this
.
_register
(
this
.
.
registerDecorationType
(
'comment-controller'
,
COMMENTEDITOR_DECORATION_KEY
,
{
}
)
)
;
}
private
updateCellUndoRedoComparisonKey
(
:
,
:
)
{
const
=
.
getValue < boolean >
(
.
)
;
if
(
!
)
{
if
(
!
this
.
)
{
this
.
=
.
registerUriComparisonKeyComputer
(
.
,
{
:
(
:
URI
)
:
string
=>
{
if
(
)
{
return
.
toString
(
)
;
}
return
.
_getCellUndoRedoComparisonKey
(
)
;
}
}
)
;
}
}
else
{
this
.
?.
dispose
(
)
;
this
.
=
undefined
;
}
}
private
static
_getCellUndoRedoComparisonKey
(
:
URI
)
{
const
=
.
parse
(
)
;
if
(
!
)
{
return
.
toString
(
)
;
}
return
.
.
toString
(
)
;
}
dispose
(
)
:
void
{
super
.
dispose
(
)
;
this
.
?.
dispose
(
)
;
}
}
class
CellContentProvider
implements
ITextModelContentProvider
{
static
readonly
ID
=
'workbench.contrib.cellContentProvider'
;
private
readonly
:
;
constructor
(
@ ITextModelService
:
,
@ IModelService
private
readonly
:
,
@ ILanguageService
private
readonly
:
,
@ INotebookEditorModelResolverService
private
readonly
:
,
)
{
this
.
=
.
registerTextModelContentProvider
(
.
,
this
)
;
}
dispose
(
)
:
void
{
this
.
.
dispose
(
)
;
}
async
provideTextContent
(
:
URI
)
:
Promise
<
|
null
>
{
const
=
this
.
.
getModel
(
)
;
if
(
)
{
return
;
}
const
=
.
parse
(
)
;
if
(
!
)
{
return
null
;
}
const
=
await
this
.
.
resolve
(
.
)
;
let
:
|
null
=
null
;
if
(
!
.
.
isResolved
(
)
)
{
return
null
;
}
for
(
const
of
.
.
.
)
{
if
(
.
.
toString
(
)
===
.
toString
(
)
)
{
const
:
=
{
create
:
(
)
=>
{
return
{
:
.
as
,
:
.
}
;
}
,
getFirstLineText
:
(
:
number
)
=>
{
return
.
.
getLineContent
(
1
)
.
substring
(
0
,
)
;
}
}
;
const
=
this
.
.
getLanguageIdByLanguageName
(
.
)
;
const
=
?
this
.
.
createById
(
)
:
(
.
===
.
?
this
.
.
createById
(
'markdown'
)
:
this
.
.
createByFilepathOrFirstLine
(
,
.
.
getLineContent
(
1
)
)
)
;
=
this
.
.
createModel
(
,
,
)
;
break
;
}
}
if
(
!
)
{
.
dispose
(
)
;
return
null
;
}
const
=
.
any
(
.
,
.
.
.
)
(
(
)
=>
{
.
dispose
(
)
;
.
dispose
(
)
;
}
)
;
return
;
}
}
class
CellInfoContentProvider
{
static
readonly
ID
=
'workbench.contrib.cellInfoContentProvider'
;
private
readonly
:
[
]
=
[
]
;
constructor
(
@ ITextModelService
:
,
@ IModelService
private
readonly
:
,
@ ILanguageService
private
readonly
:
,
@ ILabelService
private
readonly
:
,
@ INotebookEditorModelResolverService
private
readonly
:
,
)
{
this
.
.
push
(
.
registerTextModelContentProvider
(
.
,
{
:
this
.
provideMetadataTextContent
.
bind
(
this
)
}
)
)
;
this
.
.
push
(
.
registerTextModelContentProvider
(
.
,
{
:
this
.
provideOutputTextContent
.
bind
(
this
)
}
)
)
;
this
.
.
push
(
this
.
.
registerFormatter
(
{
:
.
,
:
{
:
'${path} (metadata)'
,
:
'/'
}
}
)
)
;
this
.
.
push
(
this
.
.
registerFormatter
(
{
:
.
,
:
{
:
'${path} (output)'
,
:
'/'
}
}
)
)
;
}
dispose
(
)
:
void
{
dispose
(
this
.
)
;
}
async
provideMetadataTextContent
(
:
URI
)
:
Promise
<
|
null
>
{
const
=
this
.
.
getModel
(
)
;
if
(
)
{
return
;
}
const
=
.
parseCellPropertyUri
(
,
.
)
;
if
(
!
)
{
return
null
;
}
const
=
await
this
.
.
resolve
(
.
)
;
let
:
|
null
=
null
;
const
=
this
.
.
createById
(
'json'
)
;
const
=
new
DisposableStore
(
)
;
for
(
const
of
.
.
.
)
{
if
(
.
===
.
)
{
const
=
.
.
.
.
indexOf
(
)
;
const
=
getFormattedMetadataJSON
(
.
.
.
.
,
.
,
.
,
true
)
;
=
this
.
.
createModel
(
,
,
)
;
this
.
.
push
(
.
add
(
.
.
.
onDidChangeContent
(
=>
{
if
(
&&
.
.
some
(
=>
(
.
===
.
||
.
===
.
)
&&
.
===
)
)
{
const
=
getFormattedMetadataJSON
(
.
.
.
.
,
.
,
.
,
true
)
;
if
(
.
getValue
(
)
!==
)
{
.
setValue
(
)
;
}
}
}
)
)
)
;
break
;
}
}
if
(
!
)
{
.
dispose
(
)
;
return
null
;
}
const
=
.
onWillDispose
(
(
)
=>
{
.
dispose
(
)
;
.
dispose
(
)
;
.
dispose
(
)
;
}
)
;
return
;
}
private
parseStreamOutput
(
?
:
)
:
{
:
string
;
:
}
|
undefined
{
if
(
!
)
{
return
;
}
const
=
getStreamOutputData
(
.
)
;
if
(
)
{
return
{
:
,
:
this
.
.
createById
(
PLAINTEXT_LANGUAGE_ID
)
}
;
}
return
;
}
private
_getResult
(
:
{
:
URI
;
?
:
string
|
undefined
;
}
,
:
)
{
let
:
{
:
string
;
:
}
|
undefined
=
undefined
;
const
=
this
.
.
createById
(
'json'
)
;
const
=
.
.
find
(
=>
.
===
.
||
.
===
.
)
;
const
=
this
.
parseStreamOutput
(
)
;
if
(
)
{
=
;
return
;
}
const
=
.
.
map
(
=>
(
{
:
.
,
:
.
.
map
(
=>
(
{
:
.
,
:
.
.
toString
(
)
}
)
)
}
)
)
;
const
=
toFormattedString
(
,
{
}
)
;
=
{
:
,
}
;
return
;
}
async
provideOutputsTextContent
(
:
URI
)
:
Promise
<
|
null
>
{
const
=
this
.
.
getModel
(
)
;
if
(
)
{
return
;
}
const
=
.
parseCellPropertyUri
(
,
.
)
;
if
(
!
)
{
return
null
;
}
const
=
await
this
.
.
resolve
(
.
)
;
const
=
.
.
.
.
find
(
=>
.
===
.
)
;
if
(
!
)
{
.
dispose
(
)
;
return
null
;
}
const
=
this
.
.
createById
(
'json'
)
;
const
=
this
.
.
createModel
(
getFormattedOutputJSON
(
.
||
[
]
)
,
,
,
true
)
;
const
=
.
any
(
.
??
.
,
.
??
.
)
(
(
)
=>
{
.
setValue
(
getFormattedOutputJSON
(
.
||
[
]
)
)
;
}
)
;
const
=
.
onWillDispose
(
(
)
=>
{
.
dispose
(
)
;
.
dispose
(
)
;
.
dispose
(
)
;
}
)
;
return
;
}
async
provideOutputTextContent
(
:
URI
)
:
Promise
<
|
null
>
{
const
=
this
.
.
getModel
(
)
;
if
(
)
{
return
;
}
const
=
.
parseCellOutputUri
(
)
;
if
(
!
)
{
return
this
.
provideOutputsTextContent
(
)
;
}
const
=
await
this
.
.
resolve
(
.
)
;
const
=
.
.
.
.
find
(
=>
!
!
.
.
find
(
=>
.
===
.
||
.
===
.
)
)
;
if
(
!
)
{
.
dispose
(
)
;
return
null
;
}
const
=
this
.
_getResult
(
,
)
;
if
(
!
)
{
.
dispose
(
)
;
return
null
;
}
const
=
this
.
.
createModel
(
.
,
.
,
)
;
const
=
.
any
(
.
??
.
,
.
??
.
)
(
(
)
=>
{
const
=
this
.
_getResult
(
,
)
;
if
(
!
)
{
return
;
}
.
setValue
(
.
)
;
.
setLanguage
(
.
.
)
;
}
)
;
const
=
.
onWillDispose
(
(
)
=>
{
.
dispose
(
)
;
.
dispose
(
)
;
.
dispose
(
)
;
}
)
;
return
;
}
}
class
NotebookMetadataContentProvider
{
static
readonly
ID
=
'workbench.contrib.notebookMetadataContentProvider'
;
private
readonly
:
[
]
=
[
]
;
constructor
(
@ ITextModelService
:
,
@ IModelService
private
readonly
:
,
@ ILanguageService
private
readonly
:
,
@ ILabelService
private
readonly
:
,
@ INotebookEditorModelResolverService
private
readonly
:
,
)
{
this
.
.
push
(
.
registerTextModelContentProvider
(
.
,
{
:
this
.
provideMetadataTextContent
.
bind
(
this
)
}
)
)
;
this
.
.
push
(
this
.
.
registerFormatter
(
{
:
.
,
:
{
:
'${path} (metadata)'
,
:
'/'
}
}
)
)
;
}
dispose
(
)
:
void
{
dispose
(
this
.
)
;
}
async
provideMetadataTextContent
(
:
URI
)
:
Promise
<
|
null
>
{
const
=
this
.
.
getModel
(
)
;
if
(
)
{
return
;
}
const
=
.
parse
(
)
;
if
(
!
)
{
return
null
;
}
const
=
await
this
.
.
resolve
(
)
;
let
:
|
null
=
null
;
const
=
this
.
.
createById
(
'json'
)
;
const
=
new
DisposableStore
(
)
;
const
=
getFormattedNotebookMetadataJSON
(
.
.
.
.
,
.
.
.
)
;
=
this
.
.
createModel
(
,
,
)
;
if
(
!
)
{
.
dispose
(
)
;
return
null
;
}
this
.
.
push
(
.
add
(
.
.
.
onDidChangeContent
(
=>
{
if
(
&&
.
.
some
(
=>
(
.
===
.
||
.
===
.
||
.
===
.
)
)
)
{
const
=
getFormattedNotebookMetadataJSON
(
.
.
.
.
,
.
.
.
)
;
if
(
.
getValue
(
)
!==
)
{
.
setValue
(
)
;
}
}
}
)
)
)
;
const
=
.
onWillDispose
(
(
)
=>
{
.
dispose
(
)
;
.
dispose
(
)
;
.
dispose
(
)
;
}
)
;
return
;
}
}
class
RegisterSchemasContribution
extends
Disposable
implements
IWorkbenchContribution
{
static
readonly
ID
=
'workbench.contrib.registerCellSchemas'
;
constructor
(
)
{
super
(
)
;
this
.
registerMetadataSchemas
(
)
;
}
private
registerMetadataSchemas
(
)
:
void
{
const
=
.
as < IJSONContributionRegistry>
(
.
)
;
const
:
=
{
:
{
[
'language'
]
:
{
:
'string'
,
:
'The language for the cell'
}
}
,
:
true
,
:
true
,
:
true
}
;
.
registerSchema
(
'vscode://schemas/notebook/cellmetadata'
,
)
;
}
}
class
NotebookEditorManager
implements
IWorkbenchContribution
{
static
readonly
ID
=
'workbench.contrib.notebookEditorManager'
;
private
readonly
=
new
DisposableStore
(
)
;
constructor
(
@ IEditorService
private
readonly
:
,
@ INotebookEditorModelResolverService
private
readonly
:
,
@ IEditorGroupsService
:
)
{
type
E
=
;
this
.
.
add
(
.
debounce < E , E [ ] >
(
this
.
.
,
(
,
)
=>
!
?
[
]
:
[
...
,
]
,
100
)
(
this
.
,
this
)
)
;
this
.
.
add
(
.
onWillFailWithConflict
(
=>
{
for
(
const
of
.
)
{
const
=
.
.
filter
(
=>
instanceof
NotebookEditorInput
&&
.
!==
.
&&
isEqual
(
.
,
.
)
)
;
const
=
.
closeEditors
(
)
;
.
waitUntil
(
)
;
}
}
)
)
;
}
dispose
(
)
:
void
{
this
.
.
dispose
(
)
;
}
private
_openMissingDirtyNotebookEditors
(
:
[
]
)
:
void
{
const
:
[
]
=
[
]
;
for
(
const
of
)
{
if
(
.
isDirty
(
)
&&
!
this
.
.
isOpened
(
{
:
.
,
:
.
ID
,
:
.
}
)
&&
extname
(
.
)
!==
'.interactive'
)
{
.
push
(
{
:
.
,
:
{
:
true
,
:
true
,
:
true
,
:
.
}
}
)
;
}
}
if
(
.
>
0
)
{
this
.
.
openEditors
(
)
;
}
}
}
class
SimpleNotebookWorkingCopyEditorHandler
extends
Disposable
implements
IWorkbenchContribution
,
{
static
readonly
ID
=
'workbench.contrib.simpleNotebookWorkingCopyEditorHandler'
;
constructor
(
@ IInstantiationService
private
readonly
:
,
@ IWorkingCopyEditorService
private
readonly
:
,
@ IExtensionService
private
readonly
:
,
@ INotebookService
private
readonly
:
)
{
super
(
)
;
this
.
_installHandler
(
)
;
}
async
handles
(
:
)
:
Promise
<
boolean
>
{
const
=
this
.
handlesSync
(
)
;
if
(
!
)
{
return
false
;
}
return
this
.
.
canResolve
(
)
;
}
private
handlesSync
(
:
)
:
string
|
undefined
{
const
=
this
.
_getViewType
(
)
;
if
(
!
||
===
'interactive'
)
{
return
undefined
;
}
return
;
}
isOpen
(
:
,
:
)
:
boolean
{
if
(
!
this
.
handlesSync
(
)
)
{
return
false
;
}
return
instanceof
NotebookEditorInput
&&
.
===
this
.
_getViewType
(
)
&&
isEqual
(
.
,
.
)
;
}
createEditor
(
:
)
:
{
return
.
getOrCreate
(
this
.
,
.
,
undefined
,
this
.
_getViewType
(
)
!
)
;
}
private
async
_installHandler
(
)
:
Promise
<
void
>
{
await
this
.
.
whenInstalledExtensionsRegistered
(
)
;
this
.
_register
(
this
.
.
registerHandler
(
this
)
)
;
}
private
_getViewType
(
:
)
{
const
=
.
parse
(
.
)
;
if
(
&&
.
===
.
)
{
return
?.
;
}
return
undefined
;
}
}
class
NotebookLanguageSelectorScoreRefine
{
static
readonly
ID
=
'workbench.contrib.notebookLanguageSelectorScoreRefine'
;
constructor
(
@ INotebookService
private
readonly
:
,
@ ILanguageFeaturesService
:
,
)
{
.
setNotebookTypeResolver
(
this
.
_getNotebookInfo
.
bind
(
this
)
)
;
}
private
_getNotebookInfo
(
:
URI
)
:
|
undefined
{
const
=
.
parse
(
)
;
if
(
!
)
{
return
undefined
;
}
const
=
this
.
.
getNotebookTextModel
(
.
)
;
if
(
!
)
{
return
undefined
;
}
return
{
:
.
,
:
.
}
;
}
}
const
=
.
as < IWorkbenchContributionsRegistry>
(
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
registerWorkbenchContribution2
(
.
ID
,
,
.
)
;
.
registerWorkbenchContribution
(
,
.
)
;
.
register
(
new
NotebookAccessibleView
(
)
)
;
.
register
(
new
NotebookAccessibilityHelp
(
)
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
registerSingleton
(
,
,
.
)
;
const
:
=
{
}
;
function
isConfigurationPropertySchema
(
:
|
{
[
:
string
]
:
}
)
:
is
{
return
(
typeof
.
!==
'undefined'
||
typeof
.
!==
'undefined'
)
;
}
for
(
const
of
)
{
const
=
.
;
if
(
)
{
if
(
isConfigurationPropertySchema
(
)
)
{
[
` editor. ${ editorOption. name} `
]
=
;
}
else
{
for
(
const
in
)
{
if
(
.
hasOwnProperty
.
call
(
,
)
)
{
[
]
=
[
]
;
}
}
}
}
}
const
:
=
{
:
.
localize
(
'notebook.editorOptions.experimentalCustomization'
,
'Settings for code editors used in notebooks. This can be used to customize most editor.* settings.'
)
,
default
:
{
}
,
:
[
{
:
,
}
]
,
:
[
'notebookLayout'
]
}
;
const
=
.
as < IConfigurationRegistry>
(
.
)
;
.
registerConfiguration
(
{
:
'notebook'
,
:
100
,
:
.
localize
(
'notebookConfigurationTitle'
,
"Notebook"
)
,
:
'object'
,
:
{
[
.
]
:
{
:
.
localize
(
'notebook.displayOrder.description'
,
"Priority list for output mime types"
)
,
:
'array'
,
:
{
:
'string'
}
,
default
:
[
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.cellToolbarLocation.description'
,
"Where the cell toolbar should be shown, or whether it should be hidden."
)
,
:
'object'
,
:
{
:
.
localize
(
'notebook.cellToolbarLocation.viewType'
,
"Configure the cell toolbar position for specific file types"
)
,
:
'string'
,
enum
:
[
'left'
,
'right'
,
'hidden'
]
}
,
default
:
{
'default'
:
'right'
}
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.showCellStatusbar.description'
,
"Whether the cell status bar should be shown."
)
,
:
'string'
,
enum
:
[
'hidden'
,
'visible'
,
'visibleAfterExecute'
]
,
:
[
.
localize
(
'notebook.showCellStatusbar.hidden.description'
,
"The cell status bar is always hidden."
)
,
.
localize
(
'notebook.showCellStatusbar.visible.description'
,
"The cell status bar is always visible."
)
,
.
localize
(
'notebook.showCellStatusbar.visibleAfterExecute.description'
,
"The cell status bar is hidden until the cell has executed. Then it becomes visible to show the execution status."
)
]
,
default
:
'visible'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.cellExecutionTimeVerbosity.description'
,
"Controls the verbosity of the cell execution time in the cell status bar."
)
,
:
'string'
,
enum
:
[
'default'
,
'verbose'
]
,
:
[
.
localize
(
'notebook.cellExecutionTimeVerbosity.default.description'
,
"The cell execution duration is visible, with advanced information in the hover tooltip."
)
,
.
localize
(
'notebook.cellExecutionTimeVerbosity.verbose.description'
,
"The cell last execution timestamp and duration are visible, with advanced information in the hover tooltip."
)
]
,
default
:
'default'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.diff.enablePreview.description'
,
"Whether to use the enhanced text diff editor for notebook."
)
,
:
'boolean'
,
default
:
true
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.diff.enableOverviewRuler.description'
,
"Whether to render the overview ruler in the diff editor for notebook."
)
,
:
'boolean'
,
default
:
false
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.cellToolbarVisibility.description'
,
"Whether the cell toolbar should appear on hover or click."
)
,
:
'string'
,
enum
:
[
'hover'
,
'click'
]
,
default
:
'click'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.undoRedoPerCell.description'
,
"Whether to use separate undo/redo stack for each cell."
)
,
:
'boolean'
,
default
:
true
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.compactView.description'
,
"Control whether the notebook editor should be rendered in a compact form. For example, when turned on, it will decrease the left margin width."
)
,
:
'boolean'
,
default
:
true
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.focusIndicator.description'
,
"Controls where the focus indicator is rendered, either along the cell borders or on the left gutter."
)
,
:
'string'
,
enum
:
[
'border'
,
'gutter'
]
,
default
:
'gutter'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.insertToolbarPosition.description'
,
"Control where the insert cell actions should appear."
)
,
:
'string'
,
enum
:
[
'betweenCells'
,
'notebookToolbar'
,
'both'
,
'hidden'
]
,
:
[
.
localize
(
'insertToolbarLocation.betweenCells'
,
"A toolbar that appears on hover between cells."
)
,
.
localize
(
'insertToolbarLocation.notebookToolbar'
,
"The toolbar at the top of the notebook editor."
)
,
.
localize
(
'insertToolbarLocation.both'
,
"Both toolbars."
)
,
.
localize
(
'insertToolbarLocation.hidden'
,
"The insert actions don't appear anywhere."
)
,
]
,
default
:
'both'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.globalToolbar.description'
,
"Control whether to render a global toolbar inside the notebook editor."
)
,
:
'boolean'
,
default
:
true
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.stickyScrollEnabled.description'
,
"Experimental. Control whether to render notebook Sticky Scroll headers in the notebook editor."
)
,
:
'boolean'
,
default
:
false
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.stickyScrollMode.description'
,
"Control whether nested sticky lines appear to stack flat or indented."
)
,
:
'string'
,
enum
:
[
'flat'
,
'indented'
]
,
:
[
.
localize
(
'notebook.stickyScrollMode.flat'
,
"Nested sticky lines appear flat."
)
,
.
localize
(
'notebook.stickyScrollMode.indented'
,
"Nested sticky lines appear indented."
)
,
]
,
default
:
'indented'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.consolidatedOutputButton.description'
,
"Control whether outputs action should be rendered in the output toolbar."
)
,
:
'boolean'
,
default
:
true
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.showFoldingControls.description'
,
"Controls when the Markdown header folding arrow is shown."
)
,
:
'string'
,
enum
:
[
'always'
,
'never'
,
'mouseover'
]
,
:
[
.
localize
(
'showFoldingControls.always'
,
"The folding controls are always visible."
)
,
.
localize
(
'showFoldingControls.never'
,
"Never show the folding controls and reduce the gutter size."
)
,
.
localize
(
'showFoldingControls.mouseover'
,
"The folding controls are visible only on mouseover."
)
,
]
,
default
:
'mouseover'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.dragAndDrop.description'
,
"Control whether the notebook editor should allow moving cells through drag and drop."
)
,
:
'boolean'
,
default
:
true
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.consolidatedRunButton.description'
,
"Control whether extra actions are shown in a dropdown next to the run button."
)
,
:
'boolean'
,
default
:
false
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.globalToolbarShowLabel'
,
"Control whether the actions on the notebook toolbar should render label or not."
)
,
:
'string'
,
enum
:
[
'always'
,
'never'
,
'dynamic'
]
,
default
:
'always'
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.textOutputLineLimit'
,
"Controls how many lines of text are displayed in a text output. If {0} is enabled, this setting is used to determine the scroll height of the output."
,
'`#notebook.output.scrolling#`'
)
,
:
'number'
,
default
:
30
,
:
[
'notebookLayout'
,
'notebookOutputLayout'
]
,
:
1
,
}
,
[
.
]
:
{
:
.
localize
(
'notebook.disableOutputFilePathLinks'
,
"Control whether to disable filepath links in the output of notebook cells."
)
,
:
'boolean'
,
default
:
true
,
:
[
'notebookOutputLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.minimalErrorRendering'
,
"Control whether to render error output in a minimal style."
)
,
:
'boolean'
,
default
:
false
,
:
[
'notebookOutputLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.markup.fontSize'
,
"Controls the font size in pixels of rendered markup in notebooks. When set to {0}, 120% of {1} is used."
,
'`0`'
,
'`#editor.fontSize#`'
)
,
:
'number'
,
default
:
0
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.markdown.lineHeight'
,
"Controls the line height in pixels of markdown cells in notebooks. When set to {0}, {1} will be used"
,
'`0`'
,
'`normal`'
)
,
:
'number'
,
default
:
0
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
,
[
.
]
:
{
:
.
localize
(
'notebook.interactiveWindow.collapseCodeCells'
,
"Controls whether code cells in the interactive window are collapsed by default."
)
,
:
'string'
,
enum
:
[
'always'
,
'never'
,
'fromEditor'
]
,
default
:
'fromEditor'
}
,
[
.
]
:
{
:
.
localize
(
'notebook.outputLineHeight'
,
"Line height of the output text within notebook cells.\n - When set to 0, editor line height is used.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values."
)
,
:
'number'
,
default
:
0
,
:
[
'notebookLayout'
,
'notebookOutputLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.outputFontSize'
,
"Font size for the output text within notebook cells. When set to 0, {0} is used."
,
'`#editor.fontSize#`'
)
,
:
'number'
,
default
:
0
,
:
[
'notebookLayout'
,
'notebookOutputLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.outputFontFamily'
,
"The font family of the output text within notebook cells. When set to empty, the {0} is used."
,
'`#editor.fontFamily#`'
)
,
:
'string'
,
:
[
'notebookLayout'
,
'notebookOutputLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.outputScrolling'
,
"Initially render notebook outputs in a scrollable region when longer than the limit."
)
,
:
'boolean'
,
:
[
'notebookLayout'
,
'notebookOutputLayout'
]
,
default
:
typeof
.
===
'string'
&&
.
!==
'stable'
}
,
[
.
]
:
{
:
.
localize
(
'notebook.outputWordWrap'
,
"Controls whether the lines in output should wrap."
)
,
:
'boolean'
,
:
[
'notebookLayout'
,
'notebookOutputLayout'
]
,
default
:
false
}
,
[
.
]
:
{
:
.
localize
(
'notebookFormatter.default'
,
"Defines a default notebook formatter which takes precedence over all other formatter settings. Must be the identifier of an extension contributing a formatter."
)
,
:
[
'string'
,
'null'
]
,
default
:
null
,
enum
:
.
,
:
.
,
:
.
}
,
[
.
]
:
{
:
.
localize
(
'notebook.formatOnSave'
,
"Format a notebook on save. A formatter must be available and the editor must not be shutting down. When {0} is set to `afterDelay`, the file will only be formatted when saved explicitly."
,
'`#files.autoSave#`'
)
,
:
'boolean'
,
:
[
'notebookLayout'
]
,
default
:
false
}
,
[
.
]
:
{
:
.
localize
(
'notebook.insertFinalNewline'
,
"When enabled, insert a final new line into the end of code cells when saving a notebook."
)
,
:
'boolean'
,
:
[
'notebookLayout'
]
,
default
:
false
}
,
[
.
]
:
{
:
.
localize
(
'notebook.formatOnCellExecution'
,
"Format a notebook cell upon execution. A formatter must be available."
)
,
:
'boolean'
,
default
:
false
}
,
[
.
]
:
{
:
.
localize
(
'notebook.confirmDeleteRunningCell'
,
"Control whether a confirmation prompt is required to delete a running cell."
)
,
:
'boolean'
,
default
:
true
}
,
[
.
]
:
{
:
.
localize
(
'notebook.findFilters'
,
"Customize the Find Widget behavior for searching within notebook cells. When both markup source and markup preview are enabled, the Find Widget will search either the source code or preview based on the current state of the cell."
)
,
:
'object'
,
:
{
:
{
:
'boolean'
,
default
:
true
}
,
:
{
:
'boolean'
,
default
:
true
}
,
:
{
:
'boolean'
,
default
:
true
}
,
:
{
:
'boolean'
,
default
:
true
}
}
,
default
:
{
:
true
,
:
true
,
:
true
,
:
true
}
,
:
[
'notebookLayout'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.remoteSaving'
,
"Enables the incremental saving of notebooks between processes and across Remote connections. When enabled, only the changes to the notebook are sent to the extension host, improving performance for large notebooks and slow network connections."
)
,
:
'boolean'
,
default
:
typeof
.
===
'string'
&&
.
!==
'stable'
,
:
[
'experimental'
]
}
,
[
.
]
:
{
:
.
localize
(
'notebook.scrolling.revealNextCellOnExecute.description'
,
"How far to scroll when revealing the next cell upon running {0}."
,
'notebook.cell.executeAndSelectBelow'
)
,
:
'string'
,
enum
:
[
'fullCell'
,
'firstLine'
,
'none'
]
,
:
[
.
localize
(
'notebook.scrolling.revealNextCellOnExecute.fullCell.description'
,
'Scroll to fully reveal the next cell.'
)
,
.
localize
(
'notebook.scrolling.revealNextCellOnExecute.firstLine.description'
,
'Scroll to reveal the first line of the next cell.'
)
,
.
localize
(
'notebook.scrolling.revealNextCellOnExecute.none.description'
,
'Do not scroll.'
)
,
]
,
default
:
'fullCell'
}
,
[
.
]
:
{
:
.
localize
(
'notebook.cellGenerate'
,
"Enable experimental generate action to create code cell with inline chat enabled."
)
,
:
'boolean'
,
default
:
true
}
,
[
.
]
:
{
:
.
localize
(
'notebook.VariablesView.description'
,
"Enable the experimental notebook variables view within the debug panel."
)
,
:
'boolean'
,
default
:
false
}
,
[
.
]
:
{
:
.
localize
(
'notebook.inlineValues.description'
,
"Control whether to show inline values within notebook code cells after cell execution. Values will remain until the cell is edited, re-executed, or explicitly cleared via the Clear All Outputs toolbar button or the `Notebook: Clear Inline Values` command."
)
,
:
'string'
,
enum
:
[
'on'
,
'auto'
,
'off'
]
,
:
[
.
localize
(
'notebook.inlineValues.on'
,
"Always show inline values, with a regex fallback if no inline value provider is registered. Note: There may be a performance impact in larger cells if the fallback is used."
)
,
.
localize
(
'notebook.inlineValues.auto'
,
"Show inline values only when an inline value provider is registered."
)
,
.
localize
(
'notebook.inlineValues.off'
,
"Never show inline values."
)
,
]
,
default
:
'off'
}
,
[
.
]
:
{
:
.
localize
(
'notebook.cellFailureDiagnostics'
,
"Show available diagnostics for cell failures."
)
,
:
'boolean'
,
default
:
true
}
,
[
.
]
:
{
:
.
localize
(
'notebook.backup.sizeLimit'
,
"The limit of notebook output size in kilobytes (KB) where notebook files will no longer be backed up for hot reload. Use 0 for unlimited."
)
,
:
'number'
,
default
:
10000
}
,
[
.
]
:
{
:
.
localize
(
'notebook.multiCursor.enabled'
,
"Experimental. Enables a limited set of multi cursor controls across multiple cells in the notebook editor. Currently supported are core editor actions (typing/cut/copy/paste/composition) and a limited subset of editor commands."
)
,
:
'boolean'
,
default
:
false
}
,
[
.
]
:
{
:
.
localize
(
'notebook.markup.fontFamily'
,
"Controls the font family of rendered markup in notebooks. When left blank, this will fall back to the default workbench font family."
)
,
:
'string'
,
default
:
''
,
:
[
'notebookLayout'
]
}
}
}
)
;