@codingame/monaco-vscode-user-data-sync-service-override 25.1.2 → 26.0.1
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/package.json +3 -3
- package/vscode/src/vs/platform/userDataSync/common/mcpSync.js +23 -17
- package/vscode/src/vs/platform/userDataSync/common/promptsSync/promptsMerge.js +53 -19
- package/vscode/src/vs/platform/userDataSync/common/promptsSync/promptsSync.js +282 -110
- package/vscode/src/vs/platform/userDataSync/common/userDataAutoSyncService.js +173 -110
- package/vscode/src/vs/platform/userDataSync/common/userDataProfilesManifestMerge.js +53 -18
- package/vscode/src/vs/platform/userDataSync/common/userDataProfilesManifestSync.js +158 -76
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncAccount.js +11 -8
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncEnablementService.js +15 -12
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncLocalStoreService.js +28 -32
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncLog.js +7 -5
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncResourceProvider.js +269 -153
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncService.js +271 -157
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSync.contribution.js +32 -36
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSync.js +590 -493
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView.js +113 -56
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSyncTrigger.js +23 -20
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.js +299 -196
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncEnablementService.js +3 -1
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.js +337 -185
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-user-data-sync-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - user-data-sync service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-user-data-profile-service-override": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-user-data-profile-service-override": "26.0.1"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"module": "index.js",
|
|
@@ -14,34 +14,40 @@ function getMcpContentFromSyncContent(syncContent, logService) {
|
|
|
14
14
|
try {
|
|
15
15
|
const parsed = JSON.parse(syncContent);
|
|
16
16
|
return parsed.mcp ?? null;
|
|
17
|
-
}
|
|
18
|
-
catch (e) {
|
|
17
|
+
} catch (e) {
|
|
19
18
|
logService.error(e);
|
|
20
19
|
return null;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
let McpSynchroniser = class McpSynchroniser extends AbstractJsonSynchronizer {
|
|
24
|
-
constructor(
|
|
25
|
-
|
|
23
|
+
constructor(
|
|
24
|
+
profile,
|
|
25
|
+
collection,
|
|
26
|
+
userDataSyncStoreService,
|
|
27
|
+
userDataSyncLocalStoreService,
|
|
28
|
+
logService,
|
|
29
|
+
configurationService,
|
|
30
|
+
userDataSyncEnablementService,
|
|
31
|
+
fileService,
|
|
32
|
+
environmentService,
|
|
33
|
+
storageService,
|
|
34
|
+
telemetryService,
|
|
35
|
+
uriIdentityService
|
|
36
|
+
) {
|
|
37
|
+
super(profile.mcpResource, {
|
|
38
|
+
syncResource: SyncResource.Mcp,
|
|
39
|
+
profile
|
|
40
|
+
}, collection, "mcp.json", fileService, environmentService, storageService, userDataSyncStoreService, userDataSyncLocalStoreService, userDataSyncEnablementService, telemetryService, logService, configurationService, uriIdentityService);
|
|
26
41
|
}
|
|
27
42
|
getContentFromSyncContent(syncContent) {
|
|
28
43
|
return getMcpContentFromSyncContent(syncContent, this.logService);
|
|
29
44
|
}
|
|
30
45
|
toSyncContent(mcp) {
|
|
31
|
-
return mcp ? {
|
|
46
|
+
return mcp ? {
|
|
47
|
+
mcp
|
|
48
|
+
} : {};
|
|
32
49
|
}
|
|
33
50
|
};
|
|
34
|
-
McpSynchroniser = ( __decorate([
|
|
35
|
-
( __param(2, IUserDataSyncStoreService)),
|
|
36
|
-
( __param(3, IUserDataSyncLocalStoreService)),
|
|
37
|
-
( __param(4, IUserDataSyncLogService)),
|
|
38
|
-
( __param(5, IConfigurationService)),
|
|
39
|
-
( __param(6, IUserDataSyncEnablementService)),
|
|
40
|
-
( __param(7, IFileService)),
|
|
41
|
-
( __param(8, IEnvironmentService)),
|
|
42
|
-
( __param(9, IStorageService)),
|
|
43
|
-
( __param(10, ITelemetryService)),
|
|
44
|
-
( __param(11, IUriIdentityService))
|
|
45
|
-
], McpSynchroniser));
|
|
51
|
+
McpSynchroniser = ( __decorate([( __param(2, IUserDataSyncStoreService)), ( __param(3, IUserDataSyncLocalStoreService)), ( __param(4, IUserDataSyncLogService)), ( __param(5, IConfigurationService)), ( __param(6, IUserDataSyncEnablementService)), ( __param(7, IFileService)), ( __param(8, IEnvironmentService)), ( __param(9, IStorageService)), ( __param(10, ITelemetryService)), ( __param(11, IUriIdentityService))], McpSynchroniser));
|
|
46
52
|
|
|
47
53
|
export { McpSynchroniser, getMcpContentFromSyncContent };
|
|
@@ -6,16 +6,32 @@ function merge(local, remote, base) {
|
|
|
6
6
|
const localRemoved = ( new Set());
|
|
7
7
|
if (!remote) {
|
|
8
8
|
return {
|
|
9
|
-
local: {
|
|
10
|
-
|
|
9
|
+
local: {
|
|
10
|
+
added: localAdded,
|
|
11
|
+
updated: localUpdated,
|
|
12
|
+
removed: [...( localRemoved.values())]
|
|
13
|
+
},
|
|
14
|
+
remote: {
|
|
15
|
+
added: local,
|
|
16
|
+
updated: {},
|
|
17
|
+
removed: []
|
|
18
|
+
},
|
|
11
19
|
conflicts: []
|
|
12
20
|
};
|
|
13
21
|
}
|
|
14
22
|
const localToRemote = compare(local, remote);
|
|
15
23
|
if (localToRemote.added.size === 0 && localToRemote.removed.size === 0 && localToRemote.updated.size === 0) {
|
|
16
24
|
return {
|
|
17
|
-
local: {
|
|
18
|
-
|
|
25
|
+
local: {
|
|
26
|
+
added: localAdded,
|
|
27
|
+
updated: localUpdated,
|
|
28
|
+
removed: [...( localRemoved.values())]
|
|
29
|
+
},
|
|
30
|
+
remote: {
|
|
31
|
+
added: {},
|
|
32
|
+
updated: {},
|
|
33
|
+
removed: []
|
|
34
|
+
},
|
|
19
35
|
conflicts: []
|
|
20
36
|
};
|
|
21
37
|
}
|
|
@@ -52,8 +68,7 @@ function merge(local, remote, base) {
|
|
|
52
68
|
if (( localToRemote.updated.has(key))) {
|
|
53
69
|
conflicts.add(key);
|
|
54
70
|
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
71
|
+
} else {
|
|
57
72
|
remoteUpdated[key] = local[key];
|
|
58
73
|
}
|
|
59
74
|
}
|
|
@@ -65,8 +80,7 @@ function merge(local, remote, base) {
|
|
|
65
80
|
if (( localToRemote.updated.has(key))) {
|
|
66
81
|
conflicts.add(key);
|
|
67
82
|
}
|
|
68
|
-
}
|
|
69
|
-
else if (local[key] !== undefined) {
|
|
83
|
+
} else if (local[key] !== undefined) {
|
|
70
84
|
localUpdated[key] = remote[key];
|
|
71
85
|
}
|
|
72
86
|
}
|
|
@@ -78,8 +92,7 @@ function merge(local, remote, base) {
|
|
|
78
92
|
if (( localToRemote.updated.has(key))) {
|
|
79
93
|
conflicts.add(key);
|
|
80
94
|
}
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
95
|
+
} else {
|
|
83
96
|
remoteAdded[key] = local[key];
|
|
84
97
|
}
|
|
85
98
|
}
|
|
@@ -91,22 +104,35 @@ function merge(local, remote, base) {
|
|
|
91
104
|
if (( localToRemote.updated.has(key))) {
|
|
92
105
|
conflicts.add(key);
|
|
93
106
|
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
107
|
+
} else {
|
|
96
108
|
localAdded[key] = remote[key];
|
|
97
109
|
}
|
|
98
110
|
}
|
|
99
111
|
return {
|
|
100
|
-
local: {
|
|
101
|
-
|
|
102
|
-
|
|
112
|
+
local: {
|
|
113
|
+
added: localAdded,
|
|
114
|
+
removed: [...( localRemoved.values())],
|
|
115
|
+
updated: localUpdated
|
|
116
|
+
},
|
|
117
|
+
remote: {
|
|
118
|
+
added: remoteAdded,
|
|
119
|
+
removed: [...( remoteRemoved.values())],
|
|
120
|
+
updated: remoteUpdated
|
|
121
|
+
},
|
|
122
|
+
conflicts: [...( conflicts.values())]
|
|
103
123
|
};
|
|
104
124
|
}
|
|
105
125
|
function compare(from, to) {
|
|
106
126
|
const fromKeys = from ? ( Object.keys(from)) : [];
|
|
107
127
|
const toKeys = to ? ( Object.keys(to)) : [];
|
|
108
|
-
const added = toKeys.filter(key => !fromKeys.includes(key)).reduce((r, key) => {
|
|
109
|
-
|
|
128
|
+
const added = toKeys.filter(key => !fromKeys.includes(key)).reduce((r, key) => {
|
|
129
|
+
r.add(key);
|
|
130
|
+
return r;
|
|
131
|
+
}, ( new Set()));
|
|
132
|
+
const removed = fromKeys.filter(key => !toKeys.includes(key)).reduce((r, key) => {
|
|
133
|
+
r.add(key);
|
|
134
|
+
return r;
|
|
135
|
+
}, ( new Set()));
|
|
110
136
|
const updated = ( new Set());
|
|
111
137
|
for (const key of fromKeys) {
|
|
112
138
|
if (( removed.has(key))) {
|
|
@@ -118,10 +144,18 @@ function compare(from, to) {
|
|
|
118
144
|
updated.add(key);
|
|
119
145
|
}
|
|
120
146
|
}
|
|
121
|
-
return {
|
|
147
|
+
return {
|
|
148
|
+
added,
|
|
149
|
+
removed,
|
|
150
|
+
updated
|
|
151
|
+
};
|
|
122
152
|
}
|
|
123
153
|
function areSame(a, b) {
|
|
124
|
-
const {
|
|
154
|
+
const {
|
|
155
|
+
added,
|
|
156
|
+
removed,
|
|
157
|
+
updated
|
|
158
|
+
} = compare(a, b);
|
|
125
159
|
return added.size === 0 && removed.size === 0 && updated.size === 0;
|
|
126
160
|
}
|
|
127
161
|
|