ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / workbench / test / browser / componentFixtures / fixtureUtils.ts 1174 строк · изменён 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
import { defineFixture, defineFixtureGroup, defineFixtureVariants } from '@vscode/component-explorer' ;
import { z } from 'zod' ;
import { DisposableStore, DisposableTracker, IDisposable, IReference, MutableDisposable, setDisposableTracker, toDisposable } from '../../../../base/common/lifecycle.js' ;
import { URI } from '../../../../base/common/uri.js' ;
import { ModifierKeyEmitter } from '../../../../base/browser/dom.js' ;
IEnvironmentService
IExtensionResourceLoaderService
ThemeTypeSelector
IColorTheme IThemeService
ColorThemeData
ExtensionData
ensureGlobalStylesInstalled getStylesheetDocumentFiles overrideStylesheetOrder ReverseStylesheetsOption
SyncDescriptor
ServiceIdentifier
ServiceCollection
TestInstantiationService
Emitter Event
mock
ICodeEditorService
IInlineCompletionsService InlineCompletionsService
ILanguageService
ILanguageConfigurationService
IEditorWorkerService
ILanguageFeatureDebounceService LanguageFeatureDebounceService
ILanguageFeaturesService
LanguageFeaturesService
LanguageService
IModelService
ModelService
ITextResourcePropertiesService
ITreeSitterLibraryService
ICodeLensCache
TestCodeEditorService TestCommandService
TestLanguageConfigurationService
TestEditorWorkerService
TestTextResourcePropertiesService
TestTreeSitterLibraryService
IAccessibilityService
TestAccessibilityService
IActionViewItemService NullActionViewItemService
IChatPhoneInputPresenter
IChatPasteTargetService
ChatPasteTargetService
IMenuService
IClipboardService
TestClipboardService
ICommandService
IConfigurationService
TestConfigurationService
IContextKeyService
IContextMenuService IContextViewService
IWorkspaceTrustManagementService IWorkspaceTrustRequestService
IDataChannelService NullDataChannelService
IDefaultAccountService
IDialogService
TestDialogService
IHoverService
IKeybindingService
MockContextKeyService MockKeybindingService
ILabelService
ILoggerService ILogService NullLoggerService NullLogService
INotificationService
TestNotificationService
IOpenerService
NullOpenerService
IApplicationSharedStorageValueChangeEvent IApplicationStorageValueChangeEvent IProfileStorageValueChangeEvent IStorageEntry IStorageService IStorageTargetChangeEvent IStorageValueChangeEvent IWillSaveStateEvent IWorkspaceStorageValueChangeEvent StorageScope StorageTarget WillSaveStateReason
ITelemetryService
NullTelemetryServiceShape
TestThemeService
IUndoRedoService
UndoRedoService
IUserDataProfile
IUserInteractionService MockUserInteractionService
IActionWidgetService
IAnyWorkspaceIdentifier IWorkspaceContextService
TestContextService
TestMenuService
IAccessibilitySignalService
IResolvedTextEditorModel ITextModelService
IAgentFeedbackService
IChatEditingService
ISessionsManagementService
ISessionsService
ISessionChangesStatsCache SessionChangesStatsCache
ICodeReviewService PRReviewStateKind
constObservable
IPreferencesService
ITextModel
IdleDeadline installFakeRunWhenIdle
buildHistoryFromTasks renderSwimlanes
pushRandomOverwrite
captureGlobalTimeApi
createLoggingTimeApi
createTraceRoot
createVirtualTimeApi
drainMicrotasksEmbedding
nextMacrotask
pushGlobalTimeApi
TraceContext
untilTime
VirtualClock
VirtualTimeProcessor
sourceMapSupport
sourceMapSupport
environment
handleUncaughtExceptions
source
mapUrl source
xhr
xhr mapUrl
xhr
xhr status
url map xhr responseText
_serviceBrand
_onDidChangeValue
scope StorageScope key disposable DisposableStore Event IWorkspaceStorageValueChangeEvent
scope StorageScope key disposable DisposableStore Event IProfileStorageValueChangeEvent
scope StorageScope key disposable DisposableStore Event IApplicationStorageValueChangeEvent
scope StorageScope key disposable DisposableStore Event IApplicationSharedStorageValueChangeEvent
scope StorageScope key disposable DisposableStore Event IStorageValueChangeEvent
Event _onDidChangeValue event e e scope scope key e key key disposable
_onDidChangeTarget
onDidChangeTarget Event IStorageTargetChangeEvent _onDidChangeTarget event
_onWillSaveState
onWillSaveState Event IWillSaveStateEvent _onWillSaveState event
key scope StorageScope fallbackValue
key scope StorageScope fallbackValue
_key _scope StorageScope fallbackValue
fallbackValue
key scope StorageScope fallbackValue
key scope StorageScope fallbackValue
_key _scope StorageScope fallbackValue
fallbackValue
key scope StorageScope fallbackValue
key scope StorageScope fallbackValue
_key _scope StorageScope fallbackValue
fallbackValue
key scope StorageScope fallbackValue
key scope StorageScope fallbackValue
_key _scope StorageScope fallbackValue
fallbackValue
_key _value _scope StorageScope _target StorageTarget
_entries IStorageEntry _external
_key _scope StorageScope
_scope StorageScope
_reason WillSaveStateReason
_scope StorageScope
_scope StorageScope _target StorageTarget
_scope IAnyWorkspaceIdentifier IUserDataProfile
dark_modern type
dark_plus type
dark_vs type
hc_black type
light_modern type
light_plus type
light_vs type
themeJsonModules Record
dark_modern
dark_plus
dark_vs
hc_black
light_modern
light_plus
light_vs
fixtureExtensionResourceLoaderService
_serviceBrand
uri
content themeJsonModules uri path
content
content
themePath uiTheme ThemeTypeSelector ColorThemeData
location
ColorThemeData
id themePath path themePath uiTheme _watch
location
ExtensionData
darkTheme ThemeTypeSelector
lightTheme ThemeTypeSelector
darkHighContrastTheme ThemeTypeSelector
label
background
theme ColorThemeData
scopeThemingParticipants
ComponentFixtureThemeVariant scopeThemingParticipants
darkThemeVariant label background theme darkTheme scopeThemingParticipants satisfies ComponentFixtureThemeVariant
lightThemeVariant label background theme lightTheme scopeThemingParticipants satisfies ComponentFixtureThemeVariant
additionalThemeVariants
darkHighContrast label background theme darkHighContrastTheme scopeThemingParticipants
satisfies Record ComponentFixtureAdditionalThemeVariant
additionalThemeVariants
themeLoadedPromises
theme ColorThemeData
themeLoadedPromise themeLoadedPromises theme
themeLoadedPromise
themeLoadedPromise theme fixtureExtensionResourceLoaderService
themeLoadedPromises theme themeLoadedPromise
themeLoadedPromise
container HTMLElement theme ColorThemeData scopeThemingParticipants
theme
theme scopeThemingParticipants
container classList theme classNames
reverseStylesheets
reverseStylesheetsRange Exclude ReverseStylesheetsOption
enableAnimations
outputTimeTrace
outputStylesheetFiles
input FixtureRenderInput
input input
reverseStylesheets reverseStylesheetsRange enableAnimations outputTimeTrace outputStylesheetFiles
record input Record
reverseStylesheets record reverseStylesheets
reverseStylesheetsRange record reverseStylesheetsRange
enableAnimations record enableAnimations
outputTimeTrace record outputTimeTrace
outputStylesheetFiles record outputStylesheetFiles
value Exclude ReverseStylesheetsOption
value value
range value Record
range fromIndex range toIndex
fromIndex range fromIndex toIndex range toIndex
input ReverseStylesheetsOption
parsedInput input
parsedInput reverseStylesheetsRange parsedInput reverseStylesheets
fixtureInputSchema z
reverseStylesheets z
reverseStylesheetsRange z
fromIndex z
toIndex z
enableAnimations z
outputTimeTrace z
outputStylesheetFiles z
alwaysUseMac
alwaysUseMac
ua navigator userAgent
ua
ua
id ServiceIdentifier ctor args
id ServiceIdentifier instance
id ServiceIdentifier instance Partial
colorTheme IColorTheme
additionalServices registration ServiceRegistration
override message args
message args
override message Error args
message args
override message Error args
message args
override
model
model
model
_modelService IModelService
override resource IReference IResolvedTextEditorModel
model _modelService resource
model
object textEditorModel model IResolvedTextEditorModel
override IDisposable
override
disposables DisposableStore options CreateServicesOptions TestInstantiationService
services
serviceIdentifiers ServiceIdentifier
define id ServiceIdentifier ctor args
services id
services id ctor
serviceIdentifiers id
defineInstance id ServiceIdentifier instance
services id
services id instance
serviceIdentifiers id
definePartialInstance id ServiceIdentifier instance Partial
id instance
IAccessibilityService TestAccessibilityService
IKeybindingService MockKeybindingService
IClipboardService TestClipboardService
IEditorWorkerService TestEditorWorkerService
IOpenerService NullOpenerService
INotificationService TestNotificationService
IDialogService TestDialogService
IUndoRedoService UndoRedoService
ILanguageService LanguageService
ILanguageConfigurationService TestLanguageConfigurationService
IConfigurationService TestConfigurationService
ITextResourcePropertiesService TestTextResourcePropertiesService
IStorageService
options colorTheme
IThemeService options colorTheme
IThemeService TestThemeService
ILogService FixtureLogService
IModelService FixtureModelService
ICodeEditorService TestCodeEditorService
IContextKeyService MockContextKeyService
ICommandService TestCommandService
ITelemetryService NullTelemetryServiceShape
ILoggerService NullLoggerService
IDataChannelService NullDataChannelService
IEnvironmentService
_serviceBrand
override isBuilt
override isExtensionDevelopment
ILanguageFeatureDebounceService LanguageFeatureDebounceService
ILanguageFeaturesService LanguageFeaturesService
ITreeSitterLibraryService TestTreeSitterLibraryService
IInlineCompletionsService InlineCompletionsService
ICodeLensCache
_serviceBrand
IHoverService
_serviceBrand
IDefaultAccountService
_serviceBrand
onDidChangeDefaultAccount event
onDidChangePolicyData event
policyData
currentDefaultAccount
copilotTokenInfo
onDidChangeCopilotTokenInfo event
managedSettingsFetchStatus
managedSettingsFetchedAt
managedSettingsRawResponse
managedSettingsCompatibilityError
onDidChangeManagedSettingsCompatibilityError Event None
managedSettingsFreshness
onDidChangeManagedSettingsFreshness Event None
id name scopes enterprise
path
IUserInteractionService
IActionWidgetService
_serviceBrand
IAccessibilitySignalService
_serviceBrand
value onDidChange Event None
Event None
ITextModelService FixtureTextModelService
IAgentFeedbackService
_serviceBrand
onDidChangeFeedback Event None
onDidChangeFeedbackVisibility Event None
onDidChangeNavigation Event None
onDidChangeFeedbackScope Event None
activeFeedbackSessionResource
onDidAddFeedback Event None
onDidConvertFeedback Event None
onDidAddReply Event None
onDidSubmitFeedback Event None
onDidRevealSessionComment Event None
activeIdx totalCount
IChatEditingService
_serviceBrand
editingSessionsObs
ISessionsManagementService
_serviceBrand
ISessionsService
_serviceBrand
activeSession
ISessionChangesStatsCache SessionChangesStatsCache
ICodeReviewService
_serviceBrand
kind PRReviewStateKind None
IPreferencesService
_serviceBrand
options additionalServices
define id ServiceIdentifier ctor args
services id ctor
serviceIdentifiers id
defineInstance id ServiceIdentifier instance
services id instance
serviceIdentifiers id
definePartialInstance id ServiceIdentifier instance Partial
services id instance
serviceIdentifiers id
instantiationService disposables services
disposables
id serviceIdentifiers
instanceOrDescriptor services id
instanceOrDescriptor dispose
instanceOrDescriptor
instantiationService
registration ServiceRegistration
registration IContextMenuService
_serviceBrand
registration IContextViewService
anchorAlignment
_serviceBrand
registration ILabelService
uri uri path
uri uri path
_serviceBrand
registration IWorkspaceContextService TestContextService
registration IMenuService TestMenuService
registration IActionViewItemService NullActionViewItemService
registration IChatPhoneInputPresenter
_serviceBrand
enabled
registration IWorkspaceTrustManagementService
override onDidChangeTrust Event None
override workspaceTrustInitialized
override
registration IWorkspaceTrustRequestService
override
registration IChatPasteTargetService
instantiationService TestInstantiationService
text
uri
languageId
ITextModel
modelService instantiationService IModelService
languageService instantiationService ILanguageService
languageSelection languageId languageService languageId
modelService text languageSelection uri
kind
blocksCi
flaky
labels ThemedFixtureGroupLabels
result
labels kind
result
labels kind
result
labels blocksCi
result
labels flaky
result
result
_items IDisposable
_isDisposed
item
_isDisposed
item
_items item
item
_isDisposed
_items length
_items
container HTMLElement
disposableStore DisposableStore
disposableStackStore DisposableStackStore
theme ColorThemeData
context ComponentFixtureContext
labels ThemedFixtureGroupLabels
virtualTime enabled durationMs teardownDrainMs
additionalThemes ComponentFixtureAdditionalTheme
expectedVisualDescriptions
ReturnType defineFixtureVariants
realTimeApi
logOutsideTime
logOutsideTime
loggingTimeApi realTimeApi name stack handler
handlerStr handler handler handler
loggingTimeApi
fixtureRenderCounter
options ComponentFixtureOptions ThemedFixtures
themeVariant ComponentFixtureThemeVariant
isolation
displayMode type
background themeVariant background
expectedVisualDescriptions options expectedVisualDescriptions
inputSchema fixtureInputSchema
inputControls
reverseStylesheets placement label
enableAnimations placement label
container HTMLElement context
disposableStore
input context input
label themeLabel theme scopeThemingParticipants themeVariant
disposableStore
virtualTimeEnabled options virtualTime enabled context host kind
leakDetectionEnabled context host kind
leakDetectionEnabled
ModifierKeyEmitter
tracker leakDetectionEnabled
tracker
tracker
clock
p
clock
realTimeApi
realTimeApi
defaultMaxEvents
virtualTimeApi clock fakeRequestAnimationFrame
teardownDrainMs options virtualTime teardownDrainMs
context
teardownTimeApi IDisposable
virtualTimeEnabled
teardownTimeApi virtualTimeApi
disposableStore
e
virtualTimeEnabled
p
until clock now teardownDrainMs
maxEvents
maxTraceDepth
e
teardownTimeApi
p
tracker
result tracker
result
container theme scopeThemingParticipants
stylesheetOrderOverride disposableStore
input
option input
stylesheetOrderOverride
option
stylesheetOrderOverride value option
context _value input input
context _value input input
context value
container classList value
renderTimeApi IDisposable
virtualTimeEnabled
renderTimeApi virtualTimeApi
disposableStore _targetWindow callback _timeout
stackTrace stack
trace TraceContext instance stackTrace
clock
time clock now
deadline IdleDeadline
didTimeout
deadline
source
stackTrace
trace
disposableStackStore disposableStore
result options container disposableStore disposableStackStore theme
p2 virtualTimeEnabled
p
until clock now options virtualTime durationMs
maxEvents
maxTraceDepth
result result
p2
e
virtualTimeEnabled p history length
startTime p history time
history p history startTime
e
renderTimeApi
fixtureRoot
TraceContext instance fixtureRoot actualRender
cb realTimeApi cb
input outputTimeTrace virtualTimeEnabled p history length
startTime p history time
history p history startTime
output history
input outputStylesheetFiles
output stylesheetFiles
labels options labels
additionalFixtures Object options additionalThemes additionalTheme
themeVariant additionalThemeVariants additionalTheme
themeVariant label themeVariant
labels length labels
Dark darkThemeVariant
Light lightThemeVariant
additionalFixtures
path
labels ThemedFixtureGroupLabels
Record ThemedFixtures ReturnType defineFixtureGroup
options ThemedFixtureGroupOptions fixtures ThemedFixtureGroupFixtures ReturnType defineFixtureGroup
fixtures ThemedFixtureGroupFixtures ReturnType defineFixtureGroup
optionsOrFixtures ThemedFixtureGroupOptions ThemedFixtureGroupFixtures fixtures ThemedFixtureGroupFixtures ReturnType defineFixtureGroup
fixtures
options optionsOrFixtures ThemedFixtureGroupOptions
labels options labels
path options path
fixtures ThemedFixtureGroupFixtures
optionsOrFixtures ThemedFixtureGroupFixtures
import
'../../../../../../build/vite/style.css'
;
import
'../../../browser/media/style.css'
;
import
'../../../browser/parts/auxiliarybar/media/auxiliaryBarPart.css'
;
import
{
}
from
'../../../../platform/environment/common/environment.js'
;
import
{
}
from
'../../../../platform/extensionResourceLoader/common/extensionResourceLoader.js'
;
import
{
}
from
'../../../../platform/theme/common/theme.js'
;
import
{
,
}
from
'../../../../platform/theme/common/themeService.js'
;
import
{
}
from
'../../../services/themes/common/colorThemeData.js'
;
import
{
}
from
'../../../services/themes/common/workbenchThemeService.js'
;
import
{
,
,
,
}
from
'./fixtureUtilsCss.js'
;
import
{
}
from
'../../../../platform/instantiation/common/descriptors.js'
;
import
{
}
from
'../../../../platform/instantiation/common/instantiation.js'
;
import
{
}
from
'../../../../platform/instantiation/common/serviceCollection.js'
;
import
{
}
from
'../../../../platform/instantiation/test/common/instantiationServiceMock.js'
;
import
{
,
}
from
'../../../../base/common/event.js'
;
import
{
}
from
'../../../../base/test/common/mock.js'
;
import
{
}
from
'../../../../editor/browser/services/codeEditorService.js'
;
import
{
,
}
from
'../../../../editor/browser/services/inlineCompletionsService.js'
;
import
{
}
from
'../../../../editor/common/languages/language.js'
;
import
{
}
from
'../../../../editor/common/languages/languageConfigurationRegistry.js'
;
import
{
}
from
'../../../../editor/common/services/editorWorker.js'
;
import
{
,
}
from
'../../../../editor/common/services/languageFeatureDebounce.js'
;
import
{
}
from
'../../../../editor/common/services/languageFeatures.js'
;
import
{
}
from
'../../../../editor/common/services/languageFeaturesService.js'
;
import
{
}
from
'../../../../editor/common/services/languageService.js'
;
import
{
}
from
'../../../../editor/common/services/model.js'
;
import
{
}
from
'../../../../editor/common/services/modelService.js'
;
import
{
}
from
'../../../../editor/common/services/textResourceConfiguration.js'
;
import
{
}
from
'../../../../editor/common/services/treeSitter/treeSitterLibraryService.js'
;
import
{
}
from
'../../../../editor/contrib/codelens/browser/codeLensCache.js'
;
import
{
,
}
from
'../../../../editor/test/browser/editorTestServices.js'
;
import
{
}
from
'../../../../editor/test/common/modes/testLanguageConfigurationService.js'
;
import
{
}
from
'../../../../editor/test/common/services/testEditorWorkerService.js'
;
import
{
}
from
'../../../../editor/test/common/services/testTextResourcePropertiesService.js'
;
import
{
}
from
'../../../../editor/test/common/services/testTreeSitterLibraryService.js'
;
import
{
}
from
'../../../../platform/accessibility/common/accessibility.js'
;
import
{
}
from
'../../../../platform/accessibility/test/common/testAccessibilityService.js'
;
import
{
,
}
from
'../../../../platform/actions/browser/actionViewItemService.js'
;
import
{
}
from
'../../../contrib/chat/browser/widget/input/chatPhoneInputPresenter.js'
;
import
{
}
from
'../../../contrib/chat/browser/chat.js'
;
import
{
}
from
'../../../contrib/chat/browser/attachments/chatPasteTargetService.js'
;
import
{
}
from
'../../../../platform/actions/common/actions.js'
;
import
{
}
from
'../../../../platform/clipboard/common/clipboardService.js'
;
import
{
}
from
'../../../../platform/clipboard/test/common/testClipboardService.js'
;
import
{
}
from
'../../../../platform/commands/common/commands.js'
;
import
{
}
from
'../../../../platform/configuration/common/configuration.js'
;
import
{
}
from
'../../../../platform/configuration/test/common/testConfigurationService.js'
;
import
{
}
from
'../../../../platform/contextkey/common/contextkey.js'
;
import
{
,
}
from
'../../../../platform/contextview/browser/contextView.js'
;
import
{
,
}
from
'../../../../platform/workspace/common/workspaceTrust.js'
;
import
{
,
}
from
'../../../../platform/dataChannel/common/dataChannel.js'
;
import
{
,
MANAGED_SETTINGS_FRESHNESS_NOT_REQUIRED
}
from
'../../../../platform/defaultAccount/common/defaultAccount.js'
;
import
{
}
from
'../../../../platform/dialogs/common/dialogs.js'
;
import
{
}
from
'../../../../platform/dialogs/test/common/testDialogService.js'
;
import
{
}
from
'../../../../platform/hover/browser/hover.js'
;
import
{
}
from
'../../../../platform/keybinding/common/keybinding.js'
;
import
{
,
}
from
'../../../../platform/keybinding/test/common/mockKeybindingService.js'
;
import
{
}
from
'../../../../platform/label/common/label.js'
;
import
{
,
,
,
}
from
'../../../../platform/log/common/log.js'
;
import
{
}
from
'../../../../platform/notification/common/notification.js'
;
import
{
}
from
'../../../../platform/notification/test/common/testNotificationService.js'
;
import
{
}
from
'../../../../platform/opener/common/opener.js'
;
import
{
}
from
'../../../../platform/opener/test/common/nullOpenerService.js'
;
import
{
,
,
,
,
,
,
,
,
,
,
,
}
from
'../../../../platform/storage/common/storage.js'
;
import
{
}
from
'../../../../platform/telemetry/common/telemetry.js'
;
import
{
}
from
'../../../../platform/telemetry/common/telemetryUtils.js'
;
import
{
}
from
'../../../../platform/theme/test/common/testThemeService.js'
;
import
{
}
from
'../../../../platform/undoRedo/common/undoRedo.js'
;
import
{
}
from
'../../../../platform/undoRedo/common/undoRedoService.js'
;
import
{
}
from
'../../../../platform/userDataProfile/common/userDataProfile.js'
;
import
{
,
}
from
'../../../../platform/userInteraction/browser/userInteractionService.js'
;
import
{
}
from
'../../../../platform/actionWidget/browser/actionWidget.js'
;
import
{
,
}
from
'../../../../platform/workspace/common/workspace.js'
;
import
{
}
from
'../../common/workbenchTestServices.js'
;
import
{
}
from
'../workbenchTestServices.js'
;
import
{
}
from
'../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js'
;
import
{
,
}
from
'../../../../editor/common/services/resolverService.js'
;
import
{
AGENT_FEEDBACK_NEW_SESSION_RESOURCE
,
}
from
'../../../../sessions/contrib/agentFeedback/browser/agentFeedbackService.js'
;
import
{
}
from
'../../../contrib/chat/common/editing/chatEditingService.js'
;
import
{
}
from
'../../../../sessions/services/sessions/common/sessionsManagement.js'
;
import
{
}
from
'../../../../sessions/services/sessions/browser/sessionsService.js'
;
import
{
,
}
from
'../../../../sessions/services/sessions/common/sessionChangesStatsCache.js'
;
import
{
,
}
from
'../../../../sessions/contrib/codeReview/browser/codeReviewService.js'
;
import
{
}
from
'../../../../base/common/observable.js'
;
import
{
}
from
'../../../services/preferences/common/preferences.js'
;
import
{
}
from
'../../../../editor/common/model.js'
;
import
'./fixtures.css'
;
import
{
,
}
from
'../../../../base/common/async.js'
;
import
{
,
}
from
'../../../../base/test/common/executionGraph.js'
;
import
{
}
from
'../../../../base/test/common/randomOverwrite.js'
;
import
{
,
,
,
,
,
,
,
,
,
,
,
}
from
'../../../../base/test/common/virtualScheduling/index.js'
;
import
'../../../../platform/theme/common/colors/baseColors.js'
;
import
'../../../../platform/theme/common/colors/editorColors.js'
;
import
'../../../../platform/theme/common/colors/listColors.js'
;
import
'../../../../platform/theme/common/colors/miscColors.js'
;
import
'../../../common/theme.js'
;
import
from
'source-map-support'
;
.
install
(
{
:
'browser'
,
:
false
,
retrieveSourceMap
:
(
:
string
)
=>
{
const
=
+
'.map'
;
try
{
const
=
new
XMLHttpRequest
(
)
;
.
open
(
'GET'
,
,
false
)
;
.
send
(
)
;
if
(
.
===
200
)
{
return
{
:
null
as
never
,
:
.
}
;
}
}
catch
{
}
return
null
;
}
,
}
)
;
class
NullStorageService
implements
IStorageService
{
declare
readonly
:
undefined
;
private
readonly
=
new
Emitter< IStorageValueChangeEvent>
(
)
;
onDidChangeValue
(
:
.
WORKSPACE
,
:
string
|
undefined
,
:
)
:
<
>
;
onDidChangeValue
(
:
.
PROFILE
,
:
string
|
undefined
,
:
)
:
<
>
;
onDidChangeValue
(
:
.
APPLICATION
,
:
string
|
undefined
,
:
)
:
<
>
;
onDidChangeValue
(
:
.
APPLICATION_SHARED
,
:
string
|
undefined
,
:
)
:
<
>
;
onDidChangeValue
(
:
,
:
string
|
undefined
,
:
)
:
<
>
{
return
.
filter
(
this
.
.
,
=>
.
===
&&
(
===
undefined
||
.
===
)
,
)
;
}
private
readonly
=
new
Emitter< IStorageTargetChangeEvent>
(
)
;
readonly
:
<
>
=
this
.
.
;
private
readonly
=
new
Emitter< IWillSaveStateEvent>
(
)
;
readonly
:
<
>
=
this
.
.
;
get
(
:
string
,
:
,
:
string
)
:
string
;
get
(
:
string
,
:
,
?
:
string
)
:
string
|
undefined
;
get
(
:
string
,
:
,
?
:
string
)
:
string
|
undefined
{
return
;
}
getBoolean
(
:
string
,
:
,
:
boolean
)
:
boolean
;
getBoolean
(
:
string
,
:
,
?
:
boolean
)
:
boolean
|
undefined
;
getBoolean
(
:
string
,
:
,
?
:
boolean
)
:
boolean
|
undefined
{
return
;
}
getNumber
(
:
string
,
:
,
:
number
)
:
number
;
getNumber
(
:
string
,
:
,
?
:
number
)
:
number
|
undefined
;
getNumber
(
:
string
,
:
,
?
:
number
)
:
number
|
undefined
{
return
;
}
getObject < T extends object>
(
:
string
,
:
,
:
T
)
:
T
;
getObject < T extends object>
(
:
string
,
:
,
?
:
T
)
:
T
|
undefined
;
getObject < T extends object>
(
:
string
,
:
,
?
:
T
)
:
T
|
undefined
{
return
;
}
store
(
:
string
,
:
string
|
boolean
|
number
|
undefined
|
null
,
:
,
:
)
:
void
{
}
storeAll
(
:
[
]
,
:
boolean
)
:
void
{
}
remove
(
:
string
,
:
)
:
void
{
}
isNew
(
:
)
:
boolean
{
return
true
;
}
flush
(
?
:
)
:
Promise
<
void
>
{
return
Promise
.
resolve
(
)
;
}
optimize
(
:
)
:
Promise
<
void
>
{
return
Promise
.
resolve
(
)
;
}
log
(
)
:
void
{
}
keys
(
:
,
:
)
:
string
[
]
{
return
[
]
;
}
switch
(
)
:
Promise
<
void
>
{
return
Promise
.
resolve
(
)
;
}
hasScope
(
:
|
)
:
boolean
{
return
false
;
}
}
import
from
'../../../../../../extensions/theme-defaults/themes/dark_modern.json'
with
{
:
'json'
}
;
import
from
'../../../../../../extensions/theme-defaults/themes/dark_plus.json'
with
{
:
'json'
}
;
import
from
'../../../../../../extensions/theme-defaults/themes/dark_vs.json'
with
{
:
'json'
}
;
import
from
'../../../../../../extensions/theme-defaults/themes/hc_black.json'
with
{
:
'json'
}
;
import
from
'../../../../../../extensions/theme-defaults/themes/light_modern.json'
with
{
:
'json'
}
;
import
from
'../../../../../../extensions/theme-defaults/themes/light_plus.json'
with
{
:
'json'
}
;
import
from
'../../../../../../extensions/theme-defaults/themes/light_vs.json'
with
{
:
'json'
}
;
const
:
<
string
,
string
>
=
{
'/extensions/theme-defaults/themes/dark_modern.json'
:
as
unknown
as
string
,
'/extensions/theme-defaults/themes/dark_plus.json'
:
as
unknown
as
string
,
'/extensions/theme-defaults/themes/dark_vs.json'
:
as
unknown
as
string
,
'/extensions/theme-defaults/themes/hc_black.json'
:
as
unknown
as
string
,
'/extensions/theme-defaults/themes/light_modern.json'
:
as
unknown
as
string
,
'/extensions/theme-defaults/themes/light_plus.json'
:
as
unknown
as
string
,
'/extensions/theme-defaults/themes/light_vs.json'
:
as
unknown
as
string
,
}
;
const
=
new
class
implements
IExtensionResourceLoaderService
{
declare
readonly
:
undefined
;
async
readExtensionResource
(
:
URI
)
:
Promise
<
string
>
{
const
=
[
.
]
;
if
(
===
undefined
)
{
throw
new
Error
(
` Fixture extension resource not found: ${ uri. toString ( ) } `
)
;
}
return
;
}
supportsExtensionGalleryResources
(
)
:
Promise
<
boolean
>
{
return
Promise
.
resolve
(
false
)
;
}
isExtensionGalleryResource
(
)
:
Promise
<
boolean
>
{
return
Promise
.
resolve
(
false
)
;
}
getExtensionGalleryResourceURL
(
)
:
Promise
<
URI
|
undefined
>
{
return
Promise
.
resolve
(
undefined
)
;
}
}
;
function
createBuiltInTheme
(
:
string
,
:
)
:
{
const
=
URI
.
parse
(
` file:// ${ themePath} `
)
;
return
.
fromExtensionTheme
(
{
:
,
:
,
,
:
false
}
,
,
.
fromName
(
'vscode'
,
'theme-defaults'
,
true
)
)
;
}
export
const
=
createBuiltInTheme
(
'/extensions/theme-defaults/themes/dark_modern.json'
,
.
VS_DARK
)
;
export
const
=
createBuiltInTheme
(
'/extensions/theme-defaults/themes/light_modern.json'
,
.
VS
)
;
const
=
createBuiltInTheme
(
'/extensions/theme-defaults/themes/hc_black.json'
,
.
HC_BLACK
)
;
type
ComponentFixtureThemeVariant
=
{
readonly
:
string
;
readonly
:
'dark'
|
'light'
;
readonly
:
;
readonly
:
boolean
;
}
;
type
ComponentFixtureAdditionalThemeVariant
=
&
{
readonly
:
true
}
;
const
=
{
:
'Dark'
,
:
'dark'
,
:
,
:
false
}
as
const
;
const
=
{
:
'Light'
,
:
'light'
,
:
,
:
false
}
as
const
;
const
=
{
:
{
:
'DarkHighContrast'
,
:
'dark'
,
:
,
:
true
}
,
}
as
const
<
string
,
>
;
export
type
ComponentFixtureAdditionalTheme
=
keyof
typeof
;
const
=
new
WeakMap< ColorThemeData, Promise < void >>
(
)
;
function
ensureThemeLoaded
(
:
)
:
Promise
<
void
>
{
let
=
.
get
(
)
;
if
(
!
)
{
=
.
ensureLoaded
(
)
;
.
set
(
,
)
;
}
return
;
}
export
async
function
setupTheme
(
:
,
:
,
=
false
)
:
Promise
<
void
>
{
await
ensureThemeLoaded
(
)
;
await
ensureGlobalStylesInstalled
(
,
)
;
.
.
add
(
'component-fixture'
,
'monaco-workbench'
,
getPlatformClass
(
)
,
'disable-animations'
,
...
.
)
;
}
interface
FixtureRenderInput
{
readonly
:
boolean
;
readonly
:
<
,
boolean
>
|
undefined
;
readonly
:
boolean
;
readonly
:
boolean
;
readonly
:
boolean
;
}
function
parseFixtureInput
(
:
unknown
)
:
{
if
(
!
||
typeof
!==
'object'
)
{
return
{
:
false
,
:
undefined
,
:
false
,
:
false
,
:
false
}
;
}
const
=
as
<
string
,
unknown
>
;
return
{
:
.
===
true
,
:
parseReverseStylesheetsRange
(
.
)
,
:
.
===
true
,
:
!
!
.
,
:
!
!
.
,
}
;
}
function
parseReverseStylesheetsRange
(
:
unknown
)
:
<
,
boolean
>
|
undefined
{
if
(
&&
typeof
===
'object'
)
{
const
=
as
<
string
,
unknown
>
;
if
(
typeof
.
===
'number'
&&
typeof
.
===
'number'
)
{
return
{
:
.
,
:
.
}
;
}
}
return
undefined
;
}
function
getReverseStylesheetsOption
(
:
unknown
)
:
{
const
=
parseFixtureInput
(
)
;
return
.
??
.
;
}
const
=
.
object
(
{
:
.
boolean
(
)
.
default
(
false
)
.
describe
(
'Reverse the order of the bundled CSS documents to surface cascade-order dependencies.'
)
,
:
.
object
(
{
:
.
number
(
)
,
:
.
number
(
)
,
}
)
.
optional
(
)
.
describe
(
'Reverse the bundled CSS documents in this half-open index range.'
)
,
:
.
boolean
(
)
.
default
(
false
)
.
describe
(
'Enable CSS animations and transitions.'
)
,
:
.
boolean
(
)
.
default
(
false
)
.
describe
(
'Return the render\'s virtual-time trace as its output.'
)
,
:
.
boolean
(
)
.
default
(
false
)
.
describe
(
'Return the bundled stylesheet files as the render output.'
)
,
}
)
;
function
getPlatformClass
(
)
:
string
{
const
=
true
;
if
(
)
{
return
'mac'
;
}
else
{
const
=
.
;
if
(
.
includes
(
'Macintosh'
)
)
{
return
'mac'
;
}
if
(
.
includes
(
'Linux'
)
)
{
return
'linux'
;
}
return
'windows'
;
}
}
export
interface
ServiceRegistration
{
define < T >
(
:
<
T
>
,
:
new
(
...
:
never
[
]
)
=>
T
)
:
void
;
defineInstance < T >
(
:
<
T
>
,
:
T
)
:
void
;
definePartialInstance < T >
(
:
<
T
>
,
:
<
T
>
)
:
void
;
}
export
interface
CreateServicesOptions
{
?
:
;
?
:
(
:
)
=>
void
;
}
export
class
FixtureLogService
extends
NullLogService
{
warn
(
:
string
,
...
:
unknown
[
]
)
:
void
{
console
.
warn
(
,
...
)
;
}
error
(
:
string
|
,
...
:
unknown
[
]
)
:
void
{
console
.
error
(
,
...
)
;
}
critical
(
:
string
|
,
...
:
unknown
[
]
)
:
void
{
console
.
error
(
,
...
)
;
}
}
export
class
FixtureModelService
extends
ModelService
{
dispose
(
)
:
void
{
for
(
const
of
this
.
getModels
(
)
)
{
if
(
!
.
isDisposed
(
)
)
{
.
dispose
(
)
;
}
}
super
.
dispose
(
)
;
}
}
export
class
FixtureTextModelService
extends
mock< ITextModelService>
(
)
{
constructor
(
@ IModelService
private
readonly
:
)
{
super
(
)
;
}
async
createModelReference
(
:
URI
)
:
Promise
<
<
>>
{
const
=
this
.
.
getModel
(
)
;
if
(
!
)
{
throw
new
Error
(
` FixtureTextModelService: no model registered for ${ resource. toString ( ) } `
)
;
}
return
{
:
{
:
}
as
,
dispose
(
)
{
}
,
}
;
}
registerTextModelContentProvider
(
)
:
{
return
{
dispose
(
)
{
}
}
;
}
canHandleResource
(
)
:
boolean
{
return
false
;
}
}
export
function
createEditorServices
(
:
,
?
:
)
:
{
const
=
new
ServiceCollection
(
)
;
const
:
<
any
>
[
]
=
[
]
;
const
=
<
T
>
(
:
<
T
>
,
:
new
(
...
:
any
[
]
)
=>
T
)
=>
{
if
(
!
.
has
(
)
)
{
.
set
(
,
new
SyncDescriptor
(
)
)
;
}
.
push
(
)
;
}
;
const
=
<
T
>
(
:
<
T
>
,
:
T
)
=>
{
if
(
!
.
has
(
)
)
{
.
set
(
,
)
;
}
.
push
(
)
;
}
;
const
=
<
T
>
(
:
<
T
>
,
:
<
T
>
)
=>
{
defineInstance
(
,
as
T
)
;
}
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
defineInstance
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
defineInstance
(
,
new
NullStorageService
(
)
)
;
if
(
?.
)
{
defineInstance
(
,
new
TestThemeService
(
.
)
)
;
}
else
{
define
(
,
)
;
}
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
class
extends
mock < IEnvironmentService>
(
)
{
declare
readonly
:
undefined
;
:
boolean
=
true
;
:
boolean
=
false
;
}
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
define
(
,
)
;
defineInstance
(
,
{
:
undefined
,
put
:
(
)
=>
{
}
,
get
:
(
)
=>
undefined
,
delete
:
(
)
=>
{
}
,
}
)
;
defineInstance
(
,
{
:
undefined
,
showDelayedHover
:
(
)
=>
undefined
,
setupDelayedHover
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
setupDelayedHoverAtMouse
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
showInstantHover
:
(
)
=>
undefined
,
hideHover
:
(
)
=>
{
}
,
showAndFocusLastHover
:
(
)
=>
{
}
,
setupManagedHover
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
,
show
:
(
)
=>
{
}
,
hide
:
(
)
=>
{
}
,
update
:
(
)
=>
{
}
}
)
,
showManagedHover
:
(
)
=>
{
}
,
}
)
;
defineInstance
(
,
{
:
undefined
,
:
new
Emitter< null >
(
)
.
,
:
new
Emitter< null >
(
)
.
,
:
null
,
:
null
,
:
null
,
:
new
Emitter< null >
(
)
.
,
:
null
,
:
null
,
:
null
,
:
null
,
:
.
,
:
MANAGED_SETTINGS_FRESHNESS_NOT_REQUIRED
,
:
.
,
getDefaultAccount
:
async
(
)
=>
null
,
getDefaultAccountAuthenticationProvider
:
(
)
=>
(
{
:
'test'
,
:
'Test'
,
:
[
]
,
:
false
}
)
,
resolveGitHubUrl
:
(
:
string
)
=>
` https://github.com/ ${ path} `
,
setDefaultAccountProvider
:
(
)
=>
{
}
,
refresh
:
async
(
)
=>
null
,
signIn
:
async
(
)
=>
null
,
signOut
:
async
(
)
=>
{
}
,
}
)
;
defineInstance
(
,
new
MockUserInteractionService
(
true
,
false
)
)
;
definePartialInstance
(
,
{
:
undefined
,
show
:
(
)
=>
{
}
,
hide
:
(
)
=>
{
}
,
get
isVisible
(
)
{
return
false
;
}
,
}
)
;
defineInstance
(
,
{
:
undefined
,
playSignal
:
async
(
)
=>
{
}
,
playSignals
:
async
(
)
=>
{
}
,
playSignalLoop
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
getEnabledState
:
(
)
=>
(
{
:
false
,
:
.
,
onChange
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
}
)
,
getDelayMs
:
(
)
=>
0
,
playSound
:
async
(
)
=>
{
}
,
isSoundEnabled
:
(
)
=>
false
,
isAnnouncementEnabled
:
(
)
=>
false
,
onSoundEnabledChanged
:
(
)
=>
.
,
}
)
;
define
(
,
)
;
defineInstance
(
,
{
:
undefined
,
:
.
,
:
.
,
:
.
,
:
.
,
:
constObservable
(
AGENT_FEEDBACK_NEW_SESSION_RESOURCE
)
,
:
.
,
:
.
,
:
.
,
:
.
,
:
.
,
addFeedback
:
(
)
=>
undefined
!
,
removeFeedback
:
(
)
=>
{
}
,
updateFeedback
:
(
)
=>
{
}
,
updateFeedbackSourcePullRequest
:
(
)
=>
{
}
,
acceptFeedback
:
(
)
=>
{
}
,
addReply
:
(
)
=>
{
}
,
getFeedback
:
(
)
=>
[
]
,
showFeedbackInEditor
:
(
)
=>
{
}
,
hideFeedbackInEditor
:
(
)
=>
{
}
,
getVisibleResolvedFeedbackIds
:
(
)
=>
new
Set
(
)
,
hasLoadedFeedback
:
(
)
=>
true
,
getSessionForFile
:
(
)
=>
undefined
,
getFeedbackSessionResource
:
(
)
=>
undefined
,
registerFeedbackResourceScope
:
(
)
=>
toDisposable
(
(
)
=>
{
}
)
,
getMostRecentSessionForResource
:
(
)
=>
undefined
,
revealFeedback
:
async
(
)
=>
{
}
,
revealSessionComment
:
async
(
)
=>
{
}
,
getNextFeedback
:
(
)
=>
undefined
,
getNextNavigableItem
:
(
)
=>
undefined
,
setNavigationAnchor
:
(
)
=>
{
}
,
getNavigationBearing
:
(
)
=>
(
{
:
-
1
,
:
0
}
)
,
clearFeedback
:
(
)
=>
{
}
,
markFeedbackSubmitted
:
(
)
=>
{
}
,
submitFeedback
:
async
(
)
=>
false
,
addFeedbackAndSubmit
:
async
(
)
=>
{
}
,
setFeedbackResolved
:
async
(
)
=>
{
}
,
}
)
;
definePartialInstance
(
,
{
:
undefined
,
:
constObservable
(
[
]
)
,
startOrContinueGlobalEditingSession
:
(
)
=>
undefined
!
,
getEditingSession
:
(
)
=>
undefined
,
}
)
;
definePartialInstance
(
,
{
:
undefined
,
getSession
:
(
)
=>
undefined
,
getSessions
:
(
)
=>
[
]
,
}
)
;
definePartialInstance
(
,
{
:
undefined
,
:
constObservable
(
undefined
)
,
}
)
;
define
(
,
)
;
definePartialInstance
(
,
{
:
undefined
,
getPRReviewState
:
(
)
=>
constObservable
(
{
:
.
}
)
,
resolvePRReviewThread
:
async
(
)
=>
{
}
,
markPRReviewCommentConverted
:
(
)
=>
{
}
,
}
)
;
definePartialInstance
(
,
{
:
undefined
,
openSettings
:
async
(
)
=>
undefined
,
}
)
;
?.
?.
(
{
:
<
T
>
(
:
<
T
>
,
:
new
(
...
:
any
[
]
)
=>
T
)
=>
{
.
set
(
,
new
SyncDescriptor
(
)
)
;
.
push
(
)
;
}
,
:
<
T
>
(
:
<
T
>
,
:
T
)
=>
{
.
set
(
,
)
;
.
push
(
)
;
}
,
:
<
T
>
(
:
<
T
>
,
:
<
T
>
)
=>
{
.
set
(
,
as
T
)
;
.
push
(
)
;
}
,
}
)
;
const
=
.
add
(
new
TestInstantiationService
(
,
true
,
undefined
,
true
)
)
;
.
add
(
toDisposable
(
(
)
=>
{
for
(
const
of
)
{
const
=
.
get
(
)
;
if
(
typeof
?.
===
'function'
)
{
.
dispose
(
)
;
}
}
}
)
)
;
return
;
}
export
function
registerWorkbenchServices
(
:
)
:
void
{
.
defineInstance
(
,
{
showContextMenu
:
(
)
=>
{
}
,
onDidShowContextMenu
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
onDidHideContextMenu
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
:
undefined
,
}
)
;
.
defineInstance
(
,
{
showContextView
:
(
)
=>
(
{
close
:
(
)
=>
{
}
}
)
,
hideContextView
:
(
)
=>
{
}
,
getContextViewElement
:
(
)
=>
{
throw
new
Error
(
'Not implemented'
)
;
}
,
layout
:
(
)
=>
{
}
,
:
0
,
:
undefined
,
}
)
;
.
defineInstance
(
,
{
getUriLabel
:
(
:
URI
)
=>
.
,
getUriBasenameLabel
:
(
:
URI
)
=>
.
.
split
(
'/'
)
.
pop
(
)
??
''
,
getWorkspaceLabel
:
(
)
=>
''
,
getHostLabel
:
(
)
=>
''
,
getSeparator
:
(
)
=>
'/'
,
registerFormatter
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
onDidChangeFormatters
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
getUriHome
:
(
)
=>
undefined
,
registerCachedFormatter
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
:
undefined
,
getHostTooltip
:
(
)
=>
''
,
}
)
;
.
define
(
,
)
;
.
define
(
,
)
;
.
define
(
,
)
;
.
defineInstance
(
,
{
:
undefined
,
:
constObservable
(
false
)
,
showCombinedModeAndModelSheet
:
(
)
=>
Promise
.
resolve
(
)
,
setImpl
:
(
)
=>
(
{
dispose
:
(
)
=>
{
}
}
)
,
}
)
;
.
defineInstance
(
,
new
class
extends
mock< IWorkspaceTrustManagementService>
(
)
{
=
.
;
readonly
=
Promise
.
resolve
(
)
;
isWorkspaceTrusted
(
)
{
return
true
;
}
}
(
)
)
;
.
defineInstance
(
,
new
class
extends
mock< IWorkspaceTrustRequestService>
(
)
{
async
requestWorkspaceTrust
(
)
{
return
true
;
}
}
(
)
)
;
.
defineInstance
(
,
new
ChatPasteTargetService
(
)
)
;
}
export
function
createTextModel
(
:
,
:
string
,
:
URI
,
?
:
string
)
:
{
const
=
.
get
(
)
;
const
=
.
get
(
)
;
const
=
?
.
createById
(
)
:
null
;
return
.
createModel
(
,
,
)
;
}
export
interface
ThemedFixtureGroupLabels
{
readonly
?
:
'screenshot'
|
'animated'
;
readonly
?
:
true
;
readonly
?
:
true
;
}
function
resolveLabels
(
:
|
undefined
)
:
string
[
]
{
const
:
string
[
]
=
[
]
;
if
(
?.
===
'screenshot'
)
{
.
push
(
'.screenshot'
)
;
}
else
if
(
?.
===
'animated'
)
{
.
push
(
'animated'
)
;
}
if
(
?.
)
{
.
push
(
'blocks-ci'
)
;
}
if
(
?.
)
{
.
push
(
'flaky'
)
;
}
return
;
}
export
class
DisposableStackStore
implements
IDisposable
{
private
readonly
:
[
]
=
[
]
;
private
=
false
;
add < T extends IDisposable>
(
:
T
)
:
T
{
if
(
this
.
)
{
.
dispose
(
)
;
console
.
warn
(
'Adding to a disposed DisposableStackStore'
)
;
}
else
{
this
.
.
push
(
)
;
}
return
;
}
dispose
(
)
:
void
{
this
.
=
true
;
while
(
this
.
.
>
0
)
{
this
.
.
pop
(
)
!
.
dispose
(
)
;
}
}
}
export
interface
ComponentFixtureContext
{
:
;
:
;
:
;
:
;
}
export
interface
ComponentFixtureOptions
{
render
:
(
:
)
=>
void
|
Promise
<
void
>
;
?
:
;
?
:
{
?
:
boolean
;
?
:
number
;
?
:
number
}
;
?
:
readonly
[
]
;
?
:
readonly
string
[
]
;
}
type
ThemedFixtures
=
<
typeof
>
;
const
=
captureGlobalTimeApi
(
)
;
const
=
false
;
if
(
)
{
const
=
createLoggingTimeApi
(
,
(
,
,
)
=>
{
const
=
typeof
===
'function'
?
.
toString
(
)
.
slice
(
0
,
500
)
:
String
(
)
;
console
.
warn
(
` [ComponentFixture] Real ${ name} called outside of virtual time.\nHandler: ${ handlerStr} \nStack: ${ stack} `
)
;
}
)
;
pushGlobalTimeApi
(
)
;
}
let
=
0
;
export
function
defineComponentFixture
(
:
)
:
{
const
createFixture
=
(
:
)
=>
defineFixture
(
{
:
'none'
,
:
{
:
'component'
}
,
:
.
,
:
.
,
:
,
:
{
:
{
:
'toolbar'
,
:
'Reverse Stylesheets'
}
,
:
{
:
'toolbar'
,
:
'Enable Animations'
}
,
}
,
render
:
async
(
:
,
)
=>
{
const
=
new
DisposableStore
(
)
;
const
=
parseFixtureInput
(
.
)
;
const
{
:
,
,
}
=
;
.
add
(
pushRandomOverwrite
(
42
)
)
;
const
=
(
.
?.
??
true
)
&&
.
.
!==
'explorer-ui'
;
const
=
true
&&
.
.
!==
'explorer-ui'
;
if
(
)
{
.
getInstance
(
)
;
}
const
=
?
new
DisposableTracker
(
)
:
undefined
;
if
(
)
{
setDisposableTracker
(
)
;
}
const
=
new
VirtualClock
(
new
Date
(
'2026-05-14T12:00:00Z'
)
.
getTime
(
)
)
;
const
=
new
VirtualTimeProcessor
(
,
drainMicrotasksEmbedding
(
)
,
,
{
:
100
}
,
)
;
const
=
createVirtualTimeApi
(
,
{
:
true
}
)
;
const
=
.
?.
??
1100
;
.
addDisposable
(
{
dispose
:
async
(
)
=>
{
let
:
|
undefined
;
if
(
)
{
=
pushGlobalTimeApi
(
)
;
}
try
{
.
dispose
(
)
;
}
catch
(
)
{
console
.
error
(
` [ComponentFixture] error disposing fixture: ${ e instanceof Error ? e. stack : e} `
)
;
}
if
(
)
{
try
{
await
.
run
(
{
:
untilTime
(
.
+
)
,
:
1000
,
:
5
,
}
)
;
}
catch
(
)
{
console
.
error
(
` [ComponentFixture] error draining virtual time during teardown: ${ e instanceof Error ? e. stack : e} `
)
;
}
}
?.
dispose
(
)
;
.
dispose
(
)
;
if
(
)
{
setDisposableTracker
(
null
)
;
const
=
.
computeLeakingDisposables
(
)
;
if
(
)
{
throw
new
Error
(
` There are ${ result. leaks. length} undisposed disposables! ${ result. details} `
)
;
}
}
}
,
}
)
;
async
function
actualRender
(
)
{
await
setupTheme
(
,
,
)
;
const
=
.
add
(
new
MutableDisposable< IDisposable>
(
)
)
;
const
updateStylesheetOrder
=
(
:
unknown
)
=>
{
const
=
getReverseStylesheetsOption
(
)
;
.
clear
(
)
;
if
(
!==
false
)
{
.
=
overrideStylesheetOrder
(
)
;
}
}
;
.
watchInput
(
'reverseStylesheets'
,
(
,
)
=>
updateStylesheetOrder
(
)
)
;
.
watchInput
(
'reverseStylesheetsRange'
,
(
,
)
=>
updateStylesheetOrder
(
)
)
;
.
watchInput
(
'enableAnimations'
,
=>
{
.
.
toggle
(
'disable-animations'
,
!
)
;
}
)
;
let
:
|
undefined
;
if
(
)
{
=
pushGlobalTimeApi
(
)
;
.
add
(
installFakeRunWhenIdle
(
(
,
,
?
)
=>
{
const
=
new
Error
(
)
.
;
const
=
.
.
currentTrace
(
)
.
child
(
'runWhenIdle'
,
)
;
return
.
schedule
(
{
:
.
,
run
:
(
)
=>
{
const
:
=
{
:
true
,
timeRemaining
:
(
)
=>
50
,
}
;
callback
(
)
;
}
,
:
{
toString
(
)
{
return
'runWhenIdle'
;
}
,
,
}
,
,
}
)
;
}
)
)
;
}
try
{
const
=
.
add
(
new
DisposableStackStore
(
)
)
;
const
=
.
render
(
{
,
,
,
}
)
;
const
=
?
.
run
(
{
:
untilTime
(
.
+
(
.
?.
??
1000
)
)
,
:
200
,
:
5
,
}
)
:
Promise
.
resolve
(
)
;
await
Promise
.
all
(
[
instanceof
Promise
?
:
Promise
.
resolve
(
)
,
,
]
)
;
}
catch
(
)
{
if
(
&&
.
.
>
0
)
{
const
=
.
[
0
]
.
;
const
=
buildHistoryFromTasks
(
.
,
)
;
console
.
error
(
` [ComponentFixture] ${ themeLabel} virtual-time history ( ${ p. history. length} tasks):\n ${ renderSwimlanes ( history) } `
)
;
}
throw
;
}
finally
{
?.
dispose
(
)
;
}
}
const
=
createTraceRoot
(
` render# ${ ++ fixtureRenderCounter} ( ${ themeLabel} ) `
)
;
await
.
.
runAsHandler
(
,
,
{
afterMicrotaskClosure
:
=>
nextMacrotask
(
,
)
,
}
)
;
if
(
.
&&
&&
.
.
>
0
)
{
const
=
.
[
0
]
.
;
const
=
buildHistoryFromTasks
(
.
,
)
;
return
{
:
renderSwimlanes
(
)
}
;
}
if
(
.
)
{
return
{
:
{
:
await
getStylesheetDocumentFiles
(
)
}
}
;
}
return
undefined
;
}
,
}
)
;
const
=
resolveLabels
(
.
)
;
const
=
.
fromEntries
(
(
.
??
[
]
)
.
map
(
=>
{
const
=
[
]
;
return
[
.
,
createFixture
(
)
]
;
}
)
)
;
return
defineFixtureVariants
(
.
>
0
?
{
}
:
{
}
,
{
:
createFixture
(
)
,
:
createFixture
(
)
,
...
,
}
)
;
}
interface
ThemedFixtureGroupOptions
{
readonly
?
:
string
;
readonly
?
:
;
}
type
ThemedFixtureGroupFixtures
=
<
string
,
|
<
typeof
>>
;
export
function
defineThemedFixtureGroup
(
:
,
:
)
:
<
typeof
>
;
export
function
defineThemedFixtureGroup
(
:
)
:
<
typeof
>
;
export
function
defineThemedFixtureGroup
(
:
|
,
?
:
)
:
<
typeof
>
{
if
(
)
{
const
=
as
;
return
defineFixtureGroup
(
{
:
resolveLabels
(
.
)
,
:
.
,
}
,
as
)
;
}
return
defineFixtureGroup
(
as
)
;
}