@codingame/monaco-vscode-update-service-override 36.2.7 → 37.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,6 @@ import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
10
10
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
11
11
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
12
12
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
13
- import { IMeteredConnectionService } from '@codingame/monaco-vscode-api/vscode/vs/platform/meteredConnection/common/meteredConnection.service';
14
13
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
15
14
  import { StateType, DisablementReason } from '@codingame/monaco-vscode-api/vscode/vs/platform/update/common/update';
16
15
  import { ShowCurrentReleaseNotesActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/update/common/update';
@@ -24,7 +23,6 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
24
23
  commandService,
25
24
  configurationService,
26
25
  hoverService,
27
- meteredConnectionService,
28
26
  productService
29
27
  ) {
30
28
  super();
@@ -32,7 +30,6 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
32
30
  this.commandService = commandService;
33
31
  this.configurationService = configurationService;
34
32
  this.hoverService = hoverService;
35
- this.meteredConnectionService = meteredConnectionService;
36
33
  this.productService = productService;
37
34
  this.domNode = $(".update-tooltip");
38
35
  const header = append(this.domNode, $(".header"));
@@ -47,9 +44,11 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
47
44
  const currentVersionRow = this.createVersionRow(details);
48
45
  this.currentVersionNode = currentVersionRow.label;
49
46
  this.currentVersionCopyValue = currentVersionRow.copyValue;
47
+ this.currentVersionCopyButton = currentVersionRow.copyButton;
50
48
  const latestVersionRow = this.createVersionRow(details);
51
49
  this.latestVersionNode = latestVersionRow.label;
52
50
  this.latestVersionCopyValue = latestVersionRow.copyValue;
51
+ this.latestVersionCopyButton = latestVersionRow.copyButton;
53
52
  this.releaseDateNode = append(details, $(".product-release-date"));
54
53
  this.progressContainer = append(this.domNode, $(".progress-container"));
55
54
  const progressBar = append(this.progressContainer, $(".progress-bar"));
@@ -63,7 +62,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
63
62
  this.messageNode = append(this.domNode, $(".state-message"));
64
63
  this.buttonBar = append(this.domNode, $(".button-bar"));
65
64
  this.releaseNotesButton = append(this.buttonBar, $("button.release-notes-button"));
66
- this.releaseNotesButton.textContent = ( localize(16347, "Release Notes"));
65
+ this.releaseNotesButton.textContent = ( localize(18411, "Release Notes"));
67
66
  this._register(addDisposableListener(this.releaseNotesButton, "click", () => {
68
67
  if (this.releaseNotesVersion) {
69
68
  this.runCommandAndClose(ShowCurrentReleaseNotesActionId, this.releaseNotesVersion);
@@ -82,11 +81,13 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
82
81
  const productVersion = this.productService.version;
83
82
  if (productVersion) {
84
83
  const currentCommitId = this.productService.commit?.substring(0, 7);
85
- this.currentVersionNode.textContent = currentCommitId ? ( localize(16348, "Current Version: {0} ({1})", productVersion, currentCommitId)) : ( localize(16349, "Current Version: {0}", productVersion));
84
+ this.currentVersionNode.textContent = currentCommitId ? ( localize(18412, "Current Version: {0} ({1})", productVersion, currentCommitId)) : ( localize(18413, "Current Version: {0}", productVersion));
86
85
  this.currentVersionCopyValue.value = currentCommitId ? `${productVersion} (${this.productService.commit})` : productVersion;
87
86
  this.currentVersionNode.parentElement.style.display = "";
87
+ this.currentVersionCopyButton.tabIndex = 0;
88
88
  } else {
89
89
  this.currentVersionNode.parentElement.style.display = "none";
90
+ this.currentVersionCopyButton.tabIndex = -1;
90
91
  }
91
92
  }
92
93
  hideAll() {
@@ -96,6 +97,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
96
97
  this.timeRemainingNode.textContent = "";
97
98
  this.messageNode.style.display = "none";
98
99
  this.actionButton.style.display = "none";
100
+ this.actionButton.tabIndex = -1;
99
101
  this.actionButton.dataset.commandId = "";
100
102
  this.releaseNotesButton.style.marginRight = "";
101
103
  }
@@ -141,46 +143,46 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
141
143
  }
142
144
  }
143
145
  renderUninitialized() {
144
- this.renderTitleAndInfo(( localize(16350, "Initializing")));
145
- this.renderMessage(( localize(16351, "Initializing update service...")));
146
+ this.renderTitleAndInfo(( localize(18414, "Initializing")));
147
+ this.renderMessage(( localize(18415, "Initializing update service...")));
146
148
  }
147
149
  renderDisabled(
148
150
  {
149
151
  reason
150
152
  }
151
153
  ) {
152
- this.renderTitleAndInfo(( localize(16352, "Updates Disabled")));
154
+ this.renderTitleAndInfo(( localize(18416, "Updates Disabled")));
153
155
  switch (reason) {
154
156
  case DisablementReason.NotBuilt:
155
- this.renderMessage(( localize(16353, "Updates are not available for this build.")), Codicon.info);
157
+ this.renderMessage(( localize(18417, "Updates are not available for this build.")), Codicon.info);
156
158
  break;
157
159
  case DisablementReason.DisabledByEnvironment:
158
- this.renderMessage(( localize(16354, "Updates are disabled by the --disable-updates command line flag.")), Codicon.warning);
160
+ this.renderMessage(( localize(18418, "Updates are disabled by the --disable-updates command line flag.")), Codicon.warning);
159
161
  break;
160
162
  case DisablementReason.ManuallyDisabled:
161
163
  this.renderMessage(( localize(
162
- 16355,
164
+ 18419,
163
165
  "Updates are manually disabled. Change the \"update.mode\" setting to enable."
164
166
  )), Codicon.warning);
165
167
  break;
166
168
  case DisablementReason.Policy:
167
- this.renderMessage(( localize(16356, "Updates are disabled by organization policy.")), Codicon.info);
169
+ this.renderMessage(( localize(18420, "Updates are disabled by organization policy.")), Codicon.info);
168
170
  break;
169
171
  case DisablementReason.MissingConfiguration:
170
- this.renderMessage(( localize(16357, "Updates are disabled because no update URL is configured.")), Codicon.info);
172
+ this.renderMessage(( localize(18421, "Updates are disabled because no update URL is configured.")), Codicon.info);
171
173
  break;
172
174
  case DisablementReason.InvalidConfiguration:
173
- this.renderMessage(( localize(16358, "Updates are disabled because the update URL is invalid.")), Codicon.error);
175
+ this.renderMessage(( localize(18422, "Updates are disabled because the update URL is invalid.")), Codicon.error);
174
176
  break;
175
177
  case DisablementReason.RunningAsAdmin:
176
178
  this.renderMessage(( localize(
177
- 16359,
179
+ 18423,
178
180
  "Updates are not available when running a user install of {0} as administrator.",
179
181
  this.productService.nameShort
180
182
  )), Codicon.warning);
181
183
  break;
182
184
  default:
183
- this.renderMessage(( localize(16360, "Updates are disabled.")), Codicon.warning);
185
+ this.renderMessage(( localize(18424, "Updates are disabled.")), Codicon.warning);
184
186
  break;
185
187
  }
186
188
  }
@@ -191,55 +193,49 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
191
193
  }
192
194
  ) {
193
195
  if (error) {
194
- this.renderTitleAndInfo(( localize(16361, "Update Error")));
196
+ this.renderTitleAndInfo(( localize(18425, "Update Error")));
195
197
  this.renderMessage(error, Codicon.error);
196
198
  return;
197
199
  }
198
200
  if (notAvailable) {
199
- this.renderTitleAndInfo(( localize(16362, "No Update Available")));
200
- this.renderMessage(( localize(16363, "There are no updates currently available.")), Codicon.info);
201
+ this.renderTitleAndInfo(( localize(18426, "No Update Available")));
202
+ this.renderMessage(( localize(18427, "There are no updates currently available.")), Codicon.info);
201
203
  return;
202
204
  }
203
- this.renderTitleAndInfo(( localize(16364, "Up to Date")));
204
- switch (this.configurationService.getValue("update.mode")) {
205
+ const updateMode = this.configurationService.getValue("update.mode");
206
+ this.renderTitleAndInfo(( localize(18428, "Up to Date")));
207
+ switch (updateMode) {
205
208
  case "none":
206
- this.renderMessage(( localize(16365, "Automatic updates are disabled.")), Codicon.warning);
209
+ this.renderMessage(( localize(18429, "Automatic updates are disabled.")), Codicon.warning);
207
210
  break;
208
211
  case "manual":
209
212
  this.renderMessage(( localize(
210
- 16366,
213
+ 18430,
211
214
  "Automatic updates will be checked but not installed automatically."
212
215
  )));
213
216
  break;
214
217
  case "start":
215
- this.renderMessage(( localize(16367, "Updates will be applied on restart.")));
218
+ this.renderMessage(( localize(18431, "Updates will be applied on restart.")));
216
219
  break;
217
220
  case "default":
218
- if (this.meteredConnectionService.isConnectionMetered) {
219
- this.renderMessage(( localize(
220
- 16368,
221
- "Automatic updates are paused because the network connection is metered."
222
- )), Codicon.radioTower);
223
- } else {
224
- this.renderMessage(( localize(16369, "Automatic updates are enabled. Happy Coding!")), Codicon.smiley);
225
- }
221
+ this.renderMessage(( localize(18432, "Automatic updates are enabled. Happy Coding!")), Codicon.smiley);
226
222
  break;
227
223
  }
228
224
  }
229
225
  renderCheckingForUpdates() {
230
- this.renderTitleAndInfo(( localize(16370, "Checking for Updates")));
231
- this.renderMessage(( localize(16371, "Checking for updates, please wait...")));
226
+ this.renderTitleAndInfo(( localize(18433, "Checking for Updates")));
227
+ this.renderMessage(( localize(18434, "Checking for updates, please wait...")));
232
228
  }
233
229
  renderAvailableForDownload(
234
230
  {
235
231
  update
236
232
  }
237
233
  ) {
238
- this.renderTitleAndInfo(( localize(16372, "Update Available")), update);
239
- this.renderActionButton(( localize(16373, "Download")), "update.downloadNow");
234
+ this.renderTitleAndInfo(( localize(18435, "Update Available")), update);
235
+ this.renderActionButton(( localize(18436, "Download")), "update.downloadNow");
240
236
  }
241
237
  renderDownloading(state) {
242
- this.renderTitleAndInfo(( localize(16374, "Downloading Update")), state.update);
238
+ this.renderTitleAndInfo(( localize(18437, "Downloading Update")), state.update);
243
239
  const {
244
240
  downloadedBytes,
245
241
  totalBytes
@@ -252,15 +248,15 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
252
248
  this.progressContainer.style.display = "";
253
249
  const speed = computeDownloadSpeed(state);
254
250
  if (speed !== undefined && speed > 0) {
255
- this.speedInfoNode.textContent = ( localize(16375, "{0}/s", formatBytes(speed)));
251
+ this.speedInfoNode.textContent = ( localize(18438, "{0}/s", formatBytes(speed)));
256
252
  }
257
253
  const timeRemaining = computeDownloadTimeRemaining(state);
258
254
  if (timeRemaining !== undefined && timeRemaining > 0) {
259
- this.timeRemainingNode.textContent = `~${formatTimeRemaining(timeRemaining)} ${( localize(16376, "remaining"))}`;
255
+ this.timeRemainingNode.textContent = `~${formatTimeRemaining(timeRemaining)} ${( localize(18439, "remaining"))}`;
260
256
  }
261
257
  this.downloadStatsContainer.style.display = "";
262
258
  } else {
263
- this.renderMessage(( localize(16377, "Downloading update, please wait...")));
259
+ this.renderMessage(( localize(18440, "Downloading update, please wait...")));
264
260
  }
265
261
  }
266
262
  renderDownloaded(
@@ -268,8 +264,8 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
268
264
  update
269
265
  }
270
266
  ) {
271
- this.renderTitleAndInfo(( localize(16378, "Update is Ready to Install")), update);
272
- this.renderActionButton(( localize(16379, "Install")), "update.install");
267
+ this.renderTitleAndInfo(( localize(18441, "Update is Ready to Install")), update);
268
+ this.renderActionButton(( localize(18442, "Install")), "update.install");
273
269
  }
