@codingame/monaco-vscode-timeline-service-override 5.2.0 → 6.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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistory.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistoryFileSystemProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistoryTimeline.js +1 -1
- package/vscode/src/vs/workbench/contrib/timeline/browser/timeline.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/timeline/browser/timelinePane.js +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-timeline-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@6.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './localHistoryCommands.js';
|
|
2
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
2
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
3
3
|
import { LocalHistoryTimeline } from './localHistoryTimeline.js';
|
|
4
4
|
|
|
5
|
-
registerWorkbenchContribution2(LocalHistoryTimeline.ID, LocalHistoryTimeline,
|
|
5
|
+
registerWorkbenchContribution2(LocalHistoryTimeline.ID, LocalHistoryTimeline, WorkbenchPhase.BlockRestore );
|
package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistoryFileSystemProvider.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
2
2
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
|
-
import { FileType, hasReadWriteCapability } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
|
+
import { FileSystemProviderCapabilities, FileType, hasReadWriteCapability } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
5
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
6
6
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
7
7
|
|
|
@@ -30,7 +30,7 @@ class LocalHistoryFileSystemProvider {
|
|
|
30
30
|
associatedResource: LocalHistoryFileSystemProvider.EMPTY_RESOURCE
|
|
31
31
|
}; }
|
|
32
32
|
get capabilities() {
|
|
33
|
-
return
|
|
33
|
+
return FileSystemProviderCapabilities.FileReadWrite | FileSystemProviderCapabilities.Readonly;
|
|
34
34
|
}
|
|
35
35
|
constructor(fileService) {
|
|
36
36
|
this.fileService = fileService;
|
|
@@ -107,7 +107,7 @@ let LocalHistoryTimeline = class LocalHistoryTimeline extends Disposable {
|
|
|
107
107
|
handle: entry.id,
|
|
108
108
|
label: SaveSourceRegistry.getSourceLabel(entry.source),
|
|
109
109
|
tooltip: ( (new MarkdownString(
|
|
110
|
-
`$(history) ${getLocalHistoryDateFormatter().format(entry.timestamp)}\n\n${SaveSourceRegistry.getSourceLabel(entry.source)}`,
|
|
110
|
+
`$(history) ${getLocalHistoryDateFormatter().format(entry.timestamp)}\n\n${SaveSourceRegistry.getSourceLabel(entry.source)}${entry.sourceDescription ? ` (${entry.sourceDescription})` : ``}`,
|
|
111
111
|
{ supportThemeIcons: true }
|
|
112
112
|
))),
|
|
113
113
|
source: this.id,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
3
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
3
4
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
4
5
|
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/views';
|
|
5
6
|
import { VIEW_CONTAINER } from 'vscode/vscode/vs/workbench/contrib/files/browser/explorerViewlet';
|
|
@@ -43,10 +43,12 @@ import { ColorScheme } from 'vscode/vscode/vs/platform/theme/common/theme';
|
|
|
43
43
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
44
44
|
import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
45
45
|
import { API_OPEN_EDITOR_COMMAND_ID, API_OPEN_DIFF_EDITOR_COMMAND_ID } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
46
|
+
import { MarshalledId } from 'vscode/vscode/vs/base/common/marshallingIds';
|
|
46
47
|
import { isString } from 'vscode/vscode/vs/base/common/types';
|
|
47
48
|
import { renderMarkdownAsPlaintext } from 'vscode/vscode/vs/base/browser/markdownRenderer';
|
|
48
49
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
49
50
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
51
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
50
52
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
51
53
|
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
52
54
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
@@ -204,10 +206,10 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
204
206
|
this.commands = this._register(this.instantiationService.createInstance(TimelinePaneCommands, this));
|
|
205
207
|
this.followActiveEditorContext = TimelineFollowActiveEditorContext.bindTo(this.contextKeyService);
|
|
206
208
|
this.timelineExcludeSourcesContext = TimelineExcludeSources.bindTo(this.contextKeyService);
|
|
207
|
-
const excludedSourcesString = storageService.get('timeline.excludeSources',
|
|
209
|
+
const excludedSourcesString = storageService.get('timeline.excludeSources', StorageScope.PROFILE, '[]');
|
|
208
210
|
this.timelineExcludeSourcesContext.set(excludedSourcesString);
|
|
209
211
|
this.excludedSources = ( (new Set(JSON.parse(excludedSourcesString))));
|
|
210
|
-
this._register(storageService.onDidChangeValue(
|
|
212
|
+
this._register(storageService.onDidChangeValue(StorageScope.PROFILE, 'timeline.excludeSources', this._register(( (new DisposableStore()))))(this.onStorageServiceChanged, this));
|
|
211
213
|
this._register(configurationService.onDidChangeConfiguration(this.onConfigurationChanged, this));
|
|
212
214
|
this._register(timelineService.onDidChangeProviders(this.onProvidersChanged, this));
|
|
213
215
|
this._register(timelineService.onDidChangeTimeline(this.onTimelineChanged, this));
|
|
@@ -256,7 +258,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
256
258
|
this.loadTimeline(true);
|
|
257
259
|
}
|
|
258
260
|
onStorageServiceChanged() {
|
|
259
|
-
const excludedSourcesString = this.storageService.get('timeline.excludeSources',
|
|
261
|
+
const excludedSourcesString = this.storageService.get('timeline.excludeSources', StorageScope.PROFILE, '[]');
|
|
260
262
|
this.timelineExcludeSourcesContext.set(excludedSourcesString);
|
|
261
263
|
this.excludedSources = ( (new Set(JSON.parse(excludedSourcesString))));
|
|
262
264
|
const missing = this.timelineService.getSources()
|
|
@@ -311,7 +313,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
311
313
|
}
|
|
312
314
|
}
|
|
313
315
|
onTimelineChanged(e) {
|
|
314
|
-
if (e?.uri === undefined || this.uriIdentityService.extUri.isEqual(e.uri, this.uri)) {
|
|
316
|
+
if (e?.uri === undefined || this.uriIdentityService.extUri.isEqual(URI.revive(e.uri), this.uri)) {
|
|
315
317
|
const timeline = this.timelinesBySource.get(e.id);
|
|
316
318
|
if (timeline === undefined) {
|
|
317
319
|
return;
|
|
@@ -887,7 +889,7 @@ class TimelineActionRunner extends ActionRunner {
|
|
|
887
889
|
return;
|
|
888
890
|
}
|
|
889
891
|
await action.run({
|
|
890
|
-
$mid:
|
|
892
|
+
$mid: MarshalledId.TimelineActionContext,
|
|
891
893
|
handle: item.handle,
|
|
892
894
|
source: item.source,
|
|
893
895
|
uri
|
|
@@ -1057,7 +1059,7 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1057
1059
|
updateTimelineSourceFilters() {
|
|
1058
1060
|
this.sourceDisposables.clear();
|
|
1059
1061
|
const excluded = ( (new Set(
|
|
1060
|
-
JSON.parse(this.storageService.get('timeline.excludeSources',
|
|
1062
|
+
JSON.parse(this.storageService.get('timeline.excludeSources', StorageScope.PROFILE, '[]'))
|
|
1061
1063
|
)));
|
|
1062
1064
|
for (const source of this.timelineService.getSources()) {
|
|
1063
1065
|
this.sourceDisposables.add(registerAction2(class extends Action2 {
|
|
@@ -1083,7 +1085,7 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1083
1085
|
excluded.add(source.id);
|
|
1084
1086
|
}
|
|
1085
1087
|
const storageService = accessor.get(IStorageService);
|
|
1086
|
-
storageService.store('timeline.excludeSources', JSON.stringify([...( (excluded.keys()))]),
|
|
1088
|
+
storageService.store('timeline.excludeSources', JSON.stringify([...( (excluded.keys()))]), StorageScope.PROFILE, StorageTarget.USER);
|
|
1087
1089
|
}
|
|
1088
1090
|
}));
|
|
1089
1091
|
}
|