@codingame/monaco-vscode-assignment-service-override 37.6.0 → 38.0.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.
- package/index.js +4 -0
- package/package.json +2 -2
- package/vscode/src/vs/workbench/services/assignment/common/assignmentFilters.d.ts +4 -0
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.d.ts +8 -0
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +2 -1
package/index.js
CHANGED
|
@@ -15,6 +15,10 @@ let AssignmentService = class AssignmentService {
|
|
|
15
15
|
this.configurationService = configurationService;
|
|
16
16
|
this.onDidRefetchAssignments = Event.None;
|
|
17
17
|
this.addTelemetryAssignmentFilter = () => { };
|
|
18
|
+
this.getTreatmentWithAssignment = async (name) => ({
|
|
19
|
+
value: await this.getTreatment(name),
|
|
20
|
+
hasAssignment: Promise.resolve(this.experimentsEnabled && this.treatments[name] !== undefined)
|
|
21
|
+
});
|
|
18
22
|
this.experimentsEnabled = !environmentService.disableExperiments;
|
|
19
23
|
}
|
|
20
24
|
async getCurrentExperiments() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-assignment-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "38.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - assignment service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "38.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -69,6 +69,8 @@ export declare class CopilotAssignmentFilterProvider extends Disposable implemen
|
|
|
69
69
|
private static trimVersionSuffix;
|
|
70
70
|
getFilterValue(filter: string): string | null;
|
|
71
71
|
getFilters(): Map<string, string | null>;
|
|
72
|
+
/** Maps the core-available Copilot filters to new TAS userParams without forwarding legacy headers. */
|
|
73
|
+
getAssignmentsFilters(): Map<string, string | null>;
|
|
72
74
|
}
|
|
73
75
|
/**
|
|
74
76
|
* userParam names for the new TAS assignments API (POST /api/v1/assignments) that carry
|
|
@@ -77,6 +79,7 @@ export declare class CopilotAssignmentFilterProvider extends Disposable implemen
|
|
|
77
79
|
*/
|
|
78
80
|
export declare enum GitHubAssignmentsFilter {
|
|
79
81
|
CopilotTrackingId = "copilottrackingid",
|
|
82
|
+
/** Whether the account is staff or belongs to a recognized internal organization. */
|
|
80
83
|
IsGhOrMsftStaff = "github_core_isghormsftstaff",
|
|
81
84
|
GhMsftOrExternal = "github_core_ghmsftorexternal"
|
|
82
85
|
}
|
|
@@ -88,6 +91,7 @@ export declare class GitHubCoreAssignmentsFilterProvider extends Disposable impl
|
|
|
88
91
|
private readonly _chatEntitlementService;
|
|
89
92
|
private copilotTrackingId;
|
|
90
93
|
private internalOrg;
|
|
94
|
+
private isInternal;
|
|
91
95
|
private readonly _onDidChangeFilters;
|
|
92
96
|
readonly onDidChangeFilters: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
93
97
|
constructor(_chatEntitlementService: IChatEntitlementService);
|
|
@@ -35,6 +35,12 @@ export declare function resolveScopedTreatment<T extends string | number | boole
|
|
|
35
35
|
* Exported for testing.
|
|
36
36
|
*/
|
|
37
37
|
export declare function toExperimentTelemetryData(props: Map<string, string>): ITelemetryData;
|
|
38
|
+
export interface ITreatmentWithAssignment<T extends string | number | boolean> {
|
|
39
|
+
readonly value: T | undefined;
|
|
40
|
+
/** May remain pending after a developer override resolves; rejects on failure or cancellation, never conflating these with absence. */
|
|
41
|
+
readonly hasAssignment: Promise<boolean>;
|
|
42
|
+
}
|
|
43
|
+
export declare function resolveTreatmentWithAssignment<T extends string | number | boolean>(override: T | undefined, readAssignment: () => Promise<T | undefined>): Promise<ITreatmentWithAssignment<T>>;
|
|
38
44
|
export declare class WorkbenchAssignmentService extends Disposable implements IAssignmentService {
|
|
39
45
|
private readonly telemetryService;
|
|
40
46
|
private readonly configurationService;
|
|
@@ -60,7 +66,9 @@ export declare class WorkbenchAssignmentService extends Disposable implements IA
|
|
|
60
66
|
readonly onDidRefetchAssignments: Event<void>;
|
|
61
67
|
constructor(telemetryService: ITelemetryService, storageService: IStorageService, configurationService: IConfigurationService, productService: IProductService, environmentService: IWorkbenchEnvironmentService, instantiationService: IInstantiationService, defaultAccountService: IDefaultAccountService, requestService: IRequestService);
|
|
62
68
|
getTreatment<T extends string | number | boolean>(name: string): Promise<T | undefined>;
|
|
69
|
+
getTreatmentWithAssignment<T extends string | number | boolean>(name: string): Promise<ITreatmentWithAssignment<T>>;
|
|
63
70
|
private doGetTreatment;
|
|
71
|
+
private getAssignedTreatment;
|
|
64
72
|
/**
|
|
65
73
|
* Resolves the new TAS assignments API URL from the account entitlements `exp` endpoint,
|
|
66
74
|
* or `undefined` when no account/endpoint is available.
|
|
@@ -22,6 +22,7 @@ import './assignmentFilters.js';
|
|
|
22
22
|
import './assignmentContextFilter.js';
|
|
23
23
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
24
24
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
25
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
25
26
|
|
|
26
27
|
const registry = ( Registry.as(Extensions.Configuration));
|
|
27
28
|
registry.registerConfiguration({
|
|
@@ -29,7 +30,7 @@ registry.registerConfiguration({
|
|
|
29
30
|
"properties": {
|
|
30
31
|
"workbench.enableExperiments": {
|
|
31
32
|
"type": "boolean",
|
|
32
|
-
"description": ( localize(
|
|
33
|
+
"description": ( localize(24252, "Fetches experiments to run from a Microsoft online service.")),
|
|
33
34
|
"default": true,
|
|
34
35
|
"scope": ConfigurationScope.APPLICATION,
|
|
35
36
|
"restricted": true,
|