274
270
  renderUpdating(
275
271
  {
@@ -278,7 +274,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
278
274
  maxProgress
279
275
  }
280
276
  ) {
281
- this.renderTitleAndInfo(( localize(16380, "Installing Update")), update);
277
+ this.renderTitleAndInfo(( localize(18443, "Installing Update")), update);
282
278
  const percentage = computeProgressPercent(currentProgress, maxProgress);
283
279
  if (percentage !== undefined) {
284
280
  this.progressFill.style.width = `${percentage}%`;
@@ -286,7 +282,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
286
282
  this.progressSizeNode.textContent = "";
287
283
  this.progressContainer.style.display = "";
288
284
  } else {
289
- this.renderMessage(( localize(16381, "Installing update, please wait...")));
285
+ this.renderMessage(( localize(18444, "Installing update, please wait...")));
290
286
  }
291
287
  }
292
288
  renderReady(
@@ -295,10 +291,10 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
295
291
  }
296
292
  ) {
297
293
  if (this.configurationService.getValue("update.mode") === "manual") {
298
- this.renderTitleAndInfo(( localize(16382, "Update Installed")), update);
299
- this.renderActionButton(( localize(16383, "Restart")), "update.restart");
294
+ this.renderTitleAndInfo(( localize(18445, "Update Installed")), update);
295
+ this.renderActionButton(( localize(18446, "Restart")), "update.restart");
300
296
  } else {
301
- this.renderTitleAndInfo(( localize(16384, "Restart to Update")), update);
297
+ this.renderTitleAndInfo(( localize(18447, "Restart to Update")), update);
302
298
  }
303
299
  }
