ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / workbench / test / electron-browser / workbenchTestServices.ts 407 строк · изменён 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
import { insert } from '../../../base/common/arrays.js' ;
import { VSBuffer, VSBufferReadable, VSBufferReadableStream } from '../../../base/common/buffer.js' ;
import { CancellationToken } from '../../../base/common/cancellation.js' ;
import { Event } from '../../../base/common/event.js' ;
import { DisposableStore, IDisposable } from '../../../base/common/lifecycle.js' ;
import { Schemas } from '../../../base/common/network.js' ;
import { URI , UriComponents } from '../../../base/common/uri.js'
IModelService
ModelService
TestConfigurationService
IContextKeyService
IFileDialogService INativeOpenDialogOptions
IEnvironmentService INativeEnvironmentService
IExtensionManagementService
AbstractNativeExtensionTipsService
IExtensionRecommendationNotificationService
IFileService IFileSystemProvider FileSystemProviderCapabilities IFileReadStreamOptions IFileWriteOptions IFileOpenOptions IFileDeleteOptions IFileOverwriteOptions IStat FileType IWatchOptions
FileService
InMemoryFileSystemProvider
IInstantiationService
ISharedProcessService
NullLogService
IApplicationBadge INativeHostOptions INativeHostService INativeSystemWideKeybinding INativeSystemWideKeybindingResult INativeZipFile IOSProperties IOSStatistics IToastOptions IToastResult PowerSaveBlockerType SystemIdleState ThermalState
IProductService
AuthInfo Credentials
IStorageService
ITelemetryService
IPartsSplash
UriIdentityService
FileUserDataProvider
UserDataProfilesService
IColorScheme IOpenedMainWindow IOpenEmptyWindowOptions IOpenWindowOptions IPoint IRectangle IWindowOpenable
IWorkspaceContextService
IEditorService
IFilesConfigurationService
ILifecycleService
IPathService
ITextEditorService
ITextFileService
NativeTextFileService
IWorkingCopyIdentifier
IWorkingCopyBackupService
IWorkingCopyService
NativeWorkingCopyBackupService
workbenchInstantiationService browserWorkbenchInstantiationService ITestInstantiationService TestEncodingOracle TestEnvironmentService TestFileDialogService TestFilesConfigurationService TestLifecycleService TestTextFileService
TestContextService TestFileService
ReadableStreamEvents
_serviceBrand
channelName
channelName channel
_serviceBrand
windowId
onDidOpenMainWindow Event Event None
onDidMaximizeWindow Event Event None
onDidUnmaximizeWindow Event Event None
onDidFocusMainWindow Event Event None
onDidBlurMainWindow Event Event None
onDidFocusMainOrAuxiliaryWindow Event Event None
onDidBlurMainOrAuxiliaryWindow Event Event None
onDidSuspendOS Event Event None
onDidResumeOS Event Event None
onDidChangeOnBatteryPower Event Event None
onDidChangeThermalState Event ThermalState Event None
onDidChangeSpeedLimit Event Event None
onWillShutdownOS Event Event None
onDidLockScreen Event Event None
onDidUnlockScreen Event Event None
onDidChangeColorScheme Event None
onDidChangePassword Event None
onDidTriggerWindowSystemContextMenu Event windowId x y Event None
onDidChangeWindowFullScreen Event None
onDidChangeWindowAlwaysOnTop Event None
onDidChangeDisplay Event None
windowCount
windowCount
IOpenedMainWindow
IRectangle
windowId VSBuffer
options IOpenEmptyWindowOptions
toOpen IWindowOpenable options IOpenWindowOptions
arg1 IOpenEmptyWindowOptions IWindowOpenable arg2 IOpenWindowOptions
_options folderUri UriComponents sessionResource UriComponents
_keybindings INativeSystemWideKeybinding INativeSystemWideKeybindingResult failed
options INativeHostOptions
options INativeHostOptions
options INativeHostOptions
alwaysOnTop options INativeHostOptions
point IPoint display IRectangle
position IRectangle options INativeHostOptions
options height backgroundColor foregroundColor
color
width height
value IPartsSplash
throttling
options INativeHostOptions
options Electron MessageBoxOptions Electron MessageBoxReturnValue
options Electron SaveDialogOptions Electron SaveDialogReturnValue
options Electron OpenDialogOptions Electron OpenDialogReturnValue
options INativeOpenDialogOptions
options INativeOpenDialogOptions
options INativeOpenDialogOptions
options INativeOpenDialogOptions
path
path
source target
IOSProperties Object
IOSStatistics Object
IColorScheme dark highContrast
edited
badge IApplicationBadge
url defaultApplication
_mediaType
options addArgs removeArgs
code
options Partial Electron OpenDevToolsOptions INativeHostOptions
url
url
environment
autoDetect
wpadDhcp state
wpadDns state
configuredPac state
authInfo AuthInfo Credentials
url
startPort giveUpAfter timeout stride
type
text type
text
format buffer VSBuffer type
options INativeHostOptions
Uint8Array Uint8Array
format VSBuffer VSBuffer Uint8Array
format type
hive path name
zipPath files INativeZipFile
rect IRectangle VSBuffer
_token _repoId fileName _fileBytes VSBuffer contentType fileName assetUrl contentType fileName assetUrl contentType
options IToastOptions IToastResult supported clicked
id
idleThreshold SystemIdleState
ThermalState
type PowerSaveBlockerType
id
id
environmentService INativeEnvironmentService
telemetryService ITelemetryService
extensionManagementService IExtensionManagementService
storageService IStorageService
nativeHostService INativeHostService
extensionRecommendationNotificationService IExtensionRecommendationNotificationService
fileService IFileService
productService IProductService
environmentService userHome nativeHostService telemetryService extensionManagementService storageService extensionRecommendationNotificationService fileService productService
overrides
environmentService instantiationService IInstantiationService IEnvironmentService
fileService instantiationService IInstantiationService IFileService
configurationService instantiationService IInstantiationService TestConfigurationService
textFileService instantiationService IInstantiationService ITextFileService
pathService instantiationService IInstantiationService IPathService
editorService instantiationService IInstantiationService IEditorService
contextKeyService instantiationService IInstantiationService IContextKeyService
textEditorService instantiationService IInstantiationService ITextEditorService
disposables ITestInstantiationService
instantiationService
disposables
overrides
disposables
instantiationService INativeHostService
instantiationService
lifecycleService TestLifecycleService
textFileService TestTextFileService
filesConfigurationService TestFilesConfigurationService
contextService TestContextService
modelService ModelService
fileService TestFileService
nativeHostService TestNativeHostService
fileDialogService TestFileDialogService
workingCopyBackupService TestNativeWorkingCopyBackupService
workingCopyService IWorkingCopyService
editorService IEditorService
_testEncoding TestEncodingOracle
override TestEncodingOracle
_testEncoding
_testEncoding instantiationService TestEncodingOracle
_testEncoding
backupResourceJoiners
discardBackupJoiners
discardedBackups IWorkingCopyIdentifier
discardedAllBackups
pendingBackupsArr
environmentService TestEnvironmentService
logService
fileService logService
lifecycleService
environmentService fileService logService lifecycleService
inMemoryFileSystemProvider
fileService Schemas inMemory inMemoryFileSystemProvider
uriIdentityService fileService
userDataProfilesService environmentService fileService uriIdentityService logService
fileService Schemas vscodeUserData Schemas file inMemoryFileSystemProvider Schemas vscodeUserData userDataProfilesService uriIdentityService logService
backupResourceJoiners
discardBackupJoiners
discardedBackups
pendingBackupsArr
discardedAllBackups
fileService
lifecycleService
IFileService
fileService
pendingBackupsArr
resolve backupResourceJoiners resolve
override identifier IWorkingCopyIdentifier content VSBufferReadableStream VSBufferReadable versionId meta token CancellationToken
p identifier content versionId meta token
removeFromPendingBackups pendingBackupsArr p
p
backupResourceJoiners length
backupResourceJoiners
resolve discardBackupJoiners resolve
override identifier IWorkingCopyIdentifier
identifier
discardedBackups identifier
discardBackupJoiners length
discardBackupJoiners
override filter except IWorkingCopyIdentifier
discardedAllBackups
filter
identifier IWorkingCopyIdentifier
backupResource identifier
fileContents fileService backupResource
fileContents value
capabilities FileSystemProviderCapabilities FileReadWrite FileSystemProviderCapabilities PathCaseSensitive
onDidChangeCapabilities Event None
onDidChangeFile Event None
resource IStat
ipcRenderer
stats ipcRenderer resource fsPath
type stats isDirectory FileType Directory stats isFile FileType File FileType Unknown
ctime stats ctimeMs
mtime stats mtimeMs
size stats size
permissions stats isReadonly
resource Uint8Array
ipcRenderer
result ipcRenderer resource fsPath
VSBuffer result buffer
resource opts IWatchOptions IDisposable
resource
resource FileType
resource opts IFileDeleteOptions
from to opts IFileOverwriteOptions
resource content Uint8Array opts IFileWriteOptions
readFileStream resource opts IFileReadStreamOptions token CancellationToken ReadableStreamEvents Uint8Array
open resource opts IFileOpenOptions
close fd
read fd pos data Uint8Array offset length
write fd pos data Uint8Array offset length
;
import
{
}
from
'../../../editor/common/services/model.js'
;
import
{
}
from
'../../../editor/common/services/modelService.js'
;
import
{
}
from
'../../../platform/configuration/test/common/testConfigurationService.js'
;
import
{
}
from
'../../../platform/contextkey/common/contextkey.js'
;
import
{
,
}
from
'../../../platform/dialogs/common/dialogs.js'
;
import
{
,
}
from
'../../../platform/environment/common/environment.js'
;
import
{
}
from
'../../../platform/extensionManagement/common/extensionManagement.js'
;
import
{
}
from
'../../../platform/extensionManagement/common/extensionTipsService.js'
;
import
{
}
from
'../../../platform/extensionRecommendations/common/extensionRecommendations.js'
;
import
{
,
,
,
,
,
,
,
,
,
,
}
from
'../../../platform/files/common/files.js'
;
import
{
}
from
'../../../platform/files/common/fileService.js'
;
import
{
}
from
'../../../platform/files/common/inMemoryFilesystemProvider.js'
;
import
{
}
from
'../../../platform/instantiation/common/instantiation.js'
;
import
{
}
from
'../../../platform/ipc/electron-browser/services.js'
;
import
{
}
from
'../../../platform/log/common/log.js'
;
import
{
,
,
,
,
,
,
,
,
,
,
,
,
}
from
'../../../platform/native/common/native.js'
;
import
{
}
from
'../../../platform/product/common/productService.js'
;
import
{
,
}
from
'../../../platform/request/common/request.js'
;
import
{
}
from
'../../../platform/storage/common/storage.js'
;
import
{
}
from
'../../../platform/telemetry/common/telemetry.js'
;
import
{
}
from
'../../../platform/theme/common/themeService.js'
;
import
{
}
from
'../../../platform/uriIdentity/common/uriIdentityService.js'
;
import
{
}
from
'../../../platform/userData/common/fileUserDataProvider.js'
;
import
{
}
from
'../../../platform/userDataProfile/common/userDataProfile.js'
;
import
{
,
,
,
,
,
,
}
from
'../../../platform/window/common/window.js'
;
import
{
}
from
'../../../platform/workspace/common/workspace.js'
;
import
{
}
from
'../../services/editor/common/editorService.js'
;
import
{
}
from
'../../services/filesConfiguration/common/filesConfigurationService.js'
;
import
{
}
from
'../../services/lifecycle/common/lifecycle.js'
;
import
{
}
from
'../../services/path/common/pathService.js'
;
import
{
}
from
'../../services/textfile/common/textEditorService.js'
;
import
{
}
from
'../../services/textfile/common/textfiles.js'
;
import
{
}
from
'../../services/textfile/electron-browser/nativeTextFileService.js'
;
import
{
}
from
'../../services/workingCopy/common/workingCopy.js'
;
import
{
}
from
'../../services/workingCopy/common/workingCopyBackup.js'
;
import
{
}
from
'../../services/workingCopy/common/workingCopyService.js'
;
import
{
}
from
'../../services/workingCopy/electron-browser/workingCopyBackupService.js'
;
import
{
as
,
,
,
,
,
,
,
}
from
'../browser/workbenchTestServices.js'
;
import
{
,
}
from
'../common/workbenchTestServices.js'
;
import
{
}
from
'../../../base/common/stream.js'
;
export
class
TestSharedProcessService
implements
ISharedProcessService
{
declare
readonly
:
undefined
;
createRawConnection
(
)
:
never
{
throw
new
Error
(
'Not Implemented'
)
;
}
getChannel
(
:
string
)
:
any
{
return
undefined
;
}
registerChannel
(
:
string
,
:
any
)
:
void
{
}
notifyRestored
(
)
:
void
{
}
}
export
class
TestNativeHostService
implements
INativeHostService
{
declare
readonly
:
undefined
;
readonly
=
-
1
;
readonly
:
<
number
>
=
.
;
readonly
:
<
number
>
=
.
;
readonly
:
<
number
>
=
.
;
readonly
:
<
number
>
=
.
;
readonly
:
<
number
>
=
.
;
readonly
:
<
number
>
=
.
;
readonly
:
<
number
>
=
.
;
readonly
:
<
void
>
=
.
;
readonly
:
<
unknown
>
=
.
;
readonly
:
<
boolean
>
=
.
;
readonly
:
<
>
=
.
;
readonly
:
<
number
>
=
.
;
readonly
:
<
void
>
=
.
;
readonly
:
<
void
>
=
.
;
readonly
:
<
void
>
=
.
;
=
.
;
=
.
;
readonly
:
<
{
:
number
;
:
number
;
:
number
}
>
=
.
;
=
.
;
=
.
;
=
.
;
=
Promise
.
resolve
(
1
)
;
getWindowCount
(
)
:
Promise
<
number
>
{
return
this
.
;
}
async
getWindows
(
)
:
Promise
<
[
]
>
{
return
[
]
;
}
async
getActiveWindowId
(
)
:
Promise
<
number
|
undefined
>
{
return
undefined
;
}
async
getActiveWindowPosition
(
)
:
Promise
<
|
undefined
>
{
return
undefined
;
}
async
getNativeWindowHandle
(
:
number
)
:
Promise
<
|
undefined
>
{
return
undefined
;
}
openWindow
(
?
:
)
:
Promise
<
void
>
;
openWindow
(
:
[
]
,
?
:
)
:
Promise
<
void
>
;
openWindow
(
?
:
|
[
]
,
?
:
)
:
Promise
<
void
>
{
throw
new
Error
(
'Method not implemented.'
)
;
}
async
openAgentsWindow
(
?
:
{
?
:
;
?
:
}
)
:
Promise
<
void
>
{
}
async
syncSystemWideKeybindings
(
:
[
]
)
:
Promise
<
>
{
return
{
:
[
]
}
;
}
async
toggleFullScreen
(
)
:
Promise
<
void
>
{
}
async
isMaximized
(
)
:
Promise
<
boolean
>
{
return
true
;
}
async
isFullScreen
(
)
:
Promise
<
boolean
>
{
return
true
;
}
async
maximizeWindow
(
)
:
Promise
<
void
>
{
}
async
unmaximizeWindow
(
)
:
Promise
<
void
>
{
}
async
minimizeWindow
(
)
:
Promise
<
void
>
{
}
async
moveWindowTop
(
?
:
)
:
Promise
<
void
>
{
}
async
isWindowAlwaysOnTop
(
?
:
)
:
Promise
<
boolean
>
{
return
false
;
}
async
toggleWindowAlwaysOnTop
(
?
:
)
:
Promise
<
void
>
{
}
async
setWindowAlwaysOnTop
(
:
boolean
,
?
:
)
:
Promise
<
void
>
{
}
async
getCursorScreenPoint
(
)
:
Promise
<
{
readonly
:
;
readonly
:
}
>
{
throw
new
Error
(
'Method not implemented.'
)
;
}
async
positionWindow
(
:
,
?
:
)
:
Promise
<
void
>
{
}
async
updateWindowControls
(
:
{
?
:
number
;
?
:
string
;
?
:
string
}
)
:
Promise
<
void
>
{
}
async
updateWindowAccentColor
(
:
string
)
:
Promise
<
void
>
{
}
async
setMinimumSize
(
:
number
|
undefined
,
:
number
|
undefined
)
:
Promise
<
void
>
{
}
async
saveWindowSplash
(
:
)
:
Promise
<
void
>
{
}
async
setBackgroundThrottling
(
:
boolean
)
:
Promise
<
void
>
{
}
async
focusWindow
(
?
:
)
:
Promise
<
void
>
{
}
async
showMessageBox
(
:
.
)
:
Promise
<
.
>
{
throw
new
Error
(
'Method not implemented.'
)
;
}
async
showSaveDialog
(
:
.
)
:
Promise
<
.
>
{
throw
new
Error
(
'Method not implemented.'
)
;
}
async
showOpenDialog
(
:
.
)
:
Promise
<
.
>
{
throw
new
Error
(
'Method not implemented.'
)
;
}
async
pickFileFolderAndOpen
(
:
)
:
Promise
<
void
>
{
}
async
pickFileAndOpen
(
:
)
:
Promise
<
void
>
{
}
async
pickFolderAndOpen
(
:
)
:
Promise
<
void
>
{
}
async
pickWorkspaceAndOpen
(
:
)
:
Promise
<
void
>
{
}
async
showItemInFolder
(
:
string
)
:
Promise
<
void
>
{
}
async
setRepresentedFilename
(
:
string
)
:
Promise
<
void
>
{
}
async
isAdmin
(
)
:
Promise
<
boolean
>
{
return
false
;
}
async
writeElevated
(
:
URI
,
:
URI
)
:
Promise
<
void
>
{
}
async
isRunningUnderARM64Translation
(
)
:
Promise
<
boolean
>
{
return
false
;
}
async
getOSProperties
(
)
:
Promise
<
>
{
return
.
create
(
null
)
;
}
async
getOSStatistics
(
)
:
Promise
<
>
{
return
.
create
(
null
)
;
}
async
getOSVirtualMachineHint
(
)
:
Promise
<
number
>
{
return
0
;
}
async
getOSColorScheme
(
)
:
Promise
<
>
{
return
{
:
true
,
:
false
}
;
}
async
hasWSLFeatureInstalled
(
)
:
Promise
<
boolean
>
{
return
false
;
}
async
getProcessId
(
)
:
Promise
<
number
>
{
throw
new
Error
(
'Method not implemented.'
)
;
}
async
killProcess
(
)
:
Promise
<
void
>
{
}
async
setDocumentEdited
(
:
boolean
)
:
Promise
<
void
>
{
}
async
setApplicationBadge
(
:
|
undefined
)
:
Promise
<
void
>
{
}
async
openExternal
(
:
string
,
?
:
string
)
:
Promise
<
boolean
>
{
return
false
;
}
async
updateTouchBar
(
)
:
Promise
<
void
>
{
}
async
moveItemToTrash
(
)
:
Promise
<
void
>
{
}
async
getMediaAccessStatus
(
:
'microphone'
|
'camera'
|
'screen'
)
:
Promise
<
'not-determined'
|
'granted'
|
'denied'
|
'restricted'
|
'unknown'
>
{
return
'granted'
;
}
async
newWindowTab
(
)
:
Promise
<
void
>
{
}
async
showPreviousWindowTab
(
)
:
Promise
<
void
>
{
}
async
showNextWindowTab
(
)
:
Promise
<
void
>
{
}
async
moveWindowTabToNewWindow
(
)
:
Promise
<
void
>
{
}
async
mergeAllWindowTabs
(
)
:
Promise
<
void
>
{
}
async
toggleWindowTabsBar
(
)
:
Promise
<
void
>
{
}
async
installShellCommand
(
)
:
Promise
<
void
>
{
}
async
uninstallShellCommand
(
)
:
Promise
<
void
>
{
}
async
notifyReady
(
)
:
Promise
<
void
>
{
}
async
relaunch
(
?
:
{
?
:
string
[
]
|
undefined
;
?
:
string
[
]
|
undefined
}
|
undefined
)
:
Promise
<
void
>
{
}
async
reload
(
)
:
Promise
<
void
>
{
}
async
closeWindow
(
)
:
Promise
<
void
>
{
}
async
quit
(
)
:
Promise
<
void
>
{
}
async
exit
(
:
number
)
:
Promise
<
void
>
{
}
async
openDevTools
(
?
:
<
.
>
&
|
undefined
)
:
Promise
<
void
>
{
}
async
toggleDevTools
(
)
:
Promise
<
void
>
{
}
async
stopTracing
(
)
:
Promise
<
void
>
{
}
async
openDevToolsWindow
(
:
string
)
:
Promise
<
void
>
{
}
async
openGPUInfoWindow
(
)
:
Promise
<
void
>
{
}
async
openContentTracingWindow
(
)
:
Promise
<
void
>
{
}
async
resolveProxy
(
:
string
)
:
Promise
<
string
|
undefined
>
{
return
undefined
;
}
async
resolveProxyWithPackage
(
)
{
return
[
]
;
}
async
readProxyConfigWithPackage
(
)
{
return
{
:
{
}
,
:
false
,
:
{
:
'unsupported'
as
const
}
,
:
{
:
'disabled'
as
const
}
,
:
{
:
'unconfigured'
as
const
}
}
;
}
async
lookupAuthorization
(
:
)
:
Promise
<
|
undefined
>
{
return
undefined
;
}
async
lookupKerberosAuthorization
(
:
string
)
:
Promise
<
string
|
undefined
>
{
return
undefined
;
}
async
loadCertificates
(
)
:
Promise
<
string
[
]
>
{
return
[
]
;
}
async
isPortFree
(
)
{
return
Promise
.
resolve
(
true
)
;
}
async
findFreePort
(
:
number
,
:
number
,
:
number
,
?
:
number
)
:
Promise
<
number
>
{
return
-
1
;
}
async
readClipboardText
(
?
:
'selection'
|
'clipboard'
|
undefined
)
:
Promise
<
string
>
{
return
''
;
}
async
writeClipboardText
(
:
string
,
?
:
'selection'
|
'clipboard'
|
undefined
)
:
Promise
<
void
>
{
}
async
readClipboardFindText
(
)
:
Promise
<
string
>
{
return
''
;
}
async
writeClipboardFindText
(
:
string
)
:
Promise
<
void
>
{
}
async
writeClipboardBuffer
(
:
string
,
:
,
?
:
'selection'
|
'clipboard'
|
undefined
)
:
Promise
<
void
>
{
}
async
triggerPaste
(
?
:
)
:
Promise
<
void
>
{
}
async
readImage
(
)
:
Promise
<
>
{
return
.
from
(
[
]
)
;
}
async
readClipboardBuffer
(
:
string
)
:
Promise
<
>
{
return
.
wrap
(
.
from
(
[
]
)
)
;
}
async
hasClipboard
(
:
string
,
?
:
'selection'
|
'clipboard'
|
undefined
)
:
Promise
<
boolean
>
{
return
false
;
}
async
windowsGetStringRegKey
(
:
'HKEY_CURRENT_USER'
|
'HKEY_LOCAL_MACHINE'
|
'HKEY_CLASSES_ROOT'
|
'HKEY_USERS'
|
'HKEY_CURRENT_CONFIG'
,
:
string
,
:
string
)
:
Promise
<
string
|
undefined
>
{
return
undefined
;
}
async
createZipFile
(
:
URI
,
:
[
]
)
:
Promise
<
void
>
{
}
async
profileRenderer
(
)
:
Promise
<
any
>
{
throw
new
Error
(
)
;
}
async
startTracing
(
)
:
Promise
<
void
>
{
throw
new
Error
(
)
;
}
async
getScreenshot
(
?
:
)
:
Promise
<
|
undefined
>
{
return
undefined
;
}
async
uploadFileViaMobileApi
(
:
string
,
:
string
,
:
string
,
:
,
:
string
)
:
Promise
<
{
:
string
;
:
string
;
:
string
}
>
{
return
{
,
:
''
,
}
;
}
async
showToast
(
:
)
:
Promise
<
>
{
return
{
:
false
,
:
false
}
;
}
async
clearToast
(
:
string
)
:
Promise
<
void
>
{
}
async
clearToasts
(
)
:
Promise
<
void
>
{
}
async
getSystemIdleState
(
:
number
)
:
Promise
<
>
{
return
'unknown'
;
}
async
getSystemIdleTime
(
)
:
Promise
<
number
>
{
return
0
;
}
async
getCurrentThermalState
(
)
:
Promise
<
>
{
return
'unknown'
;
}
async
isOnBatteryPower
(
)
:
Promise
<
boolean
>
{
return
false
;
}
async
startPowerSaveBlocker
(
:
)
:
Promise
<
number
>
{
return
-
1
;
}
async
stopPowerSaveBlocker
(
:
number
)
:
Promise
<
boolean
>
{
return
false
;
}
async
isPowerSaveBlockerStarted
(
:
number
)
:
Promise
<
boolean
>
{
return
false
;
}
}
export
class
TestExtensionTipsService
extends
AbstractNativeExtensionTipsService
{
constructor
(
@ INativeEnvironmentService
:
,
@ ITelemetryService
:
,
@ IExtensionManagementService
:
,
@ IStorageService
:
,
@ INativeHostService
:
,
@ IExtensionRecommendationNotificationService
:
,
@ IFileService
:
,
@ IProductService
:
,
)
{
super
(
.
,
,
,
,
,
,
,
)
;
}
}
export
function
workbenchInstantiationService
(
?
:
{
?
:
(
:
)
=>
;
?
:
(
:
)
=>
;
?
:
(
:
)
=>
;
?
:
(
:
)
=>
;
?
:
(
:
)
=>
;
?
:
(
:
)
=>
;
?
:
(
:
)
=>
;
?
:
(
:
)
=>
;
}
,
=
new
DisposableStore
(
)
)
:
{
const
=
browserWorkbenchInstantiationService
(
{
workingCopyBackupService
:
(
)
=>
.
add
(
new
TestNativeWorkingCopyBackupService
(
)
)
,
...
}
,
)
;
.
stub
(
,
new
TestNativeHostService
(
)
)
;
return
;
}
export
class
TestServiceAccessor
{
constructor
(
@ ILifecycleService
public
:
,
@ ITextFileService
public
:
,
@ IFilesConfigurationService
public
:
,
@ IWorkspaceContextService
public
:
,
@ IModelService
public
:
,
@ IFileService
public
:
,
@ INativeHostService
public
:
,
@ IFileDialogService
public
:
,
@ IWorkingCopyBackupService
public
:
,
@ IWorkingCopyService
public
:
,
@ IEditorService
public
:
)
{
}
}
export
class
TestNativeTextFileServiceWithEncodingOverrides
extends
NativeTextFileService
{
private
:
|
undefined
;
get
encoding
(
)
:
{
if
(
!
this
.
)
{
this
.
=
this
.
_register
(
this
.
.
createInstance
(
)
)
;
}
return
this
.
;
}
}
export
class
TestNativeWorkingCopyBackupService
extends
NativeWorkingCopyBackupService
implements
IDisposable
{
private
:
Function
[
]
;
private
:
Function
[
]
;
:
[
]
;
:
boolean
;
private
:
Promise
<
void
>
[
]
;
constructor
(
)
{
const
=
;
const
=
new
NullLogService
(
)
;
const
=
new
FileService
(
)
;
const
=
new
TestLifecycleService
(
)
;
super
(
as
any
,
,
,
)
;
const
=
this
.
_register
(
new
InMemoryFileSystemProvider
(
)
)
;
this
.
_register
(
.
registerProvider
(
.
,
)
)
;
const
=
this
.
_register
(
new
UriIdentityService
(
)
)
;
const
=
this
.
_register
(
new
UserDataProfilesService
(
,
,
,
)
)
;
this
.
_register
(
.
registerProvider
(
.
,
this
.
_register
(
new
FileUserDataProvider
(
.
,
,
.
,
,
,
)
)
)
)
;
this
.
=
[
]
;
this
.
=
[
]
;
this
.
=
[
]
;
this
.
=
[
]
;
this
.
=
false
;
this
.
_register
(
)
;
this
.
_register
(
)
;
}
testGetFileService
(
)
:
{
return
this
.
;
}
async
waitForAllBackups
(
)
:
Promise
<
void
>
{
await
Promise
.
all
(
this
.
)
;
}
joinBackupResource
(
)
:
Promise
<
void
>
{
return
new
Promise
(
=>
this
.
.
push
(
)
)
;
}
async
backup
(
:
,
?
:
|
,
?
:
number
,
?
:
any
,
?
:
)
:
Promise
<
void
>
{
const
=
super
.
backup
(
,
,
,
,
)
;
const
=
insert
(
this
.
,
.
then
(
undefined
,
undefined
)
)
;
try
{
await
;
}
finally
{
removeFromPendingBackups
(
)
;
}
while
(
this
.
.
)
{
this
.
.
pop
(
)
!
(
)
;
}
}
joinDiscardBackup
(
)
:
Promise
<
void
>
{
return
new
Promise
(
=>
this
.
.
push
(
)
)
;
}
async
discardBackup
(
:
)
:
Promise
<
void
>
{
await
super
.
discardBackup
(
)
;
this
.
.
push
(
)
;
while
(
this
.
.
)
{
this
.
.
pop
(
)
!
(
)
;
}
}
async
discardBackups
(
?
:
{
:
[
]
}
)
:
Promise
<
void
>
{
this
.
=
true
;
return
super
.
discardBackups
(
)
;
}
async
getBackupContents
(
:
)
:
Promise
<
string
>
{
const
=
this
.
toBackupResource
(
)
;
const
=
await
this
.
.
readFile
(
)
;
return
.
.
toString
(
)
;
}
}
export
class
TestIPCFileSystemProvider
implements
IFileSystemProvider
{
readonly
=
.
|
.
;
readonly
=
.
;
readonly
=
.
;
async
stat
(
:
URI
)
:
Promise
<
>
{
const
{
}
=
require
(
'electron'
)
;
const
=
await
.
invoke
(
'vscode:statFile'
,
.
)
;
return
{
:
.
?
.
:
(
.
?
.
:
.
)
,
:
.
,
:
.
,
:
.
,
:
.
?
1
:
undefined
}
;
}
async
readFile
(
:
URI
)
:
Promise
<
>
{
const
{
}
=
require
(
'electron'
)
;
const
=
await
.
invoke
(
'vscode:readFile'
,
.
)
;
return
.
wrap
(
)
.
;
}
watch
(
:
URI
,
:
)
:
{
return
{
dispose
:
(
)
=>
{
}
}
;
}
mkdir
(
:
URI
)
:
Promise
<
void
>
{
throw
new
Error
(
'mkdir not implemented in test provider'
)
;
}
readdir
(
:
URI
)
:
Promise
<
[
string
,
]
[
]
>
{
throw
new
Error
(
'readdir not implemented in test provider'
)
;
}
delete
(
:
URI
,
:
)
:
Promise
<
void
>
{
throw
new
Error
(
'delete not implemented in test provider'
)
;
}
rename
(
:
URI
,
:
URI
,
:
)
:
Promise
<
void
>
{
throw
new
Error
(
'rename not implemented in test provider'
)
;
}
writeFile
(
:
URI
,
:
,
:
)
:
Promise
<
void
>
{
throw
new
Error
(
'writeFile not implemented in test provider'
)
;
}
?
(
:
URI
,
:
,
:
)
:
<
>
{
throw
new
Error
(
'readFileStream not implemented in test provider'
)
;
}
?
(
:
URI
,
:
)
:
Promise
<
number
>
{
throw
new
Error
(
'open not implemented in test provider'
)
;
}
?
(
:
number
)
:
Promise
<
void
>
{
throw
new
Error
(
'close not implemented in test provider'
)
;
}
?
(
:
number
,
:
number
,
:
,
:
number
,
:
number
)
:
Promise
<
number
>
{
throw
new
Error
(
'read not implemented in test provider'
)
;
}
?
(
:
number
,
:
number
,
:
,
:
number
,
:
number
)
:
Promise
<
number
>
{
throw
new
Error
(
'write not implemented in test provider'
)
;
}
}