@@ -10,7 +10,7 @@ import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle
10
10
import { Action2 , MenuId , registerAction2 } from 'vs/platform/actions/common/actions' ;
11
11
import { ServicesAccessor } from 'vs/editor/browser/editorExtensions' ;
12
12
import { localize } from 'vs/nls' ;
13
- import { ISessionSyncWorkbenchService , Change , ChangeType , Folder , EditSession , FileType , EDIT_SESSION_SYNC_TITLE , EditSessionSchemaVersion } from 'vs/workbench/services/sessionSync/common/sessionSync' ;
13
+ import { ISessionSyncWorkbenchService , Change , ChangeType , Folder , EditSession , FileType , EDIT_SESSION_SYNC_CATEGORY , EditSessionSchemaVersion } from 'vs/workbench/services/sessionSync/common/sessionSync' ;
14
14
import { ISCMRepository , ISCMService } from 'vs/workbench/contrib/scm/common/scm' ;
15
15
import { IFileService } from 'vs/platform/files/common/files' ;
16
16
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
@@ -44,19 +44,21 @@ registerSingleton(ISessionSyncWorkbenchService, SessionSyncWorkbenchService);
44
44
45
45
const resumeLatestCommand = {
46
46
id : 'workbench.experimental.editSessions.actions.resumeLatest' ,
47
- title : { value : localize ( 'resume latest' , "{0}: Resume Latest Edit Session" , EDIT_SESSION_SYNC_TITLE ) , original : 'Edit Sessions' } ,
47
+ title : { value : localize ( 'resume latest' , "Resume Latest Edit Session" ) , original : 'Resume Latest Edit Session' } ,
48
+ category : EDIT_SESSION_SYNC_CATEGORY ,
48
49
} ;
49
50
const storeCurrentCommand = {
50
51
id : 'workbench.experimental.editSessions.actions.storeCurrent' ,
51
- title : { value : localize ( 'store current' , "{0}: Store Current Edit Session" , EDIT_SESSION_SYNC_TITLE ) , original : 'Edit Sessions' } ,
52
+ title : { value : localize ( 'store current' , "Store Current Edit Session" ) , original : 'Store Current Edit Session' } ,
53
+ category : EDIT_SESSION_SYNC_CATEGORY ,
52
54
} ;
53
55
const continueEditSessionCommand = {
54
56
id : '_workbench.experimental.editSessions.actions.continueEditSession' ,
55
57
title : { value : localize ( 'continue edit session' , "Continue Edit Session..." ) , original : 'Continue Edit Session...' } ,
56
58
} ;
57
59
const openLocalFolderCommand = {
58
60
id : '_workbench.experimental.editSessions.actions.continueEditSession.openLocalFolder' ,
59
- title : localize ( 'continue edit session in local folder' , "Open In Local Folder" ) ,
61
+ title : { value : localize ( 'continue edit session in local folder' , "Open In Local Folder" ) , original : 'Open In Local Folder' } ,
60
62
} ;
61
63
const queryParamName = 'editSessionId' ;
62
64
@@ -146,8 +148,7 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon
146
148
this . _register ( registerAction2 ( class ContinueEditSessionAction extends Action2 {
147
149
constructor ( ) {
148
150
super ( {
149
- id : continueEditSessionCommand . id ,
150
- title : continueEditSessionCommand . title ,
151
+ ...continueEditSessionCommand ,
151
152
f1 : true
152
153
} ) ;
153
154
}
@@ -181,8 +182,7 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon
181
182
this . _register ( registerAction2 ( class ApplyLatestEditSessionAction extends Action2 {
182
183
constructor ( ) {
183
184
super ( {
184
- id : resumeLatestCommand . id ,
185
- title : resumeLatestCommand . title ,
185
+ ...resumeLatestCommand ,
186
186
menu : {
187
187
id : MenuId . CommandPalette ,
188
188
}
@@ -203,8 +203,7 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon
203
203
this . _register ( registerAction2 ( class StoreLatestEditSessionAction extends Action2 {
204
204
constructor ( ) {
205
205
super ( {
206
- id : storeCurrentCommand . id ,
207
- title : storeCurrentCommand . title ,
206
+ ...storeCurrentCommand ,
208
207
menu : {
209
208
id : MenuId . CommandPalette ,
210
209
}
@@ -275,7 +274,7 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon
275
274
const result = await this . dialogService . confirm ( {
276
275
message : localize ( 'apply edit session warning' , 'Applying your edit session may overwrite your existing uncommitted changes. Do you want to proceed?' ) ,
277
276
type : 'warning' ,
278
- title : EDIT_SESSION_SYNC_TITLE
277
+ title : EDIT_SESSION_SYNC_CATEGORY . value
279
278
} ) ;
280
279
if ( ! result . confirmed ) {
281
280
return ;
@@ -399,8 +398,7 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon
399
398
this . _register ( registerAction2 ( class ContinueInLocalFolderAction extends Action2 {
400
399
constructor ( ) {
401
400
super ( {
402
- id : openLocalFolderCommand . id ,
403
- title : openLocalFolderCommand . title ,
401
+ ...openLocalFolderCommand ,
404
402
precondition : IsWebContext
405
403
} ) ;
406
404
}
0 commit comments