304
300
  renderOverwriting(
@@ -306,41 +302,44 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
306
302
  update
307
303
  }
308
304
  ) {
309
- this.renderTitleAndInfo(( localize(16385, "Downloading Newer Update")), update);
310
- this.renderMessage(( localize(16386, "A newer update was released. Downloading, please wait...")));
305
+ this.renderTitleAndInfo(( localize(18448, "Downloading Newer Update")), update);
306
+ this.renderMessage(( localize(18449, "A newer update was released. Downloading, please wait...")));
311
307
  }
312
308
  renderRestarting(
313
309
  {
314
310
  update
315
311
  }
316
312
  ) {
317
- this.renderTitleAndInfo(( localize(16387, "Restarting {0}", this.productService.nameShort)), update);
318
- this.renderMessage(( localize(16388, "Restarting to update, please wait...")));
313
+ this.renderTitleAndInfo(( localize(18450, "Restarting {0}", this.productService.nameShort)), update);
314
+ this.renderMessage(( localize(18451, "Restarting to update, please wait...")));
319
315
  }
320
316
  renderCancelling() {
321
- this.renderTitleAndInfo(( localize(16389, "Cancelling Update")));
322
- this.renderMessage(( localize(16390, "Cancelling update, please wait...")));
317
+ this.renderTitleAndInfo(( localize(18452, "Cancelling Update")));
318
+ this.renderMessage(( localize(18453, "Cancelling update, please wait...")));
323
319
  }
