Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/contrib/changes/common/changes.ts
13401 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
7
8
export const CHANGES_VIEW_ID = 'workbench.view.agentSessions.changes';
9
export const CHANGES_VIEW_CONTAINER_ID = 'workbench.view.agentSessions.changesContainer';
10
11
export const enum ChangesViewMode {
12
List = 'list',
13
Tree = 'tree'
14
}
15
16
export const enum ChangesVersionMode {
17
BranchChanges = 'branchChanges',
18
UncommittedChanges = 'uncommittedChanges',
19
OutgoingChanges = 'outgoingChanges',
20
AllChanges = 'allChanges',
21
LastTurn = 'lastTurn'
22
}
23
24
export const enum IsolationMode {
25
Workspace = 'workspace',
26
Worktree = 'worktree'
27
}
28
29
export const ChangesContextKeys = {
30
ChangeKind: new RawContextKey<'root' | 'folder' | 'file'>('sessions.changeKind', 'file'),
31
VersionMode: new RawContextKey<ChangesVersionMode>('sessions.changesVersionMode', ChangesVersionMode.BranchChanges),
32
ViewMode: new RawContextKey<ChangesViewMode>('sessions.changesViewMode', ChangesViewMode.List)
33
};
34
35
export const ActiveSessionContextKeys = {
36
IsolationMode: new RawContextKey<IsolationMode>('sessions.isolationMode', IsolationMode.Workspace),
37
HasChanges: new RawContextKey<boolean>('sessions.hasChanges', false),
38
HasGitRepository: new RawContextKey<boolean>('sessions.hasGitRepository', true),
39
HasUpstream: new RawContextKey<boolean>('sessions.hasUpstream', false),
40
HasIncomingChanges: new RawContextKey<boolean>('sessions.hasIncomingChanges', false),
41
HasOutgoingChanges: new RawContextKey<boolean>('sessions.hasOutgoingChanges', false),
42
HasUncommittedChanges: new RawContextKey<boolean>('sessions.hasUncommittedChanges', true),
43
IsMergeBaseBranchProtected: new RawContextKey<boolean>('sessions.isMergeBaseBranchProtected', false),
44
HasGitHubRemote: new RawContextKey<boolean>('sessions.hasGitHubRemote', false),
45
HasPullRequest: new RawContextKey<boolean>('sessions.hasPullRequest', false),
46
HasOpenPullRequest: new RawContextKey<boolean>('sessions.hasOpenPullRequest', false),
47
};
48
49