@codingame/monaco-vscode-scm-service-override 13.1.7 → 14.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 -4
- package/package.json +12 -12
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +4 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/media/dirtydiffDecorator.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +12 -11
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +283 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.d.ts +74 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js +365 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +809 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +92 -91
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +138 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +122 -71
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +96 -45
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +7 -5
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +23 -7
- package/vscode/src/vs/workbench/contrib/scm/browser/diff.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/scm/browser/diff.js +0 -93
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.js +0 -78
package/index.js
CHANGED
|
@@ -4,18 +4,18 @@ import { ISCMViewService, ISCMService } from '@codingame/monaco-vscode-api/vscod
|
|
|
4
4
|
import { SCMService } from './vscode/src/vs/workbench/contrib/scm/common/scmService.js';
|
|
5
5
|
import { SCMViewService } from './vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js';
|
|
6
6
|
import { IQuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service';
|
|
7
|
-
import { QuickDiffService } from '
|
|
7
|
+
import { QuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiffService';
|
|
8
8
|
import './vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js';
|
|
9
9
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { IQuickDiffModelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service';
|
|
11
|
+
import { QuickDiffModelService } from './vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js';
|
|
12
12
|
|
|
13
13
|
function getServiceOverride() {
|
|
14
14
|
return {
|
|
15
15
|
[ISCMService.toString()]: new SyncDescriptor(SCMService, [], true),
|
|
16
16
|
[ISCMViewService.toString()]: new SyncDescriptor(SCMViewService, [], true),
|
|
17
17
|
[IQuickDiffService.toString()]: new SyncDescriptor(QuickDiffService, [], true),
|
|
18
|
-
[
|
|
18
|
+
[IQuickDiffModelService.toString()]: new SyncDescriptor(QuickDiffModelService, [], true)
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-scm-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - scm service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-27663a0b-1249-58ba-9085-e52d706b50bc-common": "
|
|
19
|
-
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-
|
|
26
|
-
"@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common": "
|
|
27
|
-
"@codingame/monaco-vscode-f99b74f5-fcb7-512f-8c6c-35f5a107577d-common": "
|
|
28
|
-
"@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common": "
|
|
18
|
+
"@codingame/monaco-vscode-27663a0b-1249-58ba-9085-e52d706b50bc-common": "14.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "14.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common": "14.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-a17f5129-e16c-5dac-857e-dcd91bfeffa2-common": "14.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-api": "14.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common": "14.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common": "14.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common": "14.0.0",
|
|
27
|
+
"@codingame/monaco-vscode-f99b74f5-fcb7-512f-8c6c-35f5a107577d-common": "14.0.0",
|
|
28
|
+
"@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common": "14.0.0"
|
|
29
29
|
},
|
|
30
30
|
"main": "index.js",
|
|
31
31
|
"module": "index.js",
|
|
@@ -103,7 +103,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
103
103
|
if (count === 0) {
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
const badge = ( new NumberBadge(count, num => ( localize(
|
|
106
|
+
const badge = ( new NumberBadge(count, num => ( localize(8583, '{0} pending changes', num))));
|
|
107
107
|
store.add(this.activityService.showViewActivity(VIEW_PANE_ID, { badge }));
|
|
108
108
|
}
|
|
109
109
|
_updateStatusBar(repository, commands, store) {
|
|
@@ -129,7 +129,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
129
129
|
repoAgnosticActionName = '';
|
|
130
130
|
}
|
|
131
131
|
const statusbarEntry = {
|
|
132
|
-
name: ( localize(
|
|
132
|
+
name: ( localize(8584, "Source Control")) + (repoAgnosticActionName ? ` ${repoAgnosticActionName}` : ''),
|
|
133
133
|
text: command.title,
|
|
134
134
|
ariaLabel: tooltip,
|
|
135
135
|
tooltip,
|
|
@@ -161,8 +161,8 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
|
|
|
161
161
|
this.uriIdentityService = uriIdentityService;
|
|
162
162
|
this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
|
|
163
163
|
this._onDidRepositoryChange = ( new Emitter());
|
|
164
|
-
const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(
|
|
165
|
-
const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(
|
|
164
|
+
const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(8585, "Whether the active resource has changes"))));
|
|
165
|
+
const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(8586, "The active resource's repository"))));
|
|
166
166
|
this._store.add(autorunWithStore((reader, store) => {
|
|
167
167
|
for (const repository of this._repositories.read(reader)) {
|
|
168
168
|
store.add(Event.runAndSubscribe(repository.provider.onDidChangeResources, () => {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import n from '@codingame/monaco-vscode-api/external/rollup-plugin-styles/dist/runtime/inject-css';
|
|
2
|
+
|
|
3
|
+
var css = ".monaco-editor .dirty-diff-glyph{margin-left:5px;z-index:5}.monaco-editor .dirty-diff-glyph:before{content:\"\";height:100%;left:-2px;position:absolute;width:0}.monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-glyph:before{transition:width 80ms linear,left 80ms linear,transform 80ms linear}.monaco-editor.modified-in-monaco-diff-editor .margin-view-overlays>div>.dirty-diff-glyph{display:none}.monaco-editor .dirty-diff-added{border-left-color:var(--vscode-editorGutter-addedBackground);border-left-style:solid}.monaco-editor .dirty-diff-added:before{background:var(--vscode-editorGutter-addedBackground)}.monaco-editor .dirty-diff-added-pattern{background-repeat:repeat-y}.monaco-editor .dirty-diff-added-pattern,.monaco-editor .dirty-diff-added-pattern:before{background-image:linear-gradient(-45deg,var(--vscode-editorGutter-addedBackground) 25%,var(--vscode-editorGutter-background) 25%,var(--vscode-editorGutter-background) 50%,var(--vscode-editorGutter-addedBackground) 50%,var(--vscode-editorGutter-addedBackground) 75%,var(--vscode-editorGutter-background) 75%,var(--vscode-editorGutter-background))}.monaco-editor .dirty-diff-added-pattern:before{transform:translateX(3px)}.monaco-editor .dirty-diff-modified{border-left-color:var(--vscode-editorGutter-modifiedBackground);border-left-style:solid}.monaco-editor .dirty-diff-modified:before{background:var(--vscode-editorGutter-modifiedBackground)}.monaco-editor .dirty-diff-modified-pattern{background-image:linear-gradient(-45deg,var(--vscode-editorGutter-modifiedBackground) 25%,var(--vscode-editorGutter-background) 25%,var(--vscode-editorGutter-background) 50%,var(--vscode-editorGutter-modifiedBackground) 50%,var(--vscode-editorGutter-modifiedBackground) 75%,var(--vscode-editorGutter-background) 75%,var(--vscode-editorGutter-background));background-repeat:repeat-y}.monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-added,.monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-added-pattern,.monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-modified,.monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-modified-pattern{transition:opacity .5s}.monaco-editor .dirty-diff-modified-pattern:before{background-image:linear-gradient(-45deg,var(--vscode-editorGutter-modifiedBackground) 25%,var(--vscode-editorGutter-background) 25%,var(--vscode-editorGutter-background) 50%,var(--vscode-editorGutter-modifiedBackground) 50%,var(--vscode-editorGutter-modifiedBackground) 75%,var(--vscode-editorGutter-background) 75%,var(--vscode-editorGutter-background));transform:translateX(3px)}.monaco-editor .margin:hover .dirty-diff-added,.monaco-editor .margin:hover .dirty-diff-added-pattern,.monaco-editor .margin:hover .dirty-diff-modified,.monaco-editor .margin:hover .dirty-diff-modified-pattern{opacity:1}.monaco-editor .dirty-diff-deleted:after{border-bottom:4px solid transparent;border-left:4px solid var(--vscode-editorGutter-deletedBackground);border-top:4px solid transparent;bottom:-4px;box-sizing:border-box;content:\"\";height:0;pointer-events:none;position:absolute;width:4px;z-index:9}.monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-deleted:after{transition:border-top-width 80ms linear,border-bottom-width 80ms linear,bottom 80ms linear,opacity .5s}.monaco-editor .dirty-diff-deleted:before{background:var(--vscode-editorGutter-deletedBackground);bottom:0;height:0;margin-left:3px}.monaco-workbench:not(.reduce-motion) .monaco-editor .dirty-diff-deleted:before{transition:height 80ms linear}.dirty-diff .peekview-title .dropdown{margin-right:10px}.dirty-diff .peekview-title .dropdown.select-container{cursor:default}.dirty-diff .peekview-title .dropdown .monaco-select-box{cursor:pointer;min-height:18px;min-width:100px;padding:0 23px 0 8px}";
|
|
4
|
+
n(css,{});
|
|
5
|
+
|
|
6
|
+
export { css, css as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import n from '@codingame/monaco-vscode-api/external/rollup-plugin-styles/dist/runtime/inject-css';
|
|
2
2
|
|
|
3
|
-
var css = ".scm-view{height:100%;position:relative}.scm-overflow-widgets-container{height:0;left:0;overflow:visible;position:absolute;top:0;width:0;z-index:5000}.scm-view .monaco-tl-contents>div{overflow:hidden;padding-right:12px}.scm-view .count{display:flex;margin-left:6px}.scm-view .count.hidden{display:none}.scm-view .scm-provider{align-items:center;display:flex;flex-direction:column;flex-flow:nowrap;height:100%}.scm-view.auto-provider-counts .scm-provider>.count[data-count=\"0\"],.scm-view.hide-provider-counts .scm-provider>.count{display:none}.scm-view .scm-provider>.label{flex:1;min-width:50px;overflow:hidden;text-overflow:ellipsis}.scm-view .scm-provider>.label>.name{font-weight:700}.scm-view .scm-provider>.label>.description{font-size:.9em;margin-left:.5em;opacity:.7}.scm-view .scm-provider>.actions{justify-content:flex-end;overflow:hidden}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item{align-items:center;display:flex;padding-left:4px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:first-child{min-width:20px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label,.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.monaco-dropdown>.dropdown-label>.action-label{align-items:center;display:flex;line-height:16px;overflow:hidden}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label>.codicon{font-size:12px;justify-content:center}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:last-of-type{padding-right:0}.scm-view .scm-provider>.body{flex-grow:1}.scm-view .scm-provider>.status>.monaco-action-bar>.actions-container{border-color:var(--vscode-sideBar-border)}.scm-view .monaco-list-row{line-height:22px}.scm-view .monaco-list-row .monaco-icon-label-container{height:22px}.scm-view .monaco-list-row .history,.scm-view .monaco-list-row .history-item-group,.scm-view .monaco-list-row .resource-group{align-items:center;display:flex;height:100%}.scm-view .monaco-list-row .history-item .monaco-icon-label,.scm-view .monaco-list-row .history-item-group .monaco-icon-label{align-items:center;flex-grow:1}.scm-view .monaco-list-row .history-item{align-items:center;display:flex}.scm-view .monaco-list-row .history-item>.graph-container{display:flex;flex-shrink:0;height:22px}.scm-view .monaco-list-row .history-item>.graph-container.current>.graph>circle:last-child{fill:var(--vscode-sideBar-background)}.scm-view .monaco-list-row:hover .history-item>.graph-container.current>.graph>circle:last-child{fill:var(--vscode-list-hoverBackground)}.scm-view .monaco-list-row .history-item>.graph-container>.graph>circle{stroke:var(--vscode-sideBar-background)}.scm-view .monaco-list-row:hover .history-item>.graph-container>.graph>circle{stroke:var(--vscode-list-hoverBackground)}.scm-view .monaco-list-row .history-item>.label-container{display:flex;flex-shrink:0;gap:4px}.scm-view .monaco-list-row .history-item>.label-container>.label{align-items:center;border-radius:10px;display:flex;line-height:18px}.scm-view .monaco-list-row .history-item>.label-container>.label>.count{font-size:12px;margin-left:0;padding-left:4px}.scm-view .monaco-list-row .history-item>.label-container>.label>.codicon{color:inherit!important;font-size:14px;padding:2px}.scm-view .monaco-list-row .history-item>.label-container>.label>.codicon.codicon-git-branch{font-size:12px;padding:3px}.scm-view .monaco-list-row .history-item>.label-container>.label>.description{font-size:12px;max-width:100px;overflow:hidden;padding-right:4px;text-overflow:ellipsis}.scm-view .monaco-list-row .history-item .monaco-icon-label .icon-container{display:flex;padding-right:4px}.scm-view .monaco-list-row .history-item .monaco-icon-label .avatar{border-radius:14px;height:14px;width:14px}.scm-view .monaco-list-row .history-item .monaco-icon-label.history-item-current .label-name{font-weight:600}.scm-view .monaco-list-row .history-item .monaco-icon-label.history-item-current .label-description{font-weight:500}.scm-view .monaco-list-row .history>.name,.scm-view .monaco-list-row .resource-group>.name{flex:1;overflow:hidden;text-overflow:ellipsis}.scm-view .monaco-list-row .resource{display:flex;height:100%}.scm-view .monaco-list-row .resource.faded{opacity:.7}.scm-view .monaco-list-row .resource>.name{flex:1;overflow:hidden}.scm-view .monaco-list-row .resource>.name>.monaco-icon-label:after{margin-right:3px}.scm-view .monaco-list-row .resource>.decoration-icon{background-position:50% 50%;background-repeat:no-repeat;height:100%;margin-left:5px;width:16px}.scm-view .monaco-list-row .resource>.decoration-icon.codicon{margin-right:0;margin-top:3px}.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions{flex-grow:100}.scm-view .monaco-list .monaco-list-row .history-item>.actions,.scm-view .monaco-list .monaco-list-row .resource-group>.actions,.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions{display:none;max-width:fit-content}.scm-view .monaco-list .monaco-list-row.focused .history-item>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource-group>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource-group>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list:not(.selection-multiple) .monaco-list-row .resource:hover>.actions{display:block}.scm-view .monaco-list .monaco-list-row.focused.force-no-hover,.scm-view .monaco-list .monaco-list-row.force-no-hover,.scm-view .monaco-list .monaco-list-row.selected.force-no-hover,.scm-view .monaco-list .monaco-list-row:hover.force-no-hover{background:transparent!important}.scm-view .monaco-list .monaco-list-row.cursor-default{cursor:default}.scm-view.show-actions .scm-provider>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .history-item>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource-group>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .scm-input>.scm-editor>.actions{display:block}.scm-view .monaco-list-row .actions .action-label{padding:2px}.scm-view .scm-input{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .scm-input .scm-editor .scm-editor-toolbar{padding:1px 3px 1px 1px}.scm-view .scm-input .scm-editor .scm-editor-toolbar.hidden{display:none}.scm-view .scm-input .scm-editor .scm-editor-toolbar.scroll-decoration{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.scm-view .scm-input .scm-editor .scm-editor-toolbar .action-label.codicon.codicon-debug-stop{color:var(--vscode-icon-foreground)!important}.scm-view .scm-editor-container .monaco-editor{border-radius:2px}.scm-view .scm-editor{align-items:flex-start;background-color:var(--vscode-input-background);border:1px solid var(--vscode-input-border,transparent);border-radius:2px;box-sizing:border-box;display:flex;width:100%}.scm-view .button-container{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .button-container .codicon.codicon-cloud-upload,.scm-view .button-container .codicon.codicon-sync{margin:0 4px 0 0}.scm-view .button-container .codicon.codicon-arrow-down,.scm-view .button-container .codicon.codicon-arrow-up{font-size:small!important;margin:0 4px 0 0}.scm-view .button-container>.monaco-button-dropdown{flex-grow:1;overflow:hidden}.scm-view .button-container>.monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button{min-width:0}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button>span:not(.codicon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scm-view .scm-editor.hidden{display:none}.monaco-workbench .part.panel .scm-view .scm-editor-container{outline:1px solid var(--vscode-panelInput-border)}.monaco-workbench .part.panel .scm-view .scm-editor.synthetic-focus,.scm-view .scm-editor.synthetic-focus{outline:1px solid var(--vscode-focusBorder);outline-offset:-1px}.scm-view .scm-editor.validation-info{outline:1px solid var(--vscode-inputValidation-infoBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-warning{outline:1px solid var(--vscode-inputValidation-warningBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-error{outline:1px solid var(--vscode-inputValidation-errorBorder)!important;outline-offset:-1px}.scm-editor-validation-container{border-bottom-left-radius:2px;border-bottom-right-radius:2px;border-style:solid;border-width:1px;border-top:none;box-sizing:border-box;display:flex;padding:2px}.scm-editor-validation-container.validation-info{background-color:var(--vscode-inputValidation-infoBackground);border-color:var(--vscode-inputValidation-infoBorder);color:var(--vscode-inputValidation-infoForeground)}.scm-editor-validation-container.validation-warning{background-color:var(--vscode-inputValidation-warningBackground);border-color:var(--vscode-inputValidation-warningBorder);color:var(--vscode-inputValidation-warningForeground)}.scm-editor-validation-container.validation-error{background-color:var(--vscode-inputValidation-errorBackground);border-color:var(--vscode-inputValidation-errorBorder);color:var(--vscode-inputValidation-errorForeground)}.scm-editor-validation{border-style:none;box-sizing:border-box;display:block;flex:auto;font-size:.9em;padding:1px 3px}.scm-editor-validation p{margin:0;padding:0}.scm-editor-validation a{color:var(--vscode-textLink-foreground);-webkit-user-select:none;user-select:none}.scm-editor-validation a:active,.scm-editor-validation a:hover{color:var(--vscode-textLink-activeForeground)}.scm-editor-validation-actions{align-self:start;margin-top:1px}.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .margin,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .monaco-editor-background,.scm-view .scm-editor-container .monaco-editor,.scm-view .scm-editor-container .monaco-editor .margin,.scm-view .scm-editor-container .monaco-editor-background{background-color:var(--vscode-input-background);color:inherit}.scm-view .scm-editor-container .mtk1{color:var(--vscode-input-foreground)}.scm-view .scm-editor-container .placeholder-text.mtk1{color:var(--vscode-input-placeholderForeground)}.scm-repositories-view .scm-provider{margin:0 12px 0 20px;overflow:hidden}.scm-repositories-view .scm-provider>.label>.name{font-weight:400}.monaco-hover.history-item-hover p:first-child{margin-top:4px}.monaco-hover.history-item-hover p:last-child{margin-bottom:0}.monaco-hover.history-item-hover p:last-child span:not(.codicon){margin-bottom:2px!important}.monaco-hover.history-item-hover hr{margin-bottom:4px;margin-top:4px}.monaco-hover.history-item-hover hr+p{margin:4px 0}.monaco-hover.history-item-hover span:not(.codicon){margin-bottom:0!important}.monaco-hover.history-item-hover p>span>span.codicon.codicon-git-branch{font-size:12px;margin-bottom:2px!important}.monaco-hover.history-item-hover p>span>span.codicon.codicon-tag,.monaco-hover.history-item-hover p>span>span.codicon.codicon-target{font-size:14px;margin-bottom:2px!important}.monaco-hover.history-item-hover p>span>span.codicon.codicon-cloud{font-size:14px;margin-bottom:1px!important}.monaco-hover.history-item-hover .hover-row.status-bar .action{align-items:center;display:flex}.monaco-hover.history-item-hover .hover-row.status-bar .action .codicon{color:inherit;font-size:12px}.pane-header .scm-graph-view-badge-container{align-items:center;display:flex;min-width:fit-content}.pane-header .scm-graph-view-badge-container>.scm-graph-view-badge.monaco-count-badge.long{background-color:var(--vscode-badge-background);border:1px solid var(--vscode-contrastBorder);color:var(--vscode-badge-foreground);margin:0 6px;padding:2px 4px}.monaco-workbench .part.auxiliarybar>.title>.title-actions .action-label.scm-graph-history-item-picker,.monaco-workbench .part.auxiliarybar>.title>.title-actions .action-label.scm-graph-repository-picker,.monaco-workbench .part.panel>.title>.title-actions .action-label.scm-graph-history-item-picker,.monaco-workbench .part.panel>.title>.title-actions .action-label.scm-graph-repository-picker{display:flex}.monaco-toolbar .action-item>.action-label.scm-graph-history-item-picker,.monaco-toolbar .action-item>.action-label.scm-graph-repository-picker{align-items:center;color:var(--vscode-icon-foreground);font-weight:400;line-height:16px}.monaco-toolbar .action-item.disabled>.action-label.scm-graph-history-item-picker,.monaco-toolbar .action-item.disabled>.action-label.scm-graph-repository-picker{color:var(--vscode-disabledForeground)}.monaco-toolbar .action-label.scm-graph-history-item-picker .codicon,.monaco-toolbar .action-label.scm-graph-repository-picker .codicon{color:inherit;font-size:14px}.monaco-toolbar .action-label.scm-graph-history-item-picker>.name,.monaco-toolbar .action-label.scm-graph-repository-picker>.name{max-width:100px;overflow:hidden;text-overflow:ellipsis}.scm-history-view .scm-provider .label-name{font-weight:700}.scm-history-view .scm-provider .monaco-icon-label{align-items:center}.scm-history-view .scm-provider .state-label.monaco-count-badge.long{background:var(--vscode-debugView-stateLabelBackground);border-radius:2px;color:var(--vscode-debugView-stateLabelForeground);display:flex;font-size:.8em;margin:0 10px}.scm-history-view .scm-provider .actions{display:flex;flex-grow:1}.scm-history-view .history-item-load-more{display:flex;height:22px}.scm-history-view .history-item-load-more .graph-placeholder{mask-image:linear-gradient(#000,transparent)}.scm-history-view .history-item-load-more .history-item-placeholder{flex-grow:1}.scm-history-view .history-item-load-more .history-item-placeholder .monaco-highlighted-label{align-items:center;color:var(--vscode-textLink-foreground);display:flex;justify-content:center}.scm-history-view .history-item-load-more .history-item-placeholder .monaco-highlighted-label .codicon{color:var(--vscode-textLink-foreground);font-size:12px}.scm-history-view .history-item-load-more .history-item-placeholder.shimmer{padding:2px 0}.scm-history-view .history-item-load-more .history-item-placeholder.shimmer .monaco-icon-label-container{background:var(--vscode-scmGraph-historyItemHoverDefaultLabelBackground);border-radius:2px;height:18px;opacity:.5}";
|
|
3
|
+
var css = ".scm-view{height:100%;position:relative}.scm-overflow-widgets-container{height:0;left:0;overflow:visible;position:absolute;top:0;width:0;z-index:5000}.scm-view .monaco-tl-contents>div{overflow:hidden;padding-right:12px}.scm-view .count{display:flex;margin-left:6px}.scm-view .count.hidden{display:none}.scm-view .scm-provider{align-items:center;display:flex;flex-direction:column;flex-flow:nowrap;height:100%}.scm-view.auto-provider-counts .scm-provider>.count[data-count=\"0\"],.scm-view.hide-provider-counts .scm-provider>.count{display:none}.scm-view .scm-provider>.label{flex:1;min-width:50px;overflow:hidden;text-overflow:ellipsis}.scm-view .scm-provider>.label>.name{font-weight:700}.scm-view .scm-provider>.label>.description{font-size:.9em;margin-left:.5em;opacity:.7}.scm-view .scm-provider>.actions{justify-content:flex-end;overflow:hidden}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item{align-items:center;display:flex;padding-left:4px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:first-child{min-width:20px}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label,.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.monaco-dropdown>.dropdown-label>.action-label{align-items:center;display:flex;line-height:16px;overflow:hidden}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item>.action-label>.codicon{font-size:12px;justify-content:center}.scm-view .scm-provider>.actions>.monaco-toolbar>.monaco-action-bar>.actions-container>.action-item:last-of-type{padding-right:0}.scm-view .scm-provider>.body{flex-grow:1}.scm-view .scm-provider>.status>.monaco-action-bar>.actions-container{border-color:var(--vscode-sideBar-border)}.scm-view .monaco-list-row{line-height:22px}.scm-view .monaco-list-row .monaco-icon-label-container{height:22px}.scm-view .monaco-list-row .history,.scm-view .monaco-list-row .history-item-group,.scm-view .monaco-list-row .resource-group{align-items:center;display:flex;height:100%}.scm-view .monaco-list-row .history-item .monaco-icon-label,.scm-view .monaco-list-row .history-item-group .monaco-icon-label{align-items:center;flex-grow:1}.scm-view .monaco-list-row .history-item{align-items:center;display:flex}.scm-view .monaco-list-row .history-item>.graph-container{display:flex;flex-shrink:0;height:22px}.scm-view .monaco-list-row .history-item>.graph-container.current>.graph>circle:last-child{fill:var(--vscode-sideBar-background)}.scm-view .monaco-list-row:hover .history-item>.graph-container.current>.graph>circle:last-child{fill:var(--vscode-list-hoverBackground)}.scm-view .monaco-list-row .history-item>.graph-container>.graph>circle{stroke:var(--vscode-sideBar-background)}.scm-view .monaco-list-row:hover .history-item>.graph-container>.graph>circle{stroke:var(--vscode-list-hoverBackground)}.scm-view .monaco-list-row .history-item>.label-container{display:flex;flex-shrink:0;gap:4px}.scm-view .monaco-list-row .history-item>.label-container>.label{align-items:center;border-radius:10px;display:flex;line-height:18px}.scm-view .monaco-list-row .history-item>.label-container>.label>.count{font-size:12px;margin-left:0;padding-left:4px}.scm-view .monaco-list-row .history-item>.label-container>.label>.codicon{color:inherit!important;font-size:14px;padding:2px}.scm-view .monaco-list-row .history-item>.label-container>.label>.codicon.codicon-git-branch{font-size:12px;padding:3px}.scm-view .monaco-list-row .history-item>.label-container>.label>.description{font-size:12px;max-width:100px;overflow:hidden;padding-right:4px;text-overflow:ellipsis}.scm-view .monaco-list-row .history-item .monaco-icon-label .icon-container{display:flex;padding-right:4px}.scm-view .monaco-list-row .history-item .monaco-icon-label .avatar{border-radius:14px;height:14px;width:14px}.scm-view .monaco-list-row .history-item .monaco-icon-label.history-item-current .label-name{font-weight:600}.scm-view .monaco-list-row .history-item .monaco-icon-label.history-item-current .label-description{font-weight:500}.scm-view .monaco-list-row .history>.name,.scm-view .monaco-list-row .resource-group>.name{flex:1;overflow:hidden;text-overflow:ellipsis}.scm-view .monaco-list-row .resource{display:flex;height:100%}.scm-view .monaco-list-row .resource.faded{opacity:.7}.scm-view .monaco-list-row .resource>.name{flex:1;overflow:hidden}.scm-view .monaco-list-row .resource>.name>.monaco-icon-label:after{margin-right:3px}.scm-view .monaco-list-row .resource>.decoration-icon{background-position:50% 50%;background-repeat:no-repeat;height:100%;margin-left:5px;width:16px}.scm-view .monaco-list-row .resource>.decoration-icon.codicon{margin-right:0;margin-top:3px}.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions{flex-grow:100}.scm-view .monaco-list .monaco-list-row .history-item>.actions,.scm-view .monaco-list .monaco-list-row .resource-group>.actions,.scm-view .monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions{display:none;max-width:fit-content}.scm-view .monaco-list .monaco-list-row.focused .history-item>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource-group>.actions,.scm-view .monaco-list .monaco-list-row.focused .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource-group>.actions,.scm-view .monaco-list .monaco-list-row:hover .resource>.name>.monaco-icon-label>.actions,.scm-view .monaco-list:not(.selection-multiple) .monaco-list-row .resource:hover>.actions{display:block}.scm-view .monaco-list .monaco-list-row.focused.force-no-hover,.scm-view .monaco-list .monaco-list-row.force-no-hover,.scm-view .monaco-list .monaco-list-row.selected.force-no-hover,.scm-view .monaco-list .monaco-list-row:hover.force-no-hover{background:transparent!important}.scm-view .monaco-list .monaco-list-row.cursor-default{cursor:default}.scm-view.show-actions .scm-provider>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .history-item>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource-group>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .resource>.name>.monaco-icon-label>.actions,.scm-view.show-actions>.monaco-list .monaco-list-row .scm-input>.scm-editor>.actions{display:block}.scm-view .monaco-list-row .actions .action-label{padding:2px}.scm-view .scm-input{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .scm-input .scm-editor .scm-editor-toolbar{padding:1px 3px 1px 1px}.scm-view .scm-input .scm-editor .scm-editor-toolbar.hidden{display:none}.scm-view .scm-input .scm-editor .scm-editor-toolbar.scroll-decoration{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset}.scm-view .scm-input .scm-editor .scm-editor-toolbar .action-label.codicon.codicon-debug-stop{color:var(--vscode-icon-foreground)!important}.scm-view .scm-editor-container .monaco-editor{border-radius:2px}.scm-view .scm-editor{align-items:flex-start;background-color:var(--vscode-input-background);border:1px solid var(--vscode-input-border,transparent);border-radius:2px;box-sizing:border-box;display:flex;width:100%}.scm-view .button-container{align-items:center;display:flex;height:100%;padding-left:11px}.scm-view .button-container .codicon.codicon-cloud-upload,.scm-view .button-container .codicon.codicon-sync{margin:0 4px 0 0}.scm-view .button-container .codicon.codicon-arrow-down,.scm-view .button-container .codicon.codicon-arrow-up{font-size:small!important;margin:0 4px 0 0}.scm-view .button-container>.monaco-button-dropdown{flex-grow:1;overflow:hidden}.scm-view .button-container>.monaco-button-dropdown>.monaco-dropdown-button{align-items:center;display:flex;padding:0 4px}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button{min-width:0}.scm-view .button-container>.monaco-button-dropdown>.monaco-button.monaco-text-button>span:not(.codicon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scm-view .scm-editor.hidden{display:none}.monaco-workbench .part.panel .scm-view .scm-editor-container{outline:1px solid var(--vscode-panelInput-border)}.monaco-workbench .part.panel .scm-view .scm-editor.synthetic-focus,.scm-view .scm-editor.synthetic-focus{outline:1px solid var(--vscode-focusBorder);outline-offset:-1px}.scm-view .scm-editor.validation-info{outline:1px solid var(--vscode-inputValidation-infoBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-warning{outline:1px solid var(--vscode-inputValidation-warningBorder)!important;outline-offset:-1px}.scm-view .scm-editor.validation-error{outline:1px solid var(--vscode-inputValidation-errorBorder)!important;outline-offset:-1px}.scm-editor-validation-container{border-bottom-left-radius:2px;border-bottom-right-radius:2px;border-style:solid;border-width:1px;border-top:none;box-sizing:border-box;display:flex;padding:2px}.scm-editor-validation-container.validation-info{background-color:var(--vscode-inputValidation-infoBackground);border-color:var(--vscode-inputValidation-infoBorder);color:var(--vscode-inputValidation-infoForeground)}.scm-editor-validation-container.validation-warning{background-color:var(--vscode-inputValidation-warningBackground);border-color:var(--vscode-inputValidation-warningBorder);color:var(--vscode-inputValidation-warningForeground)}.scm-editor-validation-container.validation-error{background-color:var(--vscode-inputValidation-errorBackground);border-color:var(--vscode-inputValidation-errorBorder);color:var(--vscode-inputValidation-errorForeground)}.scm-editor-validation{border-style:none;box-sizing:border-box;display:block;flex:auto;font-size:.9em;padding:1px 3px}.scm-editor-validation p{margin:0;padding:0}.scm-editor-validation a{color:var(--vscode-textLink-foreground);-webkit-user-select:none;user-select:none}.scm-editor-validation a:active,.scm-editor-validation a:hover{color:var(--vscode-textLink-activeForeground)}.scm-editor-validation-actions{align-self:start;margin-top:1px}.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .margin,.monaco-workbench .part.basepanel>.content .scm-view .scm-editor-container .monaco-editor .monaco-editor-background,.scm-view .scm-editor-container .monaco-editor,.scm-view .scm-editor-container .monaco-editor .margin,.scm-view .scm-editor-container .monaco-editor-background{background-color:var(--vscode-input-background);color:inherit}.scm-view .scm-editor-container .mtk1{color:var(--vscode-input-foreground)}.scm-view .scm-editor-container .placeholder-text.mtk1{color:var(--vscode-input-placeholderForeground)}.scm-repositories-view .scm-provider{margin:0 12px 0 20px;overflow:hidden}.scm-repositories-view .scm-provider>.label>.name{font-weight:400}.monaco-hover.history-item-hover p:first-child{margin-top:4px}.monaco-hover.history-item-hover p:last-child{margin-bottom:2px!important}.monaco-hover.history-item-hover p:last-child span:not(.codicon){padding:2px 0}.monaco-hover.history-item-hover hr{margin-bottom:4px;margin-top:4px}.monaco-hover.history-item-hover hr+p{margin:4px 0}.monaco-hover.history-item-hover span:not(.codicon){margin-bottom:0!important}.monaco-hover.history-item-hover p>span>span.codicon.codicon-git-branch{font-size:12px;margin-bottom:2px!important}.monaco-hover.history-item-hover p>span>span.codicon.codicon-tag,.monaco-hover.history-item-hover p>span>span.codicon.codicon-target{font-size:14px;margin-bottom:2px!important}.monaco-hover.history-item-hover p>span>span.codicon.codicon-cloud{font-size:14px;margin-bottom:1px!important}.monaco-hover.history-item-hover .hover-row.status-bar .action{align-items:center;display:flex}.monaco-hover.history-item-hover .hover-row.status-bar .action .codicon{color:inherit;font-size:12px}.pane-header .scm-graph-view-badge-container{align-items:center;display:flex;min-width:fit-content}.pane-header .scm-graph-view-badge-container>.scm-graph-view-badge.monaco-count-badge.long{background-color:var(--vscode-badge-background);border:1px solid var(--vscode-contrastBorder);color:var(--vscode-badge-foreground);margin:0 6px;padding:2px 4px}.monaco-workbench .part.auxiliarybar>.title>.title-actions .action-label.scm-graph-history-item-picker,.monaco-workbench .part.auxiliarybar>.title>.title-actions .action-label.scm-graph-repository-picker,.monaco-workbench .part.panel>.title>.title-actions .action-label.scm-graph-history-item-picker,.monaco-workbench .part.panel>.title>.title-actions .action-label.scm-graph-repository-picker{display:flex}.monaco-toolbar .action-item>.action-label.scm-graph-history-item-picker,.monaco-toolbar .action-item>.action-label.scm-graph-repository-picker{align-items:center;color:var(--vscode-icon-foreground);font-weight:400;line-height:16px}.monaco-toolbar .action-item.disabled>.action-label.scm-graph-history-item-picker,.monaco-toolbar .action-item.disabled>.action-label.scm-graph-repository-picker{color:var(--vscode-disabledForeground)}.monaco-toolbar .action-label.scm-graph-history-item-picker .codicon,.monaco-toolbar .action-label.scm-graph-repository-picker .codicon{color:inherit;font-size:14px}.monaco-toolbar .action-label.scm-graph-history-item-picker>.name,.monaco-toolbar .action-label.scm-graph-repository-picker>.name{max-width:100px;overflow:hidden;text-overflow:ellipsis}.scm-history-view .scm-provider .label-name{font-weight:700}.scm-history-view .scm-provider .monaco-icon-label{align-items:center}.scm-history-view .scm-provider .state-label.monaco-count-badge.long{background:var(--vscode-debugView-stateLabelBackground);border-radius:2px;color:var(--vscode-debugView-stateLabelForeground);display:flex;font-size:.8em;margin:0 10px}.scm-history-view .scm-provider .actions{display:flex;flex-grow:1}.scm-history-view .history-item-load-more{display:flex;height:22px}.scm-history-view .history-item-load-more .graph-placeholder{mask-image:linear-gradient(#000,transparent)}.scm-history-view .history-item-load-more .history-item-placeholder{flex-grow:1}.scm-history-view .history-item-load-more .history-item-placeholder .monaco-highlighted-label{align-items:center;color:var(--vscode-textLink-foreground);display:flex;justify-content:center}.scm-history-view .history-item-load-more .history-item-placeholder .monaco-highlighted-label .codicon{color:var(--vscode-textLink-foreground);font-size:12px}.scm-history-view .history-item-load-more .history-item-placeholder.shimmer{padding:2px 0}.scm-history-view .history-item-load-more .history-item-placeholder.shimmer .monaco-icon-label-container{background:var(--vscode-scmGraph-historyItemHoverDefaultLabelBackground);border-radius:2px;height:18px;opacity:.5}";
|
|
4
4
|
n(css,{});
|
|
5
5
|
|
|
6
6
|
export { css, css as default };
|
|
@@ -41,6 +41,7 @@ export declare class SCMMenus implements ISCMMenus, IDisposable {
|
|
|
41
41
|
private instantiationService;
|
|
42
42
|
readonly titleMenu: SCMTitleMenu;
|
|
43
43
|
private readonly disposables;
|
|
44
|
+
private readonly repositoryMenuDisposables;
|
|
44
45
|
private readonly menus;
|
|
45
46
|
constructor(scmService: ISCMService, instantiationService: IInstantiationService);
|
|
46
47
|
private onDidRemoveRepository;
|
|
@@ -6,7 +6,7 @@ import { DisposableStore, dispose } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
6
6
|
import './media/scm.css.js';
|
|
7
7
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
8
|
import { getActionBarActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
9
|
-
import {
|
|
9
|
+
import { MenuId, MenuRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
10
10
|
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
11
11
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
12
12
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -16,15 +16,6 @@ import { ISCMService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/co
|
|
|
16
16
|
function actionEquals(a, b) {
|
|
17
17
|
return a.id === b.id;
|
|
18
18
|
}
|
|
19
|
-
const repositoryMenuDisposables = ( new DisposableStore());
|
|
20
|
-
MenuRegistry.onDidChangeMenu(e => {
|
|
21
|
-
if (( e.has(MenuId.SCMTitle))) {
|
|
22
|
-
repositoryMenuDisposables.clear();
|
|
23
|
-
for (const menuItem of MenuRegistry.getMenuItems(MenuId.SCMTitle)) {
|
|
24
|
-
repositoryMenuDisposables.add(MenuRegistry.appendMenuItem(MenuId.SCMSourceControlInline, menuItem));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
19
|
let SCMTitleMenu = class SCMTitleMenu {
|
|
29
20
|
get actions() { return this._actions; }
|
|
30
21
|
get secondaryActions() { return this._secondaryActions; }
|
|
@@ -177,9 +168,19 @@ let SCMMenus = class SCMMenus {
|
|
|
177
168
|
constructor(scmService, instantiationService) {
|
|
178
169
|
this.instantiationService = instantiationService;
|
|
179
170
|
this.disposables = ( new DisposableStore());
|
|
171
|
+
this.repositoryMenuDisposables = ( new DisposableStore());
|
|
180
172
|
this.menus = ( new Map());
|
|
181
173
|
this.titleMenu = instantiationService.createInstance(SCMTitleMenu);
|
|
182
174
|
scmService.onDidRemoveRepository(this.onDidRemoveRepository, this, this.disposables);
|
|
175
|
+
MenuRegistry.onDidChangeMenu(e => {
|
|
176
|
+
if (!( e.has(MenuId.SCMTitle))) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this.repositoryMenuDisposables.clear();
|
|
180
|
+
for (const menuItem of MenuRegistry.getMenuItems(MenuId.SCMTitle)) {
|
|
181
|
+
this.repositoryMenuDisposables.add(MenuRegistry.appendMenuItem(MenuId.SCMSourceControlInline, menuItem));
|
|
182
|
+
}
|
|
183
|
+
}, this, this.disposables);
|
|
183
184
|
}
|
|
184
185
|
onDidRemoveRepository(repository) {
|
|
185
186
|
const menus = this.menus.get(repository.provider);
|
|
@@ -208,7 +209,7 @@ SCMMenus = ( __decorate([
|
|
|
208
209
|
( __param(1, IInstantiationService))
|
|
209
210
|
], SCMMenus));
|
|
210
211
|
MenuRegistry.appendMenuItem(MenuId.SCMResourceContext, {
|
|
211
|
-
title: ( localize(
|
|
212
|
+
title: ( localize(8587, "Share")),
|
|
212
213
|
submenu: MenuId.SCMResourceContextShare,
|
|
213
214
|
group: '45_share',
|
|
214
215
|
order: 3,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
4
|
+
import { IQuickDiffModelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service";
|
|
5
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
6
|
+
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
7
|
+
export declare class QuickDiffWorkbenchController extends Disposable implements IWorkbenchContribution {
|
|
8
|
+
private readonly editorService;
|
|
9
|
+
private readonly configurationService;
|
|
10
|
+
private readonly quickDiffModelService;
|
|
11
|
+
private readonly uriIdentityService;
|
|
12
|
+
private enabled;
|
|
13
|
+
private readonly decorators;
|
|
14
|
+
private viewState;
|
|
15
|
+
private readonly transientDisposables;
|
|
16
|
+
private readonly stylesheet;
|
|
17
|
+
constructor(editorService: IEditorService, configurationService: IConfigurationService, quickDiffModelService: IQuickDiffModelService, uriIdentityService: IUriIdentityService);
|
|
18
|
+
private onDidChangeConfiguration;
|
|
19
|
+
private onDidChangeDiffWidthConfiguration;
|
|
20
|
+
private onDidChangeDiffVisibilityConfiguration;
|
|
21
|
+
private setViewState;
|
|
22
|
+
private enable;
|
|
23
|
+
private disable;
|
|
24
|
+
private onEditorsChanged;
|
|
25
|
+
dispose(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
import './media/dirtydiffDecorator.css.js';
|
|
5
|
+
import { Disposable, DisposableStore, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
+
import { ModelDecorationOptions } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
|
|
9
|
+
import { themeColorFromId } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
|
|
10
|
+
import { isCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
|
|
11
|
+
import { OverviewRulerLane, MinimapPosition } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
12
|
+
import { createStyleSheet } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/domStylesheets';
|
|
13
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
14
|
+
import { minimapGutterAddedBackground, overviewRulerAddedForeground, minimapGutterModifiedBackground, overviewRulerModifiedForeground, minimapGutterDeletedBackground, overviewRulerDeletedForeground, getChangeType, ChangeType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
15
|
+
import { IQuickDiffModelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service';
|
|
16
|
+
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
17
|
+
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
18
|
+
|
|
19
|
+
var QuickDiffDecorator_1;
|
|
20
|
+
let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends Disposable {
|
|
21
|
+
static createDecoration(className, tooltip, options) {
|
|
22
|
+
const decorationOptions = {
|
|
23
|
+
description: 'dirty-diff-decoration',
|
|
24
|
+
isWholeLine: options.isWholeLine,
|
|
25
|
+
};
|
|
26
|
+
if (options.gutter) {
|
|
27
|
+
decorationOptions.linesDecorationsClassName = `dirty-diff-glyph ${className}`;
|
|
28
|
+
decorationOptions.linesDecorationsTooltip = tooltip;
|
|
29
|
+
}
|
|
30
|
+
if (options.overview.active) {
|
|
31
|
+
decorationOptions.overviewRuler = {
|
|
32
|
+
color: themeColorFromId(options.overview.color),
|
|
33
|
+
position: OverviewRulerLane.Left
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (options.minimap.active) {
|
|
37
|
+
decorationOptions.minimap = {
|
|
38
|
+
color: themeColorFromId(options.minimap.color),
|
|
39
|
+
position: MinimapPosition.Gutter
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return ModelDecorationOptions.createDynamic(decorationOptions);
|
|
43
|
+
}
|
|
44
|
+
constructor(codeEditor, quickDiffModelRef, configurationService) {
|
|
45
|
+
super();
|
|
46
|
+
this.codeEditor = codeEditor;
|
|
47
|
+
this.quickDiffModelRef = quickDiffModelRef;
|
|
48
|
+
this.configurationService = configurationService;
|
|
49
|
+
const decorations = configurationService.getValue('scm.diffDecorations');
|
|
50
|
+
const gutter = decorations === 'all' || decorations === 'gutter';
|
|
51
|
+
const overview = decorations === 'all' || decorations === 'overview';
|
|
52
|
+
const minimap = decorations === 'all' || decorations === 'minimap';
|
|
53
|
+
const diffAdded = ( localize(8588, 'Added lines'));
|
|
54
|
+
this.addedOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added', diffAdded, {
|
|
55
|
+
gutter,
|
|
56
|
+
overview: { active: overview, color: overviewRulerAddedForeground },
|
|
57
|
+
minimap: { active: minimap, color: minimapGutterAddedBackground },
|
|
58
|
+
isWholeLine: true
|
|
59
|
+
});
|
|
60
|
+
this.addedPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added-pattern', diffAdded, {
|
|
61
|
+
gutter,
|
|
62
|
+
overview: { active: overview, color: overviewRulerAddedForeground },
|
|
63
|
+
minimap: { active: minimap, color: minimapGutterAddedBackground },
|
|
64
|
+
isWholeLine: true
|
|
65
|
+
});
|
|
66
|
+
const diffModified = ( localize(8589, 'Changed lines'));
|
|
67
|
+
this.modifiedOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified', diffModified, {
|
|
68
|
+
gutter,
|
|
69
|
+
overview: { active: overview, color: overviewRulerModifiedForeground },
|
|
70
|
+
minimap: { active: minimap, color: minimapGutterModifiedBackground },
|
|
71
|
+
isWholeLine: true
|
|
72
|
+
});
|
|
73
|
+
this.modifiedPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified-pattern', diffModified, {
|
|
74
|
+
gutter,
|
|
75
|
+
overview: { active: overview, color: overviewRulerModifiedForeground },
|
|
76
|
+
minimap: { active: minimap, color: minimapGutterModifiedBackground },
|
|
77
|
+
isWholeLine: true
|
|
78
|
+
});
|
|
79
|
+
this.deletedOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-deleted', ( localize(8590, 'Removed lines')), {
|
|
80
|
+
gutter,
|
|
81
|
+
overview: { active: overview, color: overviewRulerDeletedForeground },
|
|
82
|
+
minimap: { active: minimap, color: minimapGutterDeletedBackground },
|
|
83
|
+
isWholeLine: false
|
|
84
|
+
});
|
|
85
|
+
this._register(configurationService.onDidChangeConfiguration(e => {
|
|
86
|
+
if (e.affectsConfiguration('scm.diffDecorationsGutterPattern')) {
|
|
87
|
+
this.onDidChange();
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
this._register(Event.runAndSubscribe(this.quickDiffModelRef.object.onDidChange, () => this.onDidChange()));
|
|
91
|
+
}
|
|
92
|
+
onDidChange() {
|
|
93
|
+
if (!this.codeEditor.hasModel()) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const visibleQuickDiffs = this.quickDiffModelRef.object.quickDiffs.filter(quickDiff => quickDiff.visible);
|
|
97
|
+
const pattern = this.configurationService.getValue('scm.diffDecorationsGutterPattern');
|
|
98
|
+
const decorations = ( this.quickDiffModelRef.object.changes
|
|
99
|
+
.filter(labeledChange => ( visibleQuickDiffs.some(quickDiff => quickDiff.label === labeledChange.label)))
|
|
100
|
+
.map((labeledChange) => {
|
|
101
|
+
const change = labeledChange.change;
|
|
102
|
+
const changeType = getChangeType(change);
|
|
103
|
+
const startLineNumber = change.modifiedStartLineNumber;
|
|
104
|
+
const endLineNumber = change.modifiedEndLineNumber || startLineNumber;
|
|
105
|
+
switch (changeType) {
|
|
106
|
+
case ChangeType.Add:
|
|
107
|
+
return {
|
|
108
|
+
range: {
|
|
109
|
+
startLineNumber: startLineNumber, startColumn: 1,
|
|
110
|
+
endLineNumber: endLineNumber, endColumn: 1
|
|
111
|
+
},
|
|
112
|
+
options: pattern.added ? this.addedPatternOptions : this.addedOptions
|
|
113
|
+
};
|
|
114
|
+
case ChangeType.Delete:
|
|
115
|
+
return {
|
|
116
|
+
range: {
|
|
117
|
+
startLineNumber: startLineNumber, startColumn: Number.MAX_VALUE,
|
|
118
|
+
endLineNumber: startLineNumber, endColumn: Number.MAX_VALUE
|
|
119
|
+
},
|
|
120
|
+
options: this.deletedOptions
|
|
121
|
+
};
|
|
122
|
+
case ChangeType.Modify:
|
|
123
|
+
return {
|
|
124
|
+
range: {
|
|
125
|
+
startLineNumber: startLineNumber, startColumn: 1,
|
|
126
|
+
endLineNumber: endLineNumber, endColumn: 1
|
|
127
|
+
},
|
|
128
|
+
options: pattern.modified ? this.modifiedPatternOptions : this.modifiedOptions
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}));
|
|
132
|
+
if (!this.decorationsCollection) {
|
|
133
|
+
this.decorationsCollection = this.codeEditor.createDecorationsCollection(decorations);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
this.decorationsCollection.set(decorations);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
dispose() {
|
|
140
|
+
if (this.decorationsCollection) {
|
|
141
|
+
this.decorationsCollection?.clear();
|
|
142
|
+
}
|
|
143
|
+
this.decorationsCollection = undefined;
|
|
144
|
+
this.quickDiffModelRef.dispose();
|
|
145
|
+
super.dispose();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
QuickDiffDecorator = QuickDiffDecorator_1 = ( __decorate([
|
|
149
|
+
( __param(2, IConfigurationService))
|
|
150
|
+
], QuickDiffDecorator));
|
|
151
|
+
let QuickDiffWorkbenchController = class QuickDiffWorkbenchController extends Disposable {
|
|
152
|
+
constructor(editorService, configurationService, quickDiffModelService, uriIdentityService) {
|
|
153
|
+
super();
|
|
154
|
+
this.editorService = editorService;
|
|
155
|
+
this.configurationService = configurationService;
|
|
156
|
+
this.quickDiffModelService = quickDiffModelService;
|
|
157
|
+
this.uriIdentityService = uriIdentityService;
|
|
158
|
+
this.enabled = false;
|
|
159
|
+
this.decorators = ( new ResourceMap());
|
|
160
|
+
this.viewState = { width: 3, visibility: 'always' };
|
|
161
|
+
this.transientDisposables = this._register(( new DisposableStore()));
|
|
162
|
+
this.stylesheet = createStyleSheet(undefined, undefined, this._store);
|
|
163
|
+
const onDidChangeConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorations'));
|
|
164
|
+
this._register(onDidChangeConfiguration(this.onDidChangeConfiguration, this));
|
|
165
|
+
this.onDidChangeConfiguration();
|
|
166
|
+
const onDidChangeDiffWidthConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorationsGutterWidth'));
|
|
167
|
+
this._register(onDidChangeDiffWidthConfiguration(this.onDidChangeDiffWidthConfiguration, this));
|
|
168
|
+
this.onDidChangeDiffWidthConfiguration();
|
|
169
|
+
const onDidChangeDiffVisibilityConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.diffDecorationsGutterVisibility'));
|
|
170
|
+
this._register(onDidChangeDiffVisibilityConfiguration(this.onDidChangeDiffVisibilityConfiguration, this));
|
|
171
|
+
this.onDidChangeDiffVisibilityConfiguration();
|
|
172
|
+
}
|
|
173
|
+
onDidChangeConfiguration() {
|
|
174
|
+
const enabled = this.configurationService.getValue('scm.diffDecorations') !== 'none';
|
|
175
|
+
if (enabled) {
|
|
176
|
+
this.enable();
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this.disable();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
onDidChangeDiffWidthConfiguration() {
|
|
183
|
+
let width = this.configurationService.getValue('scm.diffDecorationsGutterWidth');
|
|
184
|
+
if (isNaN(width) || width <= 0 || width > 5) {
|
|
185
|
+
width = 3;
|
|
186
|
+
}
|
|
187
|
+
this.setViewState({ ...this.viewState, width });
|
|
188
|
+
}
|
|
189
|
+
onDidChangeDiffVisibilityConfiguration() {
|
|
190
|
+
const visibility = this.configurationService.getValue('scm.diffDecorationsGutterVisibility');
|
|
191
|
+
this.setViewState({ ...this.viewState, visibility });
|
|
192
|
+
}
|
|
193
|
+
setViewState(state) {
|
|
194
|
+
this.viewState = state;
|
|
195
|
+
this.stylesheet.textContent = `
|
|
196
|
+
.monaco-editor .dirty-diff-added,
|
|
197
|
+
.monaco-editor .dirty-diff-modified {
|
|
198
|
+
border-left-width:${state.width}px;
|
|
199
|
+
}
|
|
200
|
+
.monaco-editor .dirty-diff-added-pattern,
|
|
201
|
+
.monaco-editor .dirty-diff-added-pattern:before,
|
|
202
|
+
.monaco-editor .dirty-diff-modified-pattern,
|
|
203
|
+
.monaco-editor .dirty-diff-modified-pattern:before {
|
|
204
|
+
background-size: ${state.width}px ${state.width}px;
|
|
205
|
+
}
|
|
206
|
+
.monaco-editor .dirty-diff-added,
|
|
207
|
+
.monaco-editor .dirty-diff-added-pattern,
|
|
208
|
+
.monaco-editor .dirty-diff-modified,
|
|
209
|
+
.monaco-editor .dirty-diff-modified-pattern,
|
|
210
|
+
.monaco-editor .dirty-diff-deleted {
|
|
211
|
+
opacity: ${state.visibility === 'always' ? 1 : 0};
|
|
212
|
+
}
|
|
213
|
+
`;
|
|
214
|
+
}
|
|
215
|
+
enable() {
|
|
216
|
+
if (this.enabled) {
|
|
217
|
+
this.disable();
|
|
218
|
+
}
|
|
219
|
+
this.transientDisposables.add(Event.any(this.editorService.onDidCloseEditor, this.editorService.onDidVisibleEditorsChange)(() => this.onEditorsChanged()));
|
|
220
|
+
this.onEditorsChanged();
|
|
221
|
+
this.enabled = true;
|
|
222
|
+
}
|
|
223
|
+
disable() {
|
|
224
|
+
if (!this.enabled) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
this.transientDisposables.clear();
|
|
228
|
+
for (const [uri, decoratorMap] of this.decorators.entries()) {
|
|
229
|
+
decoratorMap.dispose();
|
|
230
|
+
this.decorators.delete(uri);
|
|
231
|
+
}
|
|
232
|
+
this.enabled = false;
|
|
233
|
+
}
|
|
234
|
+
onEditorsChanged() {
|
|
235
|
+
for (const editor of this.editorService.visibleTextEditorControls) {
|
|
236
|
+
if (!isCodeEditor(editor)) {
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
const textModel = editor.getModel();
|
|
240
|
+
if (!textModel) {
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
const editorId = editor.getId();
|
|
244
|
+
if (this.decorators.get(textModel.uri)?.has(editorId)) {
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
const quickDiffModelRef = this.quickDiffModelService.createQuickDiffModelReference(textModel.uri);
|
|
248
|
+
if (!quickDiffModelRef) {
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
if (!( this.decorators.has(textModel.uri))) {
|
|
252
|
+
this.decorators.set(textModel.uri, ( new DisposableMap()));
|
|
253
|
+
}
|
|
254
|
+
this.decorators.get(textModel.uri).set(editorId, ( new QuickDiffDecorator(editor, quickDiffModelRef, this.configurationService)));
|
|
255
|
+
}
|
|
256
|
+
for (const [uri, decoratorMap] of this.decorators.entries()) {
|
|
257
|
+
for (const editorId of ( decoratorMap.keys())) {
|
|
258
|
+
const codeEditor = this.editorService.visibleTextEditorControls
|
|
259
|
+
.find(editor => isCodeEditor(editor) && editor.getId() === editorId &&
|
|
260
|
+
this.uriIdentityService.extUri.isEqual(editor.getModel()?.uri, uri));
|
|
261
|
+
if (!codeEditor) {
|
|
262
|
+
decoratorMap.deleteAndDispose(editorId);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (decoratorMap.size === 0) {
|
|
266
|
+
decoratorMap.dispose();
|
|
267
|
+
this.decorators.delete(uri);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
dispose() {
|
|
272
|
+
this.disable();
|
|
273
|
+
super.dispose();
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
QuickDiffWorkbenchController = ( __decorate([
|
|
277
|
+
( __param(0, IEditorService)),
|
|
278
|
+
( __param(1, IConfigurationService)),
|
|
279
|
+
( __param(2, IQuickDiffModelService)),
|
|
280
|
+
( __param(3, IUriIdentityService))
|
|
281
|
+
], QuickDiffWorkbenchController));
|
|
282
|
+
|
|
283
|
+
export { QuickDiffWorkbenchController };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IResolvedTextFileEditorModel } from "@codingame/monaco-vscode-a17f5129-e16c-5dac-857e-dcd91bfeffa2-common/vscode/vs/workbench/services/textfile/common/textfiles";
|
|
3
|
+
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
4
|
+
import { Disposable, IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
5
|
+
import { DiffAlgorithmName, IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker";
|
|
6
|
+
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
7
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
8
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService";
|
|
9
|
+
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
10
|
+
import { QuickDiff, QuickDiffChange, QuickDiffResult } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff";
|
|
11
|
+
import { IQuickDiffService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service";
|
|
12
|
+
import { ISCMService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
13
|
+
import { ISplice } from "@codingame/monaco-vscode-api/vscode/vs/base/common/sequence";
|
|
14
|
+
import { IDiffEditorModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon";
|
|
15
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
16
|
+
import { IProgressService } from "@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service";
|
|
17
|
+
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
|
|
18
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
19
|
+
import { IQuickDiffModelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service";
|
|
20
|
+
export interface QuickDiffModelOptions {
|
|
21
|
+
readonly algorithm: DiffAlgorithmName;
|
|
22
|
+
readonly maxComputationTimeMs?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare class QuickDiffModelService implements IQuickDiffModelService {
|
|
25
|
+
private readonly instantiationService;
|
|
26
|
+
private readonly textFileService;
|
|
27
|
+
private readonly uriIdentityService;
|
|
28
|
+
_serviceBrand: undefined;
|
|
29
|
+
private readonly _references;
|
|
30
|
+
constructor(instantiationService: IInstantiationService, textFileService: ITextFileService, uriIdentityService: IUriIdentityService);
|
|
31
|
+
createQuickDiffModelReference(resource: URI, options?: QuickDiffModelOptions): IReference<QuickDiffModel> | undefined;
|
|
32
|
+
}
|
|
33
|
+
export declare class QuickDiffModel extends Disposable {
|
|
34
|
+
private readonly options;
|
|
35
|
+
private readonly scmService;
|
|
36
|
+
private readonly quickDiffService;
|
|
37
|
+
private readonly editorWorkerService;
|
|
38
|
+
private readonly configurationService;
|
|
39
|
+
private readonly textModelResolverService;
|
|
40
|
+
private readonly _chatEditingService;
|
|
41
|
+
private readonly progressService;
|
|
42
|
+
private _model;
|
|
43
|
+
private readonly _originalEditorModels;
|
|
44
|
+
private readonly _originalEditorModelsDisposables;
|
|
45
|
+
get originalTextModels(): Iterable<ITextModel>;
|
|
46
|
+
private _disposed;
|
|
47
|
+
private _quickDiffs;
|
|
48
|
+
private _quickDiffsPromise?;
|
|
49
|
+
private _diffDelayer;
|
|
50
|
+
private readonly _onDidChange;
|
|
51
|
+
readonly onDidChange: Event<{
|
|
52
|
+
changes: QuickDiffChange[];
|
|
53
|
+
diff: ISplice<QuickDiffChange>[];
|
|
54
|
+
}>;
|
|
55
|
+
private _changes;
|
|
56
|
+
get changes(): QuickDiffChange[];
|
|
57
|
+
private _quickDiffChanges;
|
|
58
|
+
get quickDiffChanges(): Map<string, number[]>;
|
|
59
|
+
private readonly _repositoryDisposables;
|
|
60
|
+
constructor(textFileModel: IResolvedTextFileEditorModel, options: QuickDiffModelOptions, scmService: ISCMService, quickDiffService: IQuickDiffService, editorWorkerService: IEditorWorkerService, configurationService: IConfigurationService, textModelResolverService: ITextModelService, _chatEditingService: IChatEditingService, progressService: IProgressService);
|
|
61
|
+
get quickDiffs(): readonly QuickDiff[];
|
|
62
|
+
getQuickDiffResults(): QuickDiffResult[];
|
|
63
|
+
getDiffEditorModel(originalUri: URI): IDiffEditorModel | undefined;
|
|
64
|
+
private onDidAddRepository;
|
|
65
|
+
private triggerDiff;
|
|
66
|
+
private setChanges;
|
|
67
|
+
private diff;
|
|
68
|
+
private _diff;
|
|
69
|
+
private getQuickDiffsPromise;
|
|
70
|
+
private getOriginalResource;
|
|
71
|
+
findNextClosestChange(lineNumber: number, inclusive?: boolean, provider?: string): number;
|
|
72
|
+
findPreviousClosestChange(lineNumber: number, inclusive?: boolean, provider?: string): number;
|
|
73
|
+
dispose(): void;
|
|
74
|
+
}
|