324
320
  renderTitleAndInfo(title, update) {
325
321
  this.titleNode.textContent = title;
326
322
  const version = update?.productVersion;
327
323
  if (version) {
328
324
  const updateCommitId = update.version?.substring(0, 7);
329
- this.latestVersionNode.textContent = updateCommitId ? ( localize(16391, "Latest Version: {0} ({1})", version, updateCommitId)) : ( localize(16392, "Latest Version: {0}", version));
325
+ this.latestVersionNode.textContent = updateCommitId ? ( localize(18454, "Latest Version: {0} ({1})", version, updateCommitId)) : ( localize(18455, "Latest Version: {0}", version));
330
326
  this.latestVersionCopyValue.value = updateCommitId ? `${version} (${update.version})` : version;
331
327
  this.latestVersionNode.parentElement.style.display = "";
328
+ this.latestVersionCopyButton.tabIndex = 0;
332
329
  } else {
333
330
  this.latestVersionNode.parentElement.style.display = "none";
331
+ this.latestVersionCopyButton.tabIndex = -1;
334
332
  }
335
333
  const releaseDate = update?.timestamp ?? tryParseDate(this.productService.date);
336
334
  if (typeof releaseDate === "number" && releaseDate > 0) {
337
- this.releaseDateNode.textContent = ( localize(16393, "Released {0}", formatDate(releaseDate)));
335
+ this.releaseDateNode.textContent = ( localize(18456, "Released {0}", formatDate(releaseDate)));
338
336
  this.releaseDateNode.style.display = "";
339
337
  } else {
340
338
  this.releaseDateNode.style.display = "none";
341
339
  }
342
340
  this.releaseNotesVersion = version ?? this.productService.version;
343
341
  this.releaseNotesButton.style.display = this.releaseNotesVersion ? "" : "none";
342
+ this.releaseNotesButton.tabIndex = this.releaseNotesVersion ? 0 : -1;
344
343
  this.releaseNotesButton.style.marginRight = this.releaseNotesVersion ? "auto" : "";
345
344
  this.buttonBar.style.display = this.releaseNotesVersion ? "" : "none";
346
345
  }
