ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / extensions / copilot / src / extension / log / vscode-node / loggingActions.ts 838 строк · изменён 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
import * as dns from 'dns' ;
import * as http from 'http' ;
import * as https from 'https' ;
import * as os from 'os' ;
import * as path from 'path' ;
import * as tls from 'tls' ;
import * as util from 'util' ;
import * as vscode from 'vscode' ;
import { IAuthenticationService }
ConfigKey IConfigurationService
ICAPIClientService
IEnvService isScenarioAutomation
IVSCodeExtensionContext
collectErrorMessages collectSingleLineErrorMessage ILogService sanitizeNetworkErrorForTelemetry
outputChannel
FetchEvent IFetcherService Response
IFetcher userAgentLibraryHeader
NodeFetcher
NodeFetchFetcher
ElectronFetcher
getShadowedConfig
IExperimentationService
shuffle
timeout
Disposable MutableDisposable
generateUuid
IInstantiationService ServicesAccessor
message args
message args
message args
message args
message Error args
log ProxyAgentLog
url
type
source
loadSystemCertificates params ProxyAgentParams
resolveProxyURL url
resolveProxyByURL url ResolvedProxyInfo
_context IVSCodeExtensionContext
envService IEnvService
configurationService IConfigurationService
experimentationService IExperimentationService
authService IAuthenticationService
capiClientService ICAPIClientService
fetcherService IFetcherService
logService ILogService
document vscode workspace language
editor vscode window document
electronConfig configurationService experimentationService ConfigKey Shared DebugUseElectronFetcher ConfigKey TeamInternal DebugExpUseElectronFetcher
nodeConfig configurationService experimentationService ConfigKey Shared DebugUseNodeFetcher ConfigKey TeamInternal DebugExpUseNodeFetcher
nodeFetchConfig configurationService experimentationService ConfigKey Shared DebugUseNodeFetchFetcher ConfigKey TeamInternal DebugExpUseNodeFetchFetcher
ext vscode extensions
product path vscode env appRoot
editor
proxyAgent
loadSystemCertificatesFromNode configurationService
osCertificates proxyAgent loadSystemCertificates proxyAgent loadSystemCertificates loadSystemCertificatesFromNode logService
urls
url capiClientService dotcomAPIURL expectedContent
url capiClientService capiPingURL expectedContent
url capiClientService proxyBaseURL expectedContent
isGHEnterprise capiClientService dotcomAPIURL
timeoutSeconds
electronFetcher ElectronFetcher envService
electronCurrent electronFetcher electronConfig
nodeCurrent electronCurrent nodeConfig
nodeFetchCurrent electronCurrent nodeCurrent nodeFetchConfig
nodeCurrentFallback electronCurrent nodeFetchCurrent
activeFetcher fetcherService
nodeFetcher name fetcher envService current nodeCurrent nodeCurrentFallback
nodeFetchFetcher name fetcher envService current nodeFetchCurrent
fetchers
name fetcher electronFetcher current electronCurrent
nodeFetcher
nodeFetchFetcher
dnsLookup util dns lookup
url expectedContent urls
authHeaders isGHEnterprise url
host url hostname
editor
family
editor
start Date
dnsResult host family timeoutSeconds
dnsResult
editor
editor
err
editor
probeProxyURL
proxyAgent resolveProxyURL
editor
start Date
proxyURL proxyAgent url timeoutSeconds
proxyURL
editor
editor
probeProxyURL proxyURL
err
editor
proxyAgent loadSystemCertificates probeProxyURL
tlsOrig tls tls __vscodeOriginal
tlsOrig
editor
osCertificates
editor
start Date
result tlsOrig probeProxyURL tls rootCertificates osCertificates timeoutSeconds
result
editor
editor
err
editor
probeProxyURL
httpx https http probeProxyURL https __vscodeOriginal http __vscodeOriginal
httpx
editor
start Date
result httpx probeProxyURL url timeoutSeconds
result
headers Object result headers header
text
editor
editor
err
editor
name fetcher current fetchers
editor
fetcher
start Date
response fetcher url headers authHeaders callSite timeoutSeconds
response
contentNote
body response
body expectedContent
contentNote
bodyErr
contentNote
editor
editor
err
editor
editor
currentFetcher fetchers entry entry entry fetcher IFetcher entry current entry fetcher nodeFetcher
useVSCodeTelemetryLibForGH configurationService ConfigKey TeamInternal UseVSCodeTelemetryLibForGH experimentationService
githubTelemetryFetcher useVSCodeTelemetryLibForGH currentFetcher nodeFetcher
microsoftAIKey _context extension packageJSON ariaKey ariaKey
microsoftIsOneDS microsoftAIKey microsoftAIKey
secondaryUrls
url
fetcher name fetcher IFetcher
fetcher IFetcher url Response
microsoftIsOneDS
url oneCollectorTelemetryUrl
fetcher currentFetcher
fetcher url vscode env isTelemetryEnabled
fetcher envService url _context
url
fetcher currentFetcher
fetcher url fetcher envService url
url capiClientService copilotTelemetryURL
fetcher githubTelemetryFetcher
fetcher url fetcher envService url
url
fetcher nodeFetchFetcher
fetcher url fetcher url callSite
editor
url fetcher connect secondaryUrls
editor
start Date
response fetcher fetcher url timeoutSeconds
response
editor
response
editor
editor
err
editor
editor
activeFetcherName fetchers entry entry fetcher activeFetcher name activeFetcher
notes
currentFetcher fetcher activeFetcher
notes
proxySupport vscode workspace
proxySupport
notes
notes
editor
document
_context subscriptions vscode commands collectDiagnostics
_context subscriptions vscode commands collectDiagnostics
_context subscriptions vscode commands outputChannel
_context subscriptions fetcherService configurationService experimentationService
isGHEnterprise url
authHeaders Record
isGHEnterprise
token
url capiClientService dotcomAPIURL
token authService anyGitHubSession accessToken
token authService token
_err
token
authHeaders
authHeaders
editor vscode TextEditor
editor builder
builder editor document editor document lineCount range end
ms
resolve ms
body
oneLine body
oneLine length oneLine
key
key length
key
key
key
key
key
key
moduleName
appRoot vscode env appRoot
err
err
load NonNullable ProxyAgent loadSystemCertificatesFromNode logService ILogService Buffer
certificates
log
message _args
logService message
message _args
logService message
message _args
logService message
message _args
logService message
message Error _args
logService message message message
satisfies ProxyAgentLog
loadSystemCertificatesFromNode
certificates certificates
err
logService err
tlsOrig tls proxyURL ca Buffer
resolve reject
proxyUrlObj proxyURL
socket tlsOrig
host proxyUrlObj hostname
port proxyUrlObj port
servername proxyUrlObj hostname
ca
socket
socket reject
httpx https http proxyUrl targetUrl sanitize
resolve reject
proxyUrlObj proxyUrl
targetUrlObj targetUrl
targetHost
options
method
host proxyUrlObj hostname
port proxyUrlObj port
path targetHost
headers
Host targetHost
rejectUnauthorized
req httpx options
req res socket head
headers acc header
value res headers header
value
doSanitize sanitize header
acc header doSanitize value value sanitizeValue value value
acc
Record
socket
statusCode res statusCode statusMessage res statusMessage headers
req reject
req
networkSettingsIds
alwaysShowSettingsIds
configuration vscode workspace
networkSettingsIds key
i configuration key
v configuration key i defaultValue
alwaysShowSettingsIds key v i defaultValue v i defaultValue v length i defaultValue length
res
envVars
env process env
envVars env
res
res length
type
source
url logService ILogService ProxyInfo
proxyAgent
proxyAgent resolveProxyByURL
type source
info proxyAgent url
info
type source
type info type source info source
err
logService
type source
instantiationService IInstantiationService
instantiationService collectFetcherTelemetry
accessor ServicesAccessor
extensionContext accessor IVSCodeExtensionContext
envService accessor IEnvService
logService accessor ILogService
configurationService accessor IConfigurationService
expService accessor IExperimentationService
capiClientService accessor ICAPIClientService
vscode env isTelemetryEnabled extensionContext extensionMode vscode ExtensionMode Production isScenarioAutomation
configurationService ConfigKey TeamInternal DebugCollectFetcherTelemetry expService
now Date
previous extensionContext globalState
now previous
logService
extensionContext globalState now
logService
windowUUID
extensionContext globalState windowUUID
extensionContext globalState windowUUID
logService
logService
fetchers
ElectronFetcher envService
envService
envService
fetcher fetcher IFetcher
fetchers
probeResults Record
fetcher fetchers
library fetcher
key library
requestStartTime Date
response fetcher envService oneCollectorTelemetryUrl extensionContext
probeResults key
logService
e
probeResults key
logService
type proxyType source proxySource capiClientService capiPingURL logService
requestGroupId
extensionKind extensionContext extension extensionKind vscode ExtensionKind
fetcher fetchers
requestStartTime Date
properties Record
requestGroupId
clientLibrary fetcher
extensionKind
remoteName vscode env remoteName
proxyType
proxySource
probeResults
response fetcher envService oneCollectorTelemetryUrl extensionContext properties
logService
e
logService
err
logService err
oneCollectorTelemetryUrl
fetcher IFetcher envService IEnvService url extensionContext IVSCodeExtensionContext eventName properties Record
product path vscode env appRoot
vscodeCommitHash product commit
ariaKey extensionContext extension packageJSON ariaKey ariaKey
iKey
sdkVer
eventTime Date
event
name eventName
time eventTime
ver
iKey
ext
sdk ver sdkVer
web consentDetails
data
baseData
name eventName
properties
properties
os
os
os
envService
envService machineId
envService sessionId
vscodeCommitHash
envService devDeviceId
envService vscodeVersion
product date
vscode env isNewAppInstall
envService uiKind
envService uiKind
envService remoteName
body event
headers Record
sdkVer
ariaKey
Date
userAgentLibraryHeader fetcher
fetcher NodeFetcher
headers Buffer body
response fetcher url
method
headers
body
callSite
response
response
fetcher IFetcher envService IEnvService url
body
headers Record
userAgentLibraryHeader fetcher
fetcher NodeFetcher
headers Buffer body
response fetcher url
method
headers
body
callSite
response
response
ids_paths
input
input ids_paths m m
s
s s
s
s ch
ch
ch
_statusBarItem vscode StatusBarItem
_events FetchEvent
_fetchSubscription
_fetcherService IFetcherService _configurationService IConfigurationService _experimentationService IExperimentationService
_statusBarItem vscode window vscode StatusBarAlignment Right
_statusBarItem name
_configurationService e
e ConfigKey TeamInternal DebugShowNetworkStatus fullyQualifiedId
_configurationService ConfigKey TeamInternal DebugShowNetworkStatus _experimentationService
event FetchEvent
_events event
cutoff Date
_events length _events timestamp cutoff
_events
enabled
enabled _fetchSubscription value
_fetchSubscription value _fetcherService e e
enabled
_fetchSubscription value
_events length
_statusBarItem
latestById
e _events
latestById e internalId e
latest latestById
errors latest e e outcome
_statusBarItem text
byHostname
e latest
entry byHostname e hostname
entry
entry total errors cancellations
byHostname e hostname entry
entry total
e outcome
entry errors
e outcome
entry cancellations
tooltip
tooltip
tooltip
hostname total errors cancellations byHostname a b b total a total
tooltip
tooltip
_statusBarItem tooltip tooltip
_statusBarItem
from
'../../../platform/authentication/common/authentication'
;
import
{
,
}
from
'../../../platform/configuration/common/configurationService'
;
import
{
}
from
'../../../platform/endpoint/common/capiClient'
;
import
{
,
}
from
'../../../platform/env/common/envService'
;
import
{
}
from
'../../../platform/extContext/common/extensionContext'
;
import
{
,
,
,
}
from
'../../../platform/log/common/logService'
;
import
{
}
from
'../../../platform/log/vscode/outputChannelLogTarget'
;
import
{
,
,
}
from
'../../../platform/networking/common/fetcherService'
;
import
{
,
}
from
'../../../platform/networking/common/networking'
;
import
{
}
from
'../../../platform/networking/node/nodeFetcher'
;
import
{
}
from
'../../../platform/networking/node/nodeFetchFetcher'
;
import
{
}
from
'../../../platform/networking/vscode-node/electronFetcher'
;
import
{
}
from
'../../../platform/networking/vscode-node/fetcherServiceImpl'
;
import
{
}
from
'../../../platform/telemetry/common/nullExperimentationService'
;
import
{
}
from
'../../../util/vs/base/common/arrays'
;
import
{
}
from
'../../../util/vs/base/common/async'
;
import
{
,
}
from
'../../../util/vs/base/common/lifecycle'
;
import
{
}
from
'../../../util/vs/base/common/uuid'
;
import
{
,
}
from
'../../../util/vs/platform/instantiation/common/instantiation'
;
import
{
EXTENSION_ID
}
from
'../../common/constants'
;
interface
ProxyAgentLog
{
trace
(
:
string
,
...
:
any
[
]
)
:
void
;
debug
(
:
string
,
...
:
any
[
]
)
:
void
;
info
(
:
string
,
...
:
any
[
]
)
:
void
;
warn
(
:
string
,
...
:
any
[
]
)
:
void
;
error
(
:
string
|
,
...
:
any
[
]
)
:
void
;
}
interface
ProxyAgentParams
{
:
;
loadSystemCertificatesFromNode
:
(
)
=>
boolean
|
undefined
;
}
interface
ResolvedProxyInfo
{
:
string
|
undefined
;
:
'DIRECT'
|
'PROXY'
|
'HTTP'
|
'HTTPS'
|
'SOCKS'
|
'SOCKS5'
|
'SOCKS4'
|
'EMPTY'
|
'UNRECOGNIZED'
;
:
'localhost'
|
'noProxyConfig'
|
'noProxyEnv'
|
'setting'
|
'env'
|
'remote'
|
'system_cached'
|
'system'
|
'fallback'
;
}
interface
ProxyAgent
{
?
(
:
)
:
Promise
<
string
[
]
>
;
?
(
:
string
)
:
Promise
<
string
|
undefined
>
;
?
(
:
string
)
:
Promise
<
>
;
}
export
class
LoggingActionsContrib
{
constructor
(
@ IVSCodeExtensionContext
private
readonly
:
,
@ IEnvService
private
:
,
@ IConfigurationService
private
readonly
:
,
@ IExperimentationService
private
readonly
:
,
@ IAuthenticationService
private
readonly
:
,
@ ICAPIClientService
private
readonly
:
,
@ IFetcherService
private
readonly
:
,
@ ILogService
private
:
,
)
{
const
collectDiagnostics
=
async
(
)
=>
{
const
=
await
.
.
openTextDocument
(
{
:
'markdown'
}
)
;
const
=
await
.
.
showTextDocument
(
)
;
const
=
getShadowedConfig < boolean >
(
this
.
,
this
.
,
.
.
,
.
.
)
;
const
=
getShadowedConfig < boolean >
(
this
.
,
this
.
,
.
.
,
.
.
)
;
const
=
getShadowedConfig < boolean >
(
this
.
,
this
.
,
.
.
,
.
.
)
;
const
=
.
.
getExtension
(
EXTENSION_ID
)
;
const
=
require
(
.
join
(
.
.
,
'product.json'
)
)
;
await
appendText
(
,
` ## GitHub Copilot Chat
- Extension: ${ this . envService. getVersion ( ) } ( ${ this . envService. getBuildType ( ) } )
- VS Code: ${ vscode. version} ( ${ product. commit || 'out-of-source' } )
- OS: ${ os. platform ( ) } ${ os. release ( ) } ${ os. arch ( ) } ${ vscode. env. remoteName ? `
- Remote Name: ${ vscode. env. remoteName} ` : '' } ${ vscode. env. remoteName && ext ? `
- Extension Kind: ${ vscode. ExtensionKind[ ext. extensionKind] } ` : '' }
- GitHub Account: ${ this . authService. anyGitHubSession?. account. label || 'Signed Out' }
## Network
User Settings:
\`\`\`json ${ getNetworkSettings ( ) }
"github.copilot.advanced.debug.useElectronFetcher": ${ electronConfig} ,
"github.copilot.advanced.debug.useNodeFetcher": ${ nodeConfig} ,
"github.copilot.advanced.debug.useNodeFetchFetcher": ${ nodeFetchConfig}
\`\`\` ${ getProxyEnvVariables ( ) }
`
)
;
const
=
loadVSCodeModule < ProxyAgent>
(
'@vscode/proxy-agent'
)
;
const
=
this
.
.
getNonExtensionConfig < boolean >
(
'http.systemCertificatesNode'
)
;
const
=
?.
?
await
loadSystemCertificates
(
.
,
,
this
.
)
:
undefined
;
const
=
[
{
:
this
.
.
,
:
'current_user_url'
}
,
{
:
this
.
.
,
:
'OK'
}
,
{
:
this
.
.
+
'/_ping'
,
:
'"status":"ok"'
}
,
]
;
const
=
this
.
.
!==
'https://api.github.com'
;
const
=
10
;
const
=
.
create
(
this
.
)
;
const
=
!
!
&&
;
const
=
!
&&
;
const
=
!
&&
!
&&
;
const
=
!
&&
!
;
const
=
this
.
.
getUserAgentLibrary
(
)
;
const
=
{
:
'Node.js https'
,
:
new
NodeFetcher
(
this
.
)
,
:
||
}
;
const
=
{
:
'Node.js fetch'
,
:
new
NodeFetchFetcher
(
this
.
)
,
:
}
;
const
=
[
{
:
'Electron fetch'
,
:
,
:
}
,
,
,
]
;
const
=
.
promisify
(
.
)
;
for
(
const
{
,
}
of
)
{
const
=
await
this
.
getAuthHeaders
(
,
)
;
const
=
new
URL
(
)
.
;
await
appendText
(
,
` \nConnecting to ${ url} :\n `
)
;
for
(
const
of
[
4
,
6
]
)
{
await
appendText
(
,
` - DNS ipv ${ family} Lookup: `
)
;
const
=
.
now
(
)
;
try
{
const
=
await
Promise
.
race
(
[
dnsLookup
(
,
{
}
)
,
timeout
(
*
1000
)
]
)
;
if
(
)
{
await
appendText
(
,
` ${ dnsResult. address} ( ${ Date. now ( ) - start} ms)\n `
)
;
}
else
{
await
appendText
(
,
` timed out after ${ timeoutSeconds} seconds\n `
)
;
}
}
catch
(
)
{
await
appendText
(
,
` Error ( ${ Date. now ( ) - start} ms): ${ err?. message} \n `
)
;
}
}
let
:
string
|
undefined
;
if
(
?.
)
{
await
appendText
(
,
` - Proxy URL: `
)
;
const
=
.
now
(
)
;
try
{
const
=
await
Promise
.
race
(
[
.
resolveProxyURL
(
)
,
timeoutAfter
(
*
1000
)
]
)
;
if
(
===
'timeout'
)
{
await
appendText
(
,
` timed out after ${ timeoutSeconds} seconds\n `
)
;
}
else
{
await
appendText
(
,
` ${ proxyURL || 'None' } ( ${ Date. now ( ) - start} ms)\n `
)
;
=
;
}
}
catch
(
)
{
await
appendText
(
,
` Error ( ${ Date. now ( ) - start} ms): ${ err?. message} \n `
)
;
}
}
if
(
?.
&&
?.
startsWith
(
'https:'
)
)
{
const
:
typeof
|
undefined
=
(
as
any
)
.
;
if
(
)
{
await
appendText
(
,
` - Proxy TLS: `
)
;
if
(
!
)
{
await
appendText
(
,
` (failed to load system certificates) `
)
;
}
const
=
.
now
(
)
;
try
{
const
=
await
Promise
.
race
(
[
tlsConnect
(
,
,
[
...
.
,
...
(
||
[
]
)
]
)
,
timeout
(
*
1000
)
]
)
;
if
(
)
{
await
appendText
(
,
` ${ result} ( ${ Date. now ( ) - start} ms)\n `
)
;
}
else
{
await
appendText
(
,
` timed out after ${ timeoutSeconds} seconds\n `
)
;
}
}
catch
(
)
{
await
appendText
(
,
` Error ( ${ Date. now ( ) - start} ms): ${ err?. message} \n `
)
;
}
}
}
if
(
)
{
const
:
typeof
|
typeof
|
undefined
=
.
startsWith
(
'https:'
)
?
(
as
any
)
.
:
(
as
any
)
.
;
if
(
)
{
await
appendText
(
,
` - Proxy Connection: `
)
;
const
=
.
now
(
)
;
try
{
const
=
await
Promise
.
race
(
[
proxyConnect
(
,
,
)
,
timeout
(
*
1000
)
]
)
;
if
(
)
{
const
=
.
keys
(
.
)
.
map
(
=>
` \n ${ header} : ${ result. headers[ header] } `
)
;
const
=
` ${ result. statusCode} ${ result. statusMessage} ${ headers. join ( '' ) } `
;
await
appendText
(
,
` ${ text} ( ${ Date. now ( ) - start} ms)\n `
)
;
}
else
{
await
appendText
(
,
` timed out after ${ timeoutSeconds} seconds\n `
)
;
}
}
catch
(
)
{
await
appendText
(
,
` Error ( ${ Date. now ( ) - start} ms): ${ err?. message} \n `
)
;
}
}
}
for
(
const
{
,
,
}
of
)
{
await
appendText
(
,
` - ${ name} ${ current ? ' (configured)' : fetcher?. getUserAgentLibrary ( ) === activeFetcher ? ' (active)' : '' } : `
)
;
if
(
)
{
const
=
.
now
(
)
;
try
{
const
=
await
Promise
.
race
(
[
.
fetch
(
,
{
:
,
:
'diagnostics-fetcher-probe'
}
)
,
timeout
(
*
1000
)
]
)
;
if
(
)
{
let
=
''
;
try
{
const
=
await
.
text
(
)
;
if
(
!
.
includes
(
)
)
{
=
` - unexpected content: ${ formatUnexpectedContent ( body) } (expected: ' ${ expectedContent} ') `
;
}
}
catch
(
)
{
=
` - failed to read content: ${ collectErrorMessages ( bodyErr) } `
;
}
await
appendText
(
,
` HTTP ${ response. status} ( ${ Date. now ( ) - start} ms) ${ contentNote} \n `
)
;
}
else
{
await
appendText
(
,
` timed out after ${ timeoutSeconds} seconds\n `
)
;
}
}
catch
(
)
{
await
appendText
(
,
` Error ( ${ Date. now ( ) - start} ms): ${ collectErrorMessages ( err) } \n `
)
;
}
}
else
{
await
appendText
(
,
'Unavailable\n'
)
;
}
}
}
const
=
.
find
(
(
)
:
is
typeof
&
{
:
}
=>
.
&&
!
!
.
)
??
;
const
=
this
.
.
getExperimentBasedConfig
(
.
.
,
this
.
)
;
const
=
?
:
;
const
=
(
this
.
.
.
as
{
?
:
string
}
)
.
??
''
;
const
=
!
||
isOneDataSystemKey
(
)
;
const
:
{
:
string
;
:
{
:
string
;
:
}
;
connect
:
(
:
,
:
string
)
=>
Promise
<
|
string
>
;
}
[
]
=
[
?
{
:
,
:
,
connect
:
(
,
)
=>
.
.
?
sendRawTelemetry
(
,
this
.
,
,
this
.
,
'GitHub.copilot-chat/diagnosticsTelemetryProbe'
,
{
}
)
:
Promise
.
resolve
(
'Telemetry is not enabled'
)
,
}
:
{
:
'https://dc.services.visualstudio.com/v2.1/track'
,
:
,
connect
:
(
,
)
=>
sendRawAITelemetry
(
,
this
.
,
)
,
}
,
{
:
this
.
.
,
:
,
connect
:
(
,
)
=>
sendRawAITelemetry
(
,
this
.
,
)
,
}
,
{
:
'https://default.exp-tas.com/vscode/ab'
,
:
,
connect
:
(
,
)
=>
.
fetch
(
,
{
:
'diagnostics-secondary-probe'
}
)
,
}
,
]
;
await
appendText
(
,
` \n `
)
;
for
(
const
{
,
,
}
of
)
{
await
appendText
(
,
` Connecting to ${ url} ( ${ fetcher. name} ): `
)
;
const
=
.
now
(
)
;
try
{
const
=
await
Promise
.
race
(
[
connect
(
.
,
)
,
timeout
(
*
1000
)
]
)
;
if
(
typeof
===
'string'
)
{
await
appendText
(
,
` ${ response} \n `
)
;
}
else
if
(
)
{
await
appendText
(
,
` HTTP ${ response. status} ( ${ Date. now ( ) - start} ms)\n `
)
;
}
else
{
await
appendText
(
,
` timed out after ${ timeoutSeconds} seconds\n `
)
;
}
}
catch
(
)
{
await
appendText
(
,
` Error ( ${ Date. now ( ) - start} ms): ${ collectErrorMessages ( err) } \n `
)
;
}
}
await
appendText
(
,
` \nNumber of system certificates: ${ osCertificates?. length ?? 'failed to load' } \n `
)
;
const
=
.
find
(
=>
.
?.
getUserAgentLibrary
(
)
===
)
?.
??
;
const
=
[
` - Active fetcher: ${ activeFetcherName} . `
]
;
if
(
.
.
getUserAgentLibrary
(
)
!==
)
{
.
push
(
` - The active fetcher differs from the configured fetcher ( ${ currentFetcher. name} ). This can happen after a recent configuration change or an automatic fallback; reload the window or restart VS Code to apply the configured fetcher. `
)
;
}
const
=
.
.
getConfiguration
(
)
.
get < string >
(
'http.proxySupport'
)
;
if
(
!==
'override'
)
{
.
push
(
` - The \`"http.proxySupport"\` setting is set to \`" ${ proxySupport} "\`. The recommended default is \`"override"\`, which generally works best. `
)
;
}
.
push
(
` - For corporate networks also see: [Troubleshooting firewall settings for GitHub Copilot](https://docs.github.com/en/copilot/troubleshooting-github-copilot/troubleshooting-firewall-settings-for-github-copilot). `
)
;
await
appendText
(
,
`
## Notes
${ notes. join ( '\n' ) } `
)
;
return
.
getText
(
)
;
}
;
this
.
.
.
push
(
.
.
registerCommand
(
'github.copilot.debug.collectDiagnostics'
,
)
)
;
this
.
.
.
push
(
.
.
registerCommand
(
'github.copilot.debug.collectDiagnostics.internal'
,
)
)
;
this
.
.
.
push
(
.
.
registerCommand
(
'github.copilot.debug.showOutputChannel.internal'
,
(
)
=>
.
show
(
)
)
)
;
this
.
.
.
push
(
new
NetworkStatus
(
this
.
,
this
.
,
this
.
)
)
;
}
private
async
getAuthHeaders
(
:
boolean
,
:
string
)
{
const
:
<
string
,
string
>
=
{
}
;
if
(
)
{
let
=
''
;
if
(
===
this
.
.
)
{
=
this
.
.
?.
||
''
;
}
else
{
try
{
=
(
await
this
.
.
getCopilotToken
(
)
)
.
;
}
catch
(
)
{
=
''
;
}
}
[
'Authorization'
]
=
` Bearer ${ token} `
;
}
return
;
}
}
async
function
appendText
(
:
.
,
string
:
string
)
{
await
.
edit
(
=>
{
.
insert
(
.
.
lineAt
(
.
.
-
1
)
.
.
,
string
)
;
}
)
;
}
function
timeoutAfter
(
:
number
)
{
return
new
Promise < 'timeout' >
(
=>
setTimeout
(
(
)
=>
resolve
(
'timeout'
)
,
)
)
;
}
function
formatUnexpectedContent
(
:
string
)
:
string
{
const
=
.
replace
(
/ \r \n | \r | \n / g
,
'\\n'
)
;
return
.
>
200
?
` ${ oneLine. slice ( 0 , 200 ) } … `
:
;
}
function
isOneDataSystemKey
(
:
string
)
:
boolean
{
return
.
===
74
&&
[
32
]
===
'-'
&&
[
41
]
===
'-'
&&
[
46
]
===
'-'
&&
[
51
]
===
'-'
&&
[
56
]
===
'-'
&&
[
69
]
===
'-'
;
}
function
loadVSCodeModule < T >
(
:
string
)
:
T
|
undefined
{
const
=
.
.
;
try
{
return
require
(
` ${ appRoot} /node_modules.asar/ ${ moduleName} `
)
;
}
catch
(
)
{
}
try
{
return
require
(
` ${ appRoot} /node_modules/ ${ moduleName} `
)
;
}
catch
(
)
{
}
return
undefined
;
}
async
function
loadSystemCertificates
(
:
<
[
'loadSystemCertificates'
]
>
,
:
boolean
|
undefined
,
:
)
:
Promise
<
(
string
|
)
[
]
|
undefined
>
{
try
{
const
=
await
load
(
{
:
{
trace
(
:
string
,
...
:
any
[
]
)
{
.
trace
(
)
;
}
,
debug
(
:
string
,
...
:
any
[
]
)
{
.
debug
(
)
;
}
,
info
(
:
string
,
...
:
any
[
]
)
{
.
info
(
)
;
}
,
warn
(
:
string
,
...
:
any
[
]
)
{
.
warn
(
)
;
}
,
error
(
:
string
|
,
...
:
any
[
]
)
{
.
error
(
typeof
===
'string'
?
:
String
(
)
)
;
}
,
}
,
loadSystemCertificatesFromNode
:
(
)
=>
,
}
)
;
return
Array
.
isArray
(
)
?
:
undefined
;
}
catch
(
)
{
.
error
(
)
;
return
undefined
;
}
}
async
function
tlsConnect
(
:
typeof
,
:
string
,
:
(
string
|
)
[
]
)
{
return
new
Promise < string >
(
(
,
)
=>
{
const
=
new
URL
(
)
;
const
=
.
connect
(
{
:
.
,
:
parseInt
(
.
,
10
)
,
:
.
,
,
}
,
(
)
=>
{
.
end
(
)
;
resolve
(
'Succeeded'
)
;
}
)
;
.
on
(
'error'
,
)
;
}
)
;
}
async
function
proxyConnect
(
:
typeof
|
typeof
,
:
string
,
:
string
,
=
false
)
{
return
new
Promise < { statusCode: number | undefined ; statusMessage: string | undefined ; headers: Record< string , string | string [ ] > } >
(
(
,
)
=>
{
const
=
new
URL
(
)
;
const
=
new
URL
(
)
;
const
=
` ${ targetUrlObj. hostname} : ${ targetUrlObj. port || ( targetUrlObj. protocol === 'https:' ? 443 : 80 ) } `
;
const
=
{
:
'CONNECT'
,
:
.
,
:
.
,
:
,
:
{
:
,
}
,
:
false
,
}
;
const
=
.
request
(
)
;
.
on
(
'connect'
,
(
,
,
)
=>
{
const
=
[
'proxy-authenticate'
,
'proxy-agent'
,
'server'
,
'via'
]
.
reduce
(
(
,
)
=>
{
const
=
.
[
]
;
if
(
)
{
const
=
&&
!
[
'proxy-agent'
,
'server'
]
.
includes
(
)
;
[
]
=
?
Array
.
isArray
(
)
?
.
map
(
)
:
sanitizeValue
(
)
:
;
}
return
;
}
,
{
}
as
<
string
,
string
|
string
[
]
>
)
;
.
end
(
)
;
resolve
(
{
:
.
,
:
.
,
}
)
;
}
)
;
.
on
(
'error'
,
)
;
.
end
(
)
;
}
)
;
}
const
=
[
'http.proxy'
,
'http.noProxy'
,
'http.proxyAuthorization'
,
'http.proxyStrictSSL'
,
'http.proxySupport'
,
'http.electronFetch'
,
'http.fetchAdditionalSupport'
,
'http.proxyKerberosServicePrincipal'
,
'http.systemCertificates'
,
'http.systemCertificatesNode'
,
'http.experimental.systemCertificatesV2'
,
'http.useLocalProxyConfiguration'
,
'telemetry.telemetryLevel'
,
'telemetry.enableTelemetry'
,
'telemetry.enableCrashReporter'
,
]
;
const
=
[
'http.systemCertificatesNode'
,
'telemetry.telemetryLevel'
,
]
;
function
getNetworkSettings
(
)
{
const
=
.
.
getConfiguration
(
)
;
return
.
map
(
=>
{
const
=
.
inspect
(
)
;
const
=
.
get
(
,
?.
)
;
if
(
.
includes
(
)
||
!==
?.
&&
!
(
Array
.
isArray
(
)
&&
Array
.
isArray
(
?.
)
&&
.
===
0
&&
?.
.
===
0
)
)
{
return
` \n " ${ key} ": ${ JSON . stringify ( v) } , `
;
}
return
''
;
}
)
.
join
(
''
)
;
}
function
getProxyEnvVariables
(
)
{
const
=
[
]
;
const
=
[
'http_proxy'
,
'https_proxy'
,
'ftp_proxy'
,
'all_proxy'
,
'no_proxy'
]
;
for
(
const
in
.
)
{
if
(
.
includes
(
.
toLowerCase
(
)
)
)
{
.
push
(
` \n- ${ env} = ${ process. env[ env] } `
)
;
}
}
return
.
?
` \n\nEnvironment Variables: ${ res. join ( '' ) } `
:
''
;
}
interface
ProxyInfo
{
:
string
;
:
string
;
}
async
function
resolveProxyInfo
(
:
string
,
:
)
:
Promise
<
>
{
try
{
const
=
loadVSCodeModule < ProxyAgent>
(
'@vscode/proxy-agent'
)
;
if
(
!
?.
)
{
return
{
:
'UNKNOWN'
,
:
'missing'
}
;
}
const
=
await
Promise
.
race
(
[
.
resolveProxyByURL
(
)
,
timeoutAfter
(
5000
)
]
)
;
if
(
===
'timeout'
)
{
return
{
:
'UNKNOWN'
,
:
'timeout'
}
;
}
return
{
:
.
,
:
.
}
;
}
catch
(
)
{
.
debug
(
` Fetcher telemetry: Failed to resolve proxy info: ${ err?. message} `
)
;
return
{
:
'UNKNOWN'
,
:
'error'
}
;
}
}
export
class
FetcherTelemetryContribution
{
constructor
(
@ IInstantiationService
:
,
)
{
.
invokeFunction
(
)
;
}
}
function
collectFetcherTelemetry
(
:
)
:
void
{
const
=
.
get
(
)
;
const
=
.
get
(
)
;
const
=
.
get
(
)
;
const
=
.
get
(
)
;
const
=
.
get
(
)
;
const
=
.
get
(
)
;
if
(
!
.
.
||
.
!==
.
.
||
)
{
return
;
}
if
(
!
.
getExperimentBasedConfig
(
.
.
,
)
)
{
return
;
}
const
=
.
now
(
)
;
const
=
.
.
get < number >
(
'lastCollectFetcherTelemetryTime'
,
0
)
;
if
(
-
<
5
*
60
*
1000
)
{
.
debug
(
` Send fetcher telemetry: Skipped. `
)
;
return
;
}
(
async
(
)
=>
{
await
.
.
update
(
'lastCollectFetcherTelemetryTime'
,
)
;
.
debug
(
` Send fetcher telemetry: Exclude other windows. `
)
;
const
=
generateUuid
(
)
;
await
.
.
update
(
'lastCollectFetcherTelemetryUUID'
,
)
;
await
timeout
(
5000
)
;
if
(
.
.
get < string >
(
'lastCollectFetcherTelemetryUUID'
)
!==
)
{
.
debug
(
` Send fetcher telemetry: Other window won. `
)
;
return
;
}
.
debug
(
` Send fetcher telemetry: This window won. `
)
;
const
=
[
.
create
(
)
,
new
NodeFetchFetcher
(
)
,
new
NodeFetcher
(
)
,
]
.
filter
(
=>
)
as
[
]
;
shuffle
(
)
;
const
:
<
string
,
string
>
=
{
}
;
for
(
const
of
)
{
const
=
.
getUserAgentLibrary
(
)
;
const
=
.
replace
(
/ - / g
,
''
)
;
const
=
.
now
(
)
;
try
{
const
=
await
sendRawTelemetry
(
,
,
,
,
'GitHub.copilot-chat/fetcherTelemetryProbe'
,
{
}
)
;
[
]
=
` Status: ${ response. status} `
;
.
debug
(
` Fetcher telemetry probe: ${ library} ${ probeResults[ key] } ( ${ Date. now ( ) - requestStartTime} ms) `
)
;
}
catch
(
)
{
[
]
=
` Error: ${ sanitizeNetworkErrorForTelemetry ( collectSingleLineErrorMessage ( e, true ) ) } `
;
.
debug
(
` Fetcher telemetry probe: ${ library} ${ probeResults[ key] } ( ${ Date. now ( ) - requestStartTime} ms) `
)
;
}
}
const
{
:
,
:
}
=
await
resolveProxyInfo
(
.
,
)
;
const
=
generateUuid
(
)
;
const
=
.
.
===
.
.
UI
?
'local'
:
'remote'
;
for
(
const
of
)
{
const
=
.
now
(
)
;
try
{
const
:
<
string
,
string
>
=
{
,
:
.
getUserAgentLibrary
(
)
,
,
:
.
.
??
'none'
,
,
,
...
,
}
;
const
=
await
sendRawTelemetry
(
,
,
,
,
'GitHub.copilot-chat/fetcherTelemetry'
,
)
;
.
debug
(
` Fetcher telemetry: Succeeded in ${ Date. now ( ) - requestStartTime} ms using ${ fetcher. getUserAgentLibrary ( ) } with status ${ response. status} ( ${ response. statusText} ). `
)
;
}
catch
(
)
{
.
debug
(
` Fetcher telemetry: Failed in ${ Date. now ( ) - requestStartTime} ms using ${ fetcher. getUserAgentLibrary ( ) } . `
)
;
}
}
}
)
(
)
.
catch
(
=>
{
.
error
(
)
;
}
)
;
}
const
=
'https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream'
;
async
function
sendRawTelemetry
(
:
,
:
,
:
string
,
:
,
:
string
,
:
<
string
,
string
>
)
{
const
=
require
(
.
join
(
.
.
,
'product.json'
)
)
;
const
:
string
=
.
||
''
;
const
=
(
.
.
as
{
?
:
string
}
)
.
??
''
;
const
=
` o: ${ ariaKey. split ( '-' ) [ 0 ] } `
;
const
=
'1DS-Web-JS-4.3.10'
;
const
=
new
Date
(
.
now
(
)
-
10
)
.
toISOString
(
)
;
const
=
{
:
,
:
,
:
'4.0'
,
,
:
{
:
{
:
}
,
:
{
:
'{"GPC_DataSharingOptIn":false}'
}
,
}
,
:
{
:
{
:
,
:
{
...
,
'abexp.assignmentcontext'
:
''
,
'common.os'
:
.
platform
(
)
,
'common.nodeArch'
:
.
arch
(
)
,
'common.platformversion'
:
.
release
(
)
,
'common.telemetryclientversion'
:
'1.5.0'
,
'common.extname'
:
EXTENSION_ID
,
'common.extversion'
:
.
getVersion
(
)
,
'common.vscodemachineid'
:
.
,
'common.vscodesessionid'
:
.
,
'common.vscodecommithash'
:
,
'common.sqmid'
:
''
,
'common.devDeviceId'
:
.
,
'common.vscodeversion'
:
.
,
'common.vscodereleasedate'
:
.
||
'unknown'
,
'common.isnewappinstall'
:
.
.
,
'common.product'
:
.
,
'common.uikind'
:
.
,
'common.remotename'
:
.
??
'none'
,
'version'
:
'PostChannel=4.3.10'
,
}
,
}
,
}
,
}
;
const
=
JSON
.
stringify
(
)
;
const
:
<
string
,
string
>
=
{
'Client-Id'
:
'NO_AUTH'
,
'client-version'
:
,
'apikey'
:
,
'upload-time'
:
String
(
.
now
(
)
)
,
'time-delta-to-apply-millis'
:
'use-collector-delta'
,
'cache-control'
:
'no-cache, no-store'
,
'content-type'
:
'application/x-json-stream'
,
'User-Agent'
:
` GitHubCopilotChat/ ${ envService. getVersion ( ) } `
,
[
]
:
.
getUserAgentLibrary
(
)
,
}
;
if
(
.
getUserAgentLibrary
(
)
===
.
ID
)
{
[
'content-length'
]
=
String
(
.
byteLength
(
)
)
;
}
const
=
await
.
fetch
(
,
{
:
'POST'
,
,
,
:
'diagnostics-telemetry-probe'
,
}
)
;
await
.
text
(
)
;
return
;
}
async
function
sendRawAITelemetry
(
:
,
:
,
:
string
)
{
const
=
'[]'
;
const
:
<
string
,
string
>
=
{
'Content-Type'
:
'application/json'
,
'User-Agent'
:
` GitHubCopilotChat/ ${ envService. getVersion ( ) } `
,
[
]
:
.
getUserAgentLibrary
(
)
,
}
;
if
(
.
getUserAgentLibrary
(
)
===
.
ID
)
{
[
'content-length'
]
=
String
(
.
byteLength
(
)
)
;
}
const
=
await
.
fetch
(
,
{
:
'POST'
,
,
,
:
'diagnostics-telemetry-probe'
,
}
)
;
await
.
text
(
)
;
return
;
}
const
=
/ ( ^ | \b ) [ \p{L} \p{Nd} ] + ( ( =""? [ ^ "] + ""? ) | ( ( [ .:=/"_-] + [ \p{L} \p{Nd} ] + ) + ) ) ( \b | $ ) / giu
;
export
function
sanitizeValue
(
:
string
|
undefined
)
:
string
{
return
(
||
''
)
.
replace
(
,
(
)
=>
maskByClass
(
)
)
;
}
function
maskByClass
(
:
string
)
:
string
{
if
(
/ ^ net::[ A- Z _] + $ /
.
test
(
)
||
[
'dev-container'
,
'attached-container'
,
'k8s-container'
,
'ssh-remote'
]
.
includes
(
)
)
{
return
;
}
return
.
replace
(
/ \p{Lu} | \p{Ll} | \p{Nd} / gu
,
(
)
=>
{
if
(
/ \p{Lu} / u
.
test
(
)
)
{
return
'A'
;
}
if
(
/ \p{Ll} / u
.
test
(
)
)
{
return
'a'
;
}
return
'0'
;
}
)
;
}
class
NetworkStatus
extends
Disposable
{
private
readonly
:
.
;
private
readonly
:
[
]
=
[
]
;
private
readonly
=
this
.
_register
(
new
MutableDisposable
(
)
)
;
constructor
(
private
readonly
:
,
private
readonly
:
,
private
readonly
:
)
{
super
(
)
;
this
.
=
this
.
_register
(
.
.
createStatusBarItem
(
'copilot.networkStatus'
,
.
.
,
-
1000
)
)
;
this
.
.
=
'Copilot Network Status'
;
this
.
_register
(
.
onDidChangeConfiguration
(
=>
{
if
(
.
affectsConfiguration
(
.
.
.
)
)
{
this
.
_update
(
)
;
}
}
)
)
;
this
.
_update
(
)
;
}
private
_isEnabled
(
)
:
boolean
{
return
this
.
.
getExperimentBasedConfig
(
.
.
,
this
.
)
;
}
private
_onEvent
(
:
)
:
void
{
this
.
.
push
(
)
;
const
=
.
now
(
)
-
5
*
60
*
1000
;
while
(
this
.
.
>
0
&&
this
.
[
0
]
.
<
)
{
this
.
.
shift
(
)
;
}
this
.
_update
(
)
;
}
private
_update
(
)
:
void
{
const
=
this
.
_isEnabled
(
)
;
if
(
&&
!
this
.
.
)
{
this
.
.
=
this
.
.
onDidFetch
(
=>
this
.
_onEvent
(
)
)
;
}
else
if
(
!
)
{
this
.
.
=
undefined
;
this
.
.
=
0
;
this
.
.
hide
(
)
;
return
;
}
const
=
new
Map< string , FetchEvent>
(
)
;
for
(
const
of
this
.
)
{
.
set
(
.
,
)
;
}
const
=
[
...
.
values
(
)
]
;
const
=
.
filter
(
=>
.
===
'error'
)
;
this
.
.
=
` Copilot Network: ${ errors. length} errors / ${ latest. length} total `
;
const
=
new
Map< string , { total: number ; errors: number ; cancellations: number } >
(
)
;
for
(
const
of
)
{
let
=
.
get
(
.
)
;
if
(
!
)
{
=
{
:
0
,
:
0
,
:
0
}
;
.
set
(
.
,
)
;
}
.
++
;
if
(
.
===
'error'
)
{
.
++
;
}
else
if
(
.
===
'cancel'
)
{
.
++
;
}
}
const
=
new
vscode
.
MarkdownString
(
)
;
.
appendMarkdown
(
` | Hostname | Errors | Cancellations | Total |\n `
)
;
.
appendMarkdown
(
` |:--|--:|--:|--:|\n `
)
;
for
(
const
[
,
{
,
,
}
]
of
[
...
]
.
sort
(
(
,
)
=>
[
1
]
.
-
[
1
]
.
)
)
{
.
appendMarkdown
(
` | ${ hostname} | ${ errors} | ${ cancellations} | ${ total} |\n `
)
;
}
.
appendMarkdown
(
` \n** ${ errors. length} ** of ** ${ latest. length} ** network requests failed in the last 5 minutes `
)
;
this
.
.
=
;
this
.
.
show
(
)
;
}
}