@@ -348,6 +347,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
348
347
  this.actionButton.textContent = label;
349
348
  this.actionButton.dataset.commandId = commandId;
350
349
  this.actionButton.style.display = "";
350
+ this.actionButton.tabIndex = 0;
351
351
  }
352
352
  renderMessage(message, icon) {
353
353
  clearNode(this.messageNode);
@@ -367,7 +367,7 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
367
367
  const copyButton = append(row, $("a.copy-version-button"));
368
368
  copyButton.setAttribute("role", "button");
369
369
  copyButton.setAttribute("tabindex", "0");
370
- const title = ( localize(16394, "Copy"));
370
+ const title = ( localize(18457, "Copy"));
371
371
  copyButton.title = title;
372
372
  copyButton.setAttribute("aria-label", title);
373
373
  const copyIcon = append(copyButton, $(".copy-icon"));
@@ -381,7 +381,8 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
381
381
  }));
382
382
  return {
383
383
  label,
384
- copyValue
384
+ copyValue,
385
+ copyButton
385
386
  };
386
387
  }
387
388
  runCommandAndClose(command, ...args) {
@@ -389,6 +390,6 @@ let UpdateTooltip = class UpdateTooltip extends Disposable {
389
390
  this.hoverService.hideHover(true);
390
391
  }
391
392
  };
392
- UpdateTooltip = ( __decorate([( __param(0, IClipboardService)), ( __param(1, ICommandService)), ( __param(2, IConfigurationService)), ( __param(3, IHoverService)), ( __param(4, IMeteredConnectionService)), ( __param(5, IProductService))], UpdateTooltip));
393
+ UpdateTooltip = ( __decorate([( __param(0, IClipboardService)), ( __param(1, ICommandService)), ( __param(2, IConfigurationService)), ( __param(3, IHoverService)), ( __param(4, IProductService))], UpdateTooltip));
393
394
 
394
395
  export { UpdateTooltip };
@@ -54,31 +54,31 @@ function formatTimeRemaining(seconds) {
54
54
  if (hours >= 1) {
55
55
  const formattedHours = formatDecimal(hours);
56
56
  if (formattedHours === "1") {
57
- return localize(16395, "{0} hour", formattedHours);
57
+ return localize(18458, "{0} hour", formattedHours);
58
58
  } else {
59
- return localize(16396, "{0} hours", formattedHours);
59
+ return localize(18459, "{0} hours", formattedHours);
60
60
  }
61
61
  }
62
62
  const minutes = Math.floor(seconds / 60);
63
63
  if (minutes >= 1) {
64
- return localize(16397, "{0} min", minutes);
64
+ return localize(18460, "{0} min", minutes);
65
65
  }
66
- return localize(16398, "{0}s", seconds);
66
+ return localize(18461, "{0}s", seconds);
67
67
  }
68
68
  function formatBytes(bytes) {
69
69
  if (bytes < 1024) {
70
- return localize(16399, "{0} B", bytes);
70
+ return localize(18462, "{0} B", bytes);
71
71
  }
72
72
  const kb = bytes / 1024;
73
73
  if (kb < 1024) {
74
- return localize(16400, "{0} KB", formatDecimal(kb));
74
+ return localize(18463, "{0} KB", formatDecimal(kb));
75
75
  }
76
76
  const mb = kb / 1024;
77
77
  if (mb < 1024) {
78
- return localize(16401, "{0} MB", formatDecimal(mb));
78
+ return localize(18464, "{0} MB", formatDecimal(mb));
79
79
  }
80
80
  const gb = mb / 1024;
81
- return localize(16402, "{0} GB", formatDecimal(gb));
81
+ return localize(18465, "{0} GB", formatDecimal(gb));
82
82
  }
83
83
  function tryParseDate(date) {
84
84
  if (date === undefined) {
@@ -1,95 +0,0 @@
1
- import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
- import type { IExperimentationFilterProvider } from "tas-client";
3
- export declare const ASSIGNMENT_STORAGE_KEY = "VSCode.ABExp.FeatureData";
4
- export declare const ASSIGNMENT_REFETCH_INTERVAL: number;
5
- export interface IAssignmentService {
6
- readonly _serviceBrand: undefined;
7
- readonly onDidRefetchAssignments: Event<void>;
8
- getTreatment<T extends string | number | boolean>(name: string): Promise<T | undefined>;
9
- }
10
- export declare enum TargetPopulation {
11
- Insiders = "insider",
12
- Public = "public",
13
- Exploration = "exploration"
14
- }
15
- export declare enum Filters {
16
- /**
17
- * The market in which the extension is distributed.
18
- */
19
- Market = "X-MSEdge-Market",
20
- /**
21
- * The corporation network.
22
- */
23
- CorpNet = "X-FD-Corpnet",
24
- /**
25
- * Version of the application which uses experimentation service.
26
- */
27
- ApplicationVersion = "X-VSCode-AppVersion",
28
- /**
29
- * Insiders vs Stable.
30
- */
31
- Build = "X-VSCode-Build",
32
- /**
33
- * Client Id which is used as primary unit for the experimentation.
34
- */
35
- ClientId = "X-MSEdge-ClientId",
36
- /**
37
- * Developer Device Id which can be used as an alternate unit for experimentation.
38
- */
39
- DeveloperDeviceId = "X-VSCode-DevDeviceId",
40
- /**
41
- * Extension header.
42
- */
43
- ExtensionName = "X-VSCode-ExtensionName",
44
- /**
45
- * The version of the extension.
46
- */
47
- ExtensionVersion = "X-VSCode-ExtensionVersion",
48
- /**
49
- * The language in use by VS Code
50
- */
51
- Language = "X-VSCode-Language",
52
- /**
53
- * The target population.
54
- * This is used to separate internal, early preview, GA, etc.
55
- */
56
- TargetPopulation = "X-VSCode-TargetPopulation",
57
- /**
58
- * The platform (OS) on which VS Code is running.
59
- */
60
- Platform = "X-VSCode-Platform",
61
- /**
62
- * The release/build date of VS Code (UTC) in the format yyyymmddHH.
63
- */
64
- ReleaseDate = "X-VSCode-ReleaseDate",
65
- /**
66
- * The kind of window VS Code is running in (`editor` or `agents`).
67
- */
68
- WindowKind = "X-VSCode-WindowKind"
69
- }
70
- export declare enum WindowKind {
71
- Editor = "editor",
72
- Agents = "agents"
73
- }
74
- export declare class AssignmentFilterProvider implements IExperimentationFilterProvider {
75
- private version;
76
- private appName;
77
- private machineId;
78
- private devDeviceId;
79
- private targetPopulation;
80
- private releaseDate;
81
- private windowKind;
82
- constructor(version: string, appName: string, machineId: string, devDeviceId: string, targetPopulation: TargetPopulation, releaseDate: string, windowKind: WindowKind);
83
- /**
84
- * Returns a version string that can be parsed by the TAS client.
85
- * The tas client cannot handle suffixes lke "-insider"
86
- * Ref: https://github.com/microsoft/tas-client/blob/30340d5e1da37c2789049fcf45928b954680606f/vscode-tas-client/src/vscode-tas-client/VSCodeFilterProvider.ts#L35
87
- *
88
- * @param version Version string to be trimmed.
89
- */
90
- private static trimVersionSuffix;
91
- getFilterValue(filter: string): string | null;
92
- private static formatReleaseDate;
93
- getFilters(): Map<string, unknown>;
94
- }
95
- export declare function getInternalOrg(organisations: string[] | undefined): "vscode" | "github" | "microsoft" | undefined;
@@ -1,38 +0,0 @@
1
-
2
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
3
-
4
- var TargetPopulation;
5
- (function(TargetPopulation) {
6
- TargetPopulation["Insiders"] = "insider";
7
- TargetPopulation["Public"] = "public";
8
- TargetPopulation["Exploration"] = "exploration";
9
- })(TargetPopulation || (TargetPopulation = {}));
10
- var Filters;
11
- (function(Filters) {
12
- Filters["Market"] = "X-MSEdge-Market";
13
- Filters["CorpNet"] = "X-FD-Corpnet";
14
- Filters["ApplicationVersion"] = "X-VSCode-AppVersion";
15
- Filters["Build"] = "X-VSCode-Build";
16
- Filters["ClientId"] = "X-MSEdge-ClientId";
17
- Filters["DeveloperDeviceId"] = "X-VSCode-DevDeviceId";
18
- Filters["ExtensionName"] = "X-VSCode-ExtensionName";
19
- Filters["ExtensionVersion"] = "X-VSCode-ExtensionVersion";
20
- Filters["Language"] = "X-VSCode-Language";
21
- Filters["TargetPopulation"] = "X-VSCode-TargetPopulation";
22
- Filters["Platform"] = "X-VSCode-Platform";
23
- Filters["ReleaseDate"] = "X-VSCode-ReleaseDate";
24
- Filters["WindowKind"] = "X-VSCode-WindowKind";
25
- })(Filters || (Filters = {}));
26
- var WindowKind;
27
- (function(WindowKind) {
28
- WindowKind["Editor"] = "editor";
29
- WindowKind["Agents"] = "agents";
30
- })(WindowKind || (WindowKind = {}));
31
- function getInternalOrg(organisations) {
32
- const isVSCodeInternal = organisations?.includes("Visual-Studio-Code");
33
- const isGitHubInternal = organisations?.includes("github");
34
- const isMicrosoftInternal = organisations?.includes("microsoft") || organisations?.includes("ms-copilot") || organisations?.includes("MicrosoftCopilot");
35
- return isVSCodeInternal ? "vscode" : isGitHubInternal ? "github" : isMicrosoftInternal ? "microsoft" : undefined;
36
- }
37
-
38
- export { Filters, TargetPopulation, WindowKind, getInternalOrg };