@codingame/monaco-vscode-scm-service-override 4.5.2 → 5.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-scm-service-override",
3
- "version": "4.5.2",
3
+ "version": "5.0.1",
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@4.5.2"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@5.0.1"
30
30
  }
31
31
  }
@@ -225,7 +225,7 @@ let SCMActiveRepositoryContextKeyController = class SCMActiveRepositoryContextKe
225
225
  }
226
226
  updateContextKeys(repository) {
227
227
  this.activeRepositoryNameContextKey.set(repository?.provider.name ?? '');
228
- this.activeRepositoryBranchNameContextKey.set(repository?.provider.historyProvider?.currentHistoryItemGroup?.label ?? '');
228
+ this.activeRepositoryBranchNameContextKey.set(repository?.provider.historyProvider?.currentHistoryItemGroup?.name ?? '');
229
229
  }
230
230
  dispose() {
231
231
  this.focusDisposable.dispose();
@@ -1,6 +1,6 @@
1
1
  import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
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 .monaco-editor .selected-text{border-radius:0}.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 .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 .stats-container{border:1px solid var(--vscode-scm-historyItemStatisticsBorder);border-radius:2px;display:flex;font-size:11px;gap:4px;line-height:11px;margin-left:6px;min-height:18px;padding:0 4px}.scm-view .monaco-list-row.focused .history-item .stats-container,.scm-view .monaco-list-row.selected .history-item .stats-container{border:1px solid var(--vscode-scm-historyItemSelectedStatisticsBorder)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label,.scm-view .monaco-list-row .history-item .stats-container>.files-label,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{align-items:center;display:flex;opacity:.75}.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{color:var(--vscode-scm-historyItemAdditionsForeground)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label{color:var(--vscode-scm-historyItemDeletionsForeground)}.scm-view .monaco-list-row .history-item .stats-container.hidden,.scm-view .monaco-list-row .history-item .stats-container>.deletions-label.hidden,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label.hidden{display:none}.scm-view .monaco-list-row .history-item .monaco-icon-label .icon-container,.scm-view .monaco-list-row .history-item-group .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 .separator-container{align-items:center;display:flex;padding-left:11px}.scm-view .monaco-list-row .separator-container .label-name{font-size:10px}.scm-view .monaco-list-row.focused .separator-container .label-name,.scm-view .monaco-list-row.selected .separator-container .label-name{color:var(--vscode-foreground)}.scm-view .monaco-list-row .separator-container .separator{border-top:1px solid var(--vscode-sideBar-border);display:flex;flex-grow:1;height:0;margin-left:6px}.scm-view .monaco-list-row .separator-container .actions{padding-left:6px}.scm-view .monaco-list-row .history-item-group>.name,.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-right:8px;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-group>.actions,.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,.scm-view .monaco-list .monaco-list-row .separator-container>.actions{display:none;max-width:fit-content}.scm-view .monaco-list .monaco-list-row.focused .history-item-group>.actions,.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.focused .separator-container>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item-group>.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 .monaco-list-row:hover .separator-container>.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-group>.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,.scm-view.show-actions>.monaco-list .monaco-list-row .separator-container>.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-container .monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.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}.scm-view .scm-editor-placeholder{box-sizing:border-box;color:var(--vscode-input-placeholderForeground);overflow:hidden;padding:2px 6px;pointer-events:none;position:absolute;text-overflow:ellipsis;white-space:nowrap;z-index:1}.scm-view .scm-editor-placeholder.hidden{display:none}.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-repositories-view .scm-provider{margin:0 12px 0 20px;overflow:hidden}.scm-repositories-view .scm-provider>.label>.name{font-weight:400}";
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 .monaco-editor .selected-text{border-radius:0}.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 .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 .stats-container{border:1px solid var(--vscode-scm-historyItemStatisticsBorder);border-radius:2px;display:flex;font-size:11px;gap:4px;line-height:11px;margin-left:6px;min-height:18px;padding:0 4px}.scm-view .monaco-list-row.focused .history-item .stats-container,.scm-view .monaco-list-row.selected .history-item .stats-container{border:1px solid var(--vscode-scm-historyItemSelectedStatisticsBorder)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label,.scm-view .monaco-list-row .history-item .stats-container>.files-label,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{align-items:center;display:flex;opacity:.75}.scm-view .monaco-list-row .history-item .stats-container>.insertions-label{color:var(--vscode-scm-historyItemAdditionsForeground)}.scm-view .monaco-list-row .history-item .stats-container>.deletions-label{color:var(--vscode-scm-historyItemDeletionsForeground)}.scm-view .monaco-list-row .history-item .stats-container.hidden,.scm-view .monaco-list-row .history-item .stats-container>.deletions-label.hidden,.scm-view .monaco-list-row .history-item .stats-container>.insertions-label.hidden{display:none}.scm-view .monaco-list-row .history-item .monaco-icon-label .icon-container,.scm-view .monaco-list-row .history-item-group .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 .separator-container{align-items:center;display:flex;padding-left:11px}.scm-view .monaco-list-row .separator-container .label-name{font-size:10px}.scm-view .monaco-list-row.focused .separator-container .label-name,.scm-view .monaco-list-row.selected .separator-container .label-name{color:var(--vscode-foreground)}.scm-view .monaco-list-row .separator-container .separator{border-top:1px solid var(--vscode-sideBar-border);display:flex;flex-grow:1;height:0;margin-left:6px}.scm-view .monaco-list-row .separator-container .actions{padding-left:6px}.scm-view .monaco-list-row .history-item-group>.name,.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-group>.actions,.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,.scm-view .monaco-list .monaco-list-row .separator-container>.actions{display:none;max-width:fit-content}.scm-view .monaco-list .monaco-list-row.focused .history-item-group>.actions,.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.focused .separator-container>.actions,.scm-view .monaco-list .monaco-list-row:hover .history-item-group>.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 .monaco-list-row:hover .separator-container>.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-group>.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,.scm-view.show-actions>.monaco-list .monaco-list-row .separator-container>.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-container .monaco-editor .focused .selected-text{background-color:var(--vscode-editor-selectionBackground)}.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}.scm-view .scm-editor-placeholder{box-sizing:border-box;color:var(--vscode-input-placeholderForeground);overflow:hidden;padding:2px 6px;pointer-events:none;position:absolute;text-overflow:ellipsis;white-space:nowrap;z-index:1}.scm-view .scm-editor-placeholder.hidden{display:none}.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-repositories-view .scm-provider{margin:0 12px 0 20px;overflow:hidden}.scm-repositories-view .scm-provider>.label>.name{font-weight:400}";
4
4
  n(css,{});
5
5
 
6
6
  export { css, css as default };
@@ -1,6 +1,6 @@
1
1
  import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
2
2
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
3
- import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
3
+ import { Extensions, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
4
4
  import { DirtyDiffWorkbenchController } from 'vscode/vscode/vs/workbench/contrib/scm/browser/dirtydiffDecorator';
5
5
  import { VIEWLET_ID, VIEW_PANE_ID, REPOSITORIES_VIEW_PANE_ID } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
6
6
  import { ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
@@ -27,6 +27,7 @@ import { WorkspaceTrustContext, MANAGE_TRUST_COMMAND_ID } from 'vscode/vscode/vs
27
27
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
28
28
  import '../common/quickDiffService.js';
29
29
  import { getActiveElement } from 'vscode/vscode/vs/base/browser/dom';
30
+ import { SCMWorkingSetController } from './workingSet.js';
30
31
 
31
32
  const _moduleId = "vs/workbench/contrib/scm/browser/scm.contribution";
32
33
  ModesRegistry.registerLanguage({
@@ -115,6 +116,7 @@ viewsRegistry.registerViews([{
115
116
  .registerWorkbenchContribution(SCMActiveRepositoryContextKeyController, 3 );
116
117
  ( (Registry.as(Extensions.Workbench)))
117
118
  .registerWorkbenchContribution(SCMStatusController, 3 );
119
+ registerWorkbenchContribution2(SCMWorkingSetController.ID, SCMWorkingSetController, 3 );
118
120
  ( (Registry.as(Extensions$2.Configuration))).registerConfiguration({
119
121
  id: 'scm',
120
122
  order: 5,
@@ -446,12 +448,43 @@ viewsRegistry.registerViews([{
446
448
  "Controls whether the All Changes entry is shown for incoming/outgoing changes in the Source Control view."
447
449
  )),
448
450
  default: true
451
+ },
452
+ 'scm.workingSets.enabled': {
453
+ type: 'boolean',
454
+ description: ( localizeWithPath(
455
+ _moduleId,
456
+ 66,
457
+ "Controls whether to store editor working sets when switching between source control history item groups."
458
+ )),
459
+ default: false
460
+ },
461
+ 'scm.workingSets.default': {
462
+ type: 'string',
463
+ enum: ['empty', 'current'],
464
+ enumDescriptions: [
465
+ ( localizeWithPath(
466
+ _moduleId,
467
+ 67,
468
+ "Use an empty working set when switching to a source control history item group that does not have a working set."
469
+ )),
470
+ ( localizeWithPath(
471
+ _moduleId,
472
+ 68,
473
+ "Use the current working set when switching to a source control history item group that does not have a working set."
474
+ ))
475
+ ],
476
+ description: ( localizeWithPath(
477
+ _moduleId,
478
+ 69,
479
+ "Controls the default working set to use when switching to a source control history item group that does not have a working set."
480
+ )),
481
+ default: 'current'
449
482
  }
450
483
  }
451
484
  });
452
485
  KeybindingsRegistry.registerCommandAndKeybindingRule({
453
486
  id: 'scm.acceptInput',
454
- metadata: { description: ( localizeWithPath(_moduleId, 66, "Source Control: Accept Input")), args: [] },
487
+ metadata: { description: ( localizeWithPath(_moduleId, 70, "Source Control: Accept Input")), args: [] },
455
488
  weight: 200 ,
456
489
  when: ( (ContextKeyExpr.has('scmRepository'))),
457
490
  primary: 2048 | 3 ,
@@ -474,7 +507,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
474
507
  }
475
508
  });
476
509
  const viewNextCommitCommand = {
477
- description: { description: ( localizeWithPath(_moduleId, 67, "Source Control: View Next Commit")), args: [] },
510
+ description: { description: ( localizeWithPath(_moduleId, 71, "Source Control: View Next Commit")), args: [] },
478
511
  weight: 200 ,
479
512
  handler: (accessor) => {
480
513
  const contextKeyService = accessor.get(IContextKeyService);
@@ -486,7 +519,7 @@ const viewNextCommitCommand = {
486
519
  }
487
520
  };
488
521
  const viewPreviousCommitCommand = {
489
- description: { description: ( localizeWithPath(_moduleId, 68, "Source Control: View Previous Commit")), args: [] },
522
+ description: { description: ( localizeWithPath(_moduleId, 72, "Source Control: View Previous Commit")), args: [] },
490
523
  weight: 200 ,
491
524
  handler: (accessor) => {
492
525
  const contextKeyService = accessor.get(IContextKeyService);
@@ -547,7 +580,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
547
580
  group: '100_end',
548
581
  command: {
549
582
  id: 'scm.openInTerminal',
550
- title: ( localizeWithPath(_moduleId, 69, "Open in External Terminal"))
583
+ title: ( localizeWithPath(_moduleId, 73, "Open in External Terminal"))
551
584
  },
552
585
  when: ( (ContextKeyExpr.and(
553
586
  (ContextKeyExpr.equals('scmProviderHasRootUri', true)),
@@ -561,7 +594,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, {
561
594
  group: '100_end',
562
595
  command: {
563
596
  id: 'scm.openInIntegratedTerminal',
564
- title: ( localizeWithPath(_moduleId, 70, "Open in Integrated Terminal"))
597
+ title: ( localizeWithPath(_moduleId, 74, "Open in Integrated Terminal"))
565
598
  },
566
599
  when: ( (ContextKeyExpr.and(
567
600
  (ContextKeyExpr.equals('scmProviderHasRootUri', true)),
@@ -21,6 +21,7 @@ import { getActionViewItemProvider, collectContextMenuActions } from './util.js'
21
21
  import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
22
22
  import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
23
23
  import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
24
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
24
25
 
25
26
  const _moduleId = "vs/workbench/contrib/scm/browser/scmRepositoriesViewPane";
26
27
  class ListDelegate {
@@ -32,8 +33,8 @@ class ListDelegate {
32
33
  }
33
34
  }
34
35
  let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
35
- constructor(options, scmViewService, keybindingService, contextMenuService, instantiationService, viewDescriptorService, contextKeyService, configurationService, openerService, themeService, telemetryService) {
36
- super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
36
+ constructor(options, scmViewService, keybindingService, contextMenuService, instantiationService, viewDescriptorService, contextKeyService, configurationService, openerService, themeService, telemetryService, hoverService) {
37
+ super({ ...options, titleMenuId: MenuId.SCMSourceControlTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
37
38
  this.scmViewService = scmViewService;
38
39
  this.disposables = ( (new DisposableStore()));
39
40
  }
@@ -165,7 +166,8 @@ SCMRepositoriesViewPane = ( (__decorate([
165
166
  ( (__param(7, IConfigurationService))),
166
167
  ( (__param(8, IOpenerService))),
167
168
  ( (__param(9, IThemeService))),
168
- ( (__param(10, ITelemetryService)))
169
+ ( (__param(10, ITelemetryService))),
170
+ ( (__param(11, IHoverService)))
169
171
  ], SCMRepositoriesViewPane)));
170
172
 
171
173
  export { SCMRepositoriesViewPane };
@@ -62,6 +62,7 @@ let RepositoryRenderer = class RepositoryRenderer {
62
62
  this.contextKeyService,
63
63
  this.contextMenuService,
64
64
  this.keybindingService,
65
+ this.commandService,
65
66
  this.telemetryService
66
67
  ));
67
68
  const countContainer = append(provider, $('.count'));
@@ -4,7 +4,7 @@ import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
4
4
  import { basename, dirname } from 'vscode/vscode/vs/base/common/resources';
5
5
  import { Disposable, DisposableStore, toDisposable, combinedDisposable, MutableDisposable, dispose, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
6
6
  import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
7
- import { append, $, asCSSUrl, prepend, Dimension, trackFocus, clearNode } from 'vscode/vscode/vs/base/browser/dom';
7
+ import { append, $, asCSSUrl, prepend, Dimension, trackFocus, isPointerEvent, clearNode } from 'vscode/vscode/vs/base/browser/dom';
8
8
  import { VIEW_PANE_ID, SCMInputChangeReason } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
9
9
  import { ISCMViewService, ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
10
10
  import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
@@ -45,12 +45,11 @@ import { MenuPreventer } from 'vscode/vscode/vs/workbench/contrib/codeEditor/bro
45
45
  import { SelectionClipboardContributionID } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/selectionClipboard';
46
46
  import { EditorDictation } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation';
47
47
  import { ContextMenuController } from 'vscode/vscode/vs/editor/contrib/contextmenu/browser/contextmenu';
48
- import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
48
+ import { language, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
49
49
  import { compare, format } from 'vscode/vscode/vs/base/common/strings';
50
50
  import { SuggestController } from 'vscode/vscode/vs/editor/contrib/suggest/browser/suggestController';
51
51
  import { SnippetController2 } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetController2';
52
52
  import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
53
- import { HoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/hover';
54
53
  import { ColorDetector } from 'vscode/vscode/vs/editor/contrib/colorPicker/browser/colorDetector';
55
54
  import { LinkDetector } from 'vscode/vscode/vs/editor/contrib/links/browser/links';
56
55
  import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
@@ -69,6 +68,7 @@ import { ButtonWithDropdown, Button } from 'vscode/vscode/vs/base/browser/ui/but
69
68
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
70
69
  import { RepositoryContextKeys } from './scmViewService.js';
71
70
  import { DragAndDropController } from 'vscode/vscode/vs/editor/contrib/dnd/browser/dnd';
71
+ import { CopyPasteController } from 'vscode/vscode/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController';
72
72
  import { DropIntoEditorController } from 'vscode/vscode/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController';
73
73
  import { MessageController } from 'vscode/vscode/vs/editor/contrib/message/browser/messageController';
74
74
  import { defaultCountBadgeStyles, defaultButtonStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
@@ -100,6 +100,11 @@ import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellati
100
100
  import { DropdownWithPrimaryActionViewItem } from 'vscode/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
101
101
  import { clamp } from 'vscode/vscode/vs/base/common/numbers';
102
102
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
103
+ import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
104
+ import { MarkdownString } from 'vscode/vscode/vs/base/common/htmlContent';
105
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
106
+ import { OpenScmGroupAction } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver';
107
+ import { HoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/hoverController';
103
108
 
104
109
  var ActionButtonRenderer_1, InputRenderer_1, ResourceGroupRenderer_1, ResourceRenderer_1, HistoryItemGroupRenderer_1, HistoryItemRenderer_1, HistoryItemChangeRenderer_1, SeparatorRenderer_1, SCMInputWidget_1;
105
110
  const _moduleId = "vs/workbench/contrib/scm/browser/scmViewPane";
@@ -127,6 +132,46 @@ registerColor('scm.historyItemSelectedStatisticsBorder', {
127
132
  hcDark: ( (transparent(listActiveSelectionForeground, 0.2))),
128
133
  hcLight: ( (transparent(listActiveSelectionForeground, 0.2)))
129
134
  }, ( localizeWithPath(_moduleId, 3, "History item selected statistics border color.")));
135
+ function processResourceFilterData(uri, filterData) {
136
+ if (!filterData) {
137
+ return [undefined, undefined];
138
+ }
139
+ if (!filterData.label) {
140
+ const matches = createMatches(filterData);
141
+ return [matches, undefined];
142
+ }
143
+ const fileName = basename(uri);
144
+ const label = filterData.label;
145
+ const pathLength = label.length - fileName.length;
146
+ const matches = createMatches(filterData.score);
147
+ if (label === fileName) {
148
+ return [matches, undefined];
149
+ }
150
+ const labelMatches = [];
151
+ const descriptionMatches = [];
152
+ for (const match of matches) {
153
+ if (match.start > pathLength) {
154
+ labelMatches.push({
155
+ start: match.start - pathLength,
156
+ end: match.end - pathLength
157
+ });
158
+ }
159
+ else if (match.end < pathLength) {
160
+ descriptionMatches.push(match);
161
+ }
162
+ else {
163
+ labelMatches.push({
164
+ start: 0,
165
+ end: match.end - pathLength
166
+ });
167
+ descriptionMatches.push({
168
+ start: match.start,
169
+ end: pathLength
170
+ });
171
+ }
172
+ }
173
+ return [labelMatches, descriptionMatches];
174
+ }
130
175
  let ActionButtonRenderer = class ActionButtonRenderer {
131
176
  static { ActionButtonRenderer_1 = this; }
132
177
  static { this.DEFAULT_HEIGHT = 30; }
@@ -462,7 +507,7 @@ let ResourceRenderer = class ResourceRenderer {
462
507
  else {
463
508
  const menus = this.scmViewService.menus.getRepositoryMenus(resourceOrFolder.resourceGroup.provider);
464
509
  this._renderActionBar(template, resourceOrFolder, menus.getResourceMenu(resourceOrFolder));
465
- [matches, descriptionMatches] = this._processFilterData(uri, node.filterData);
510
+ [matches, descriptionMatches] = processResourceFilterData(uri, node.filterData);
466
511
  template.element.classList.toggle('faded', resourceOrFolder.decorations.faded);
467
512
  strikethrough = resourceOrFolder.decorations.strikeThrough;
468
513
  }
@@ -512,46 +557,6 @@ let ResourceRenderer = class ResourceRenderer {
512
557
  }
513
558
  template.actionBar.context = resourceOrFolder;
514
559
  }
515
- _processFilterData(uri, filterData) {
516
- if (!filterData) {
517
- return [undefined, undefined];
518
- }
519
- if (!filterData.label) {
520
- const matches = createMatches(filterData);
521
- return [matches, undefined];
522
- }
523
- const fileName = basename(uri);
524
- const label = filterData.label;
525
- const pathLength = label.length - fileName.length;
526
- const matches = createMatches(filterData.score);
527
- if (label === fileName) {
528
- return [matches, undefined];
529
- }
530
- const labelMatches = [];
531
- const descriptionMatches = [];
532
- for (const match of matches) {
533
- if (match.start > pathLength) {
534
- labelMatches.push({
535
- start: match.start - pathLength,
536
- end: match.end - pathLength
537
- });
538
- }
539
- else if (match.end < pathLength) {
540
- descriptionMatches.push(match);
541
- }
542
- else {
543
- labelMatches.push({
544
- start: 0,
545
- end: match.end - pathLength
546
- });
547
- descriptionMatches.push({
548
- start: match.start,
549
- end: pathLength
550
- });
551
- }
552
- }
553
- return [labelMatches, descriptionMatches];
554
- }
555
560
  onDidColorThemeChange() {
556
561
  for (const [template, data] of this.renderedResources) {
557
562
  this.renderIcon(template, data);
@@ -610,11 +615,12 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
610
615
  static { HistoryItemGroupRenderer_1 = this; }
611
616
  static { this.TEMPLATE_ID = 'history-item-group'; }
612
617
  get templateId() { return HistoryItemGroupRenderer_1.TEMPLATE_ID; }
613
- constructor(actionRunner, contextKeyService, contextMenuService, keybindingService, menuService, scmViewService, telemetryService) {
618
+ constructor(actionRunner, contextKeyService, contextMenuService, keybindingService, commandService, menuService, scmViewService, telemetryService) {
614
619
  this.actionRunner = actionRunner;
615
620
  this.contextKeyService = contextKeyService;
616
621
  this.contextMenuService = contextMenuService;
617
622
  this.keybindingService = keybindingService;
623
+ this.commandService = commandService;
618
624
  this.menuService = menuService;
619
625
  this.scmViewService = scmViewService;
620
626
  this.telemetryService = telemetryService;
@@ -632,6 +638,7 @@ let HistoryItemGroupRenderer = class HistoryItemGroupRenderer {
632
638
  this.contextKeyService,
633
639
  this.contextMenuService,
634
640
  this.keybindingService,
641
+ this.commandService,
635
642
  this.telemetryService
636
643
  )));
637
644
  templateDisposables.add(toolBar);
@@ -677,9 +684,10 @@ HistoryItemGroupRenderer = HistoryItemGroupRenderer_1 = ( (__decorate([
677
684
  ( (__param(1, IContextKeyService))),
678
685
  ( (__param(2, IContextMenuService))),
679
686
  ( (__param(3, IKeybindingService))),
680
- ( (__param(4, IMenuService))),
681
- ( (__param(5, ISCMViewService))),
682
- ( (__param(6, ITelemetryService)))
687
+ ( (__param(4, ICommandService))),
688
+ ( (__param(5, IMenuService))),
689
+ ( (__param(6, ISCMViewService))),
690
+ ( (__param(7, ITelemetryService)))
683
691
  ], HistoryItemGroupRenderer)));
684
692
  class HistoryItemActionRunner extends ActionRunner {
685
693
  async runAction(action, context) {
@@ -691,8 +699,8 @@ class HistoryItemActionRunner extends ActionRunner {
691
699
  args.push({
692
700
  id: context.id,
693
701
  parentIds: context.parentIds,
694
- label: context.label,
695
- description: context.description,
702
+ message: context.message,
703
+ author: context.author,
696
704
  icon: context.icon,
697
705
  timestamp: context.timestamp,
698
706
  statistics: context.statistics,
@@ -704,15 +712,19 @@ let HistoryItemRenderer = class HistoryItemRenderer {
704
712
  static { HistoryItemRenderer_1 = this; }
705
713
  static { this.TEMPLATE_ID = 'history-item'; }
706
714
  get templateId() { return HistoryItemRenderer_1.TEMPLATE_ID; }
707
- constructor(actionRunner, actionViewItemProvider, scmViewService) {
715
+ constructor(actionRunner, actionViewItemProvider, hoverService, scmViewService) {
708
716
  this.actionRunner = actionRunner;
709
717
  this.actionViewItemProvider = actionViewItemProvider;
718
+ this.hoverService = hoverService;
710
719
  this.scmViewService = scmViewService;
711
720
  }
712
721
  renderTemplate(container) {
713
722
  container.parentElement.parentElement.querySelector('.monaco-tl-twistie').classList.add('force-twistie');
714
723
  const element = append(container, $('.history-item'));
715
- const iconLabel = ( (new IconLabel(element, { supportIcons: true })));
724
+ const iconLabel = ( (new IconLabel(
725
+ element,
726
+ { supportIcons: true, supportHighlights: true, supportDescriptionHighlights: true }
727
+ )));
716
728
  const iconContainer = prepend(iconLabel.element, $('.icon-container'));
717
729
  const disposables = ( (new DisposableStore()));
718
730
  const actionsContainer = append(element, $('.actions'));
@@ -725,7 +737,9 @@ let HistoryItemRenderer = class HistoryItemRenderer {
725
737
  const filesLabel = append(statsContainer, $('.files-label'));
726
738
  const insertionsLabel = append(statsContainer, $('.insertions-label'));
727
739
  const deletionsLabel = append(statsContainer, $('.deletions-label'));
728
- return { iconContainer, label: iconLabel, actionBar, statsContainer, filesLabel, insertionsLabel, deletionsLabel, elementDisposables: ( (new DisposableStore())), disposables };
740
+ const statsCustomHover = this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), statsContainer, '');
741
+ disposables.add(statsCustomHover);
742
+ return { iconContainer, label: iconLabel, actionBar, statsContainer, statsCustomHover, filesLabel, insertionsLabel, deletionsLabel, elementDisposables: ( (new DisposableStore())), disposables };
729
743
  }
730
744
  renderElement(node, index, templateData, height) {
731
745
  const historyItem = node.element;
@@ -733,7 +747,9 @@ let HistoryItemRenderer = class HistoryItemRenderer {
733
747
  if (historyItem.icon && ThemeIcon.isThemeIcon(historyItem.icon)) {
734
748
  templateData.iconContainer.classList.add(...ThemeIcon.asClassNameArray(historyItem.icon));
735
749
  }
736
- templateData.label.setLabel(historyItem.label, historyItem.description);
750
+ const title = this.getTooltip(historyItem);
751
+ const [matches, descriptionMatches] = this.processMatches(historyItem, node.filterData);
752
+ templateData.label.setLabel(historyItem.message, historyItem.author, { matches, descriptionMatches, title });
737
753
  templateData.actionBar.clear();
738
754
  templateData.actionBar.context = historyItem;
739
755
  const menus = this.scmViewService.menus.getRepositoryMenus(historyItem.historyItemGroup.repository.provider);
@@ -746,6 +762,27 @@ let HistoryItemRenderer = class HistoryItemRenderer {
746
762
  renderCompressedElements(node, index, templateData, height) {
747
763
  throw ( (new Error('Should never happen since node is incompressible')));
748
764
  }
765
+ getTooltip(historyItem) {
766
+ const markdown = ( (new MarkdownString('', { isTrusted: true, supportThemeIcons: true })));
767
+ if (historyItem.author) {
768
+ markdown.appendMarkdown(`$(account) **${historyItem.author}**\n\n`);
769
+ }
770
+ if (historyItem.timestamp) {
771
+ const dateFormatter = new Intl.DateTimeFormat(language, { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' });
772
+ markdown.appendMarkdown(`$(history) ${dateFormatter.format(historyItem.timestamp)}\n\n`);
773
+ }
774
+ markdown.appendMarkdown(historyItem.message);
775
+ return { markdown, markdownNotSupportedFallback: historyItem.message };
776
+ }
777
+ processMatches(historyItem, filterData) {
778
+ if (!filterData) {
779
+ return [undefined, undefined];
780
+ }
781
+ return [
782
+ historyItem.message === filterData.label ? createMatches(filterData.score) : undefined,
783
+ historyItem.author === filterData.label ? createMatches(filterData.score) : undefined
784
+ ];
785
+ }
749
786
  renderStatistics(node, index, templateData, height) {
750
787
  const historyItem = node.element;
751
788
  if (historyItem.statistics) {
@@ -764,10 +801,9 @@ let HistoryItemRenderer = class HistoryItemRenderer {
764
801
  historyItem.statistics.deletions === 1 ? ( localizeWithPath(_moduleId, 8, "{0} deletion{1}", historyItem.statistics.deletions, '(-)')) :
765
802
  historyItem.statistics.deletions > 1 ? ( localizeWithPath(_moduleId, 9, "{0} deletions{1}", historyItem.statistics.deletions, '(-)')) : ''
766
803
  ];
767
- const statsTitle = statsAriaLabel
768
- .filter(l => l !== '').join(', ');
769
- templateData.statsContainer.title = statsTitle;
804
+ const statsTitle = statsAriaLabel.filter(l => l !== '').join(', ');
770
805
  templateData.statsContainer.setAttribute('aria-label', statsTitle);
806
+ templateData.statsCustomHover.update(statsTitle);
771
807
  templateData.filesLabel.textContent = ( (historyItem.statistics.files.toString()));
772
808
  templateData.insertionsLabel.textContent = historyItem.statistics.insertions > 0 ? `+${historyItem.statistics.insertions}` : '';
773
809
  templateData.insertionsLabel.classList.toggle('hidden', historyItem.statistics.insertions === 0);
@@ -784,7 +820,8 @@ let HistoryItemRenderer = class HistoryItemRenderer {
784
820
  }
785
821
  };
786
822
  HistoryItemRenderer = HistoryItemRenderer_1 = ( (__decorate([
787
- ( (__param(2, ISCMViewService)))
823
+ ( (__param(2, IHoverService))),
824
+ ( (__param(3, ISCMViewService)))
788
825
  ], HistoryItemRenderer)));
789
826
  let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
790
827
  static { HistoryItemChangeRenderer_1 = this; }
@@ -807,15 +844,27 @@ let HistoryItemChangeRenderer = class HistoryItemChangeRenderer {
807
844
  const uri = ResourceTree.isResourceNode(historyItemChangeOrFolder) ? historyItemChangeOrFolder.element?.uri ?? historyItemChangeOrFolder.uri : historyItemChangeOrFolder.uri;
808
845
  const fileKind = ResourceTree.isResourceNode(historyItemChangeOrFolder) ? FileKind.FOLDER : FileKind.FILE;
809
846
  const hidePath = this.viewMode() === "tree" ;
810
- templateData.fileLabel.setFile(uri, { fileDecorations: { colors: false, badges: true }, fileKind, hidePath, });
847
+ let matches;
848
+ let descriptionMatches;
849
+ if (ResourceTree.isResourceNode(historyItemChangeOrFolder)) {
850
+ if (!historyItemChangeOrFolder.element) {
851
+ matches = createMatches(node.filterData);
852
+ }
853
+ }
854
+ else {
855
+ [matches, descriptionMatches] = processResourceFilterData(uri, node.filterData);
856
+ }
857
+ templateData.fileLabel.setFile(uri, { fileDecorations: { colors: false, badges: true }, fileKind, hidePath, matches, descriptionMatches });
811
858
  }
812
859
  renderCompressedElements(node, index, templateData, height) {
813
860
  const compressed = node.element;
814
861
  const folder = compressed.elements[compressed.elements.length - 1];
815
862
  const label = ( (compressed.elements.map(e => e.name)));
863
+ const matches = createMatches(node.filterData);
816
864
  templateData.fileLabel.setResource({ resource: folder.uri, name: label }, {
817
865
  fileDecorations: { colors: false, badges: true },
818
866
  fileKind: FileKind.FOLDER,
867
+ matches,
819
868
  separator: this.labelService.getSeparator(folder.uri.scheme)
820
869
  });
821
870
  }
@@ -830,10 +879,11 @@ let SeparatorRenderer = class SeparatorRenderer {
830
879
  static { SeparatorRenderer_1 = this; }
831
880
  static { this.TEMPLATE_ID = 'separator'; }
832
881
  get templateId() { return SeparatorRenderer_1.TEMPLATE_ID; }
833
- constructor(contextKeyService, contextMenuService, keybindingService, menuService, telemetryService) {
882
+ constructor(contextKeyService, contextMenuService, keybindingService, commandService, menuService, telemetryService) {
834
883
  this.contextKeyService = contextKeyService;
835
884
  this.contextMenuService = contextMenuService;
836
885
  this.keybindingService = keybindingService;
886
+ this.commandService = commandService;
837
887
  this.menuService = menuService;
838
888
  this.telemetryService = telemetryService;
839
889
  }
@@ -853,6 +903,7 @@ let SeparatorRenderer = class SeparatorRenderer {
853
903
  this.contextKeyService,
854
904
  this.contextMenuService,
855
905
  this.keybindingService,
906
+ this.commandService,
856
907
  this.telemetryService
857
908
  )));
858
909
  disposables.add(toolBar);
@@ -872,8 +923,9 @@ SeparatorRenderer = SeparatorRenderer_1 = ( (__decorate([
872
923
  ( (__param(0, IContextKeyService))),
873
924
  ( (__param(1, IContextMenuService))),
874
925
  ( (__param(2, IKeybindingService))),
875
- ( (__param(3, IMenuService))),
876
- ( (__param(4, ITelemetryService)))
926
+ ( (__param(3, ICommandService))),
927
+ ( (__param(4, IMenuService))),
928
+ ( (__param(5, ITelemetryService)))
877
929
  ], SeparatorRenderer)));
878
930
  class ListDelegate {
879
931
  constructor(inputRenderer) {
@@ -1040,7 +1092,7 @@ let SCMTreeKeyboardNavigationLabelProvider = class SCMTreeKeyboardNavigationLabe
1040
1092
  return element.label;
1041
1093
  }
1042
1094
  else if (isSCMHistoryItemTreeElement(element)) {
1043
- return element.label;
1095
+ return [element.message, element.author];
1044
1096
  }
1045
1097
  else if (isSCMViewSeparator(element)) {
1046
1098
  return element.label;
@@ -1150,7 +1202,7 @@ let SCMAccessibilityProvider = class SCMAccessibilityProvider {
1150
1202
  return element.ariaLabel ?? `${element.label.trim()}${element.description ? `, ${element.description}` : ''}`;
1151
1203
  }
1152
1204
  else if (isSCMHistoryItemTreeElement(element)) {
1153
- return `${stripIcons(element.label).trim()}${element.description ? `, ${element.description}` : ''}`;
1205
+ return `${stripIcons(element.message).trim()}${element.author ? `, ${element.author}` : ''}`;
1154
1206
  }
1155
1207
  else if (isSCMHistoryItemChangeTreeElement(element)) {
1156
1208
  const result = [basename(element.uri)];
@@ -1665,7 +1717,7 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
1665
1717
  get dropdownActions() { return this._dropdownActions; }
1666
1718
  get dropdownAction() { return this._dropdownAction; }
1667
1719
  constructor(container, options, menuService, contextKeyService, contextMenuService, commandService, keybindingService, storageService, telemetryService) {
1668
- super(container, { resetMenu: MenuId.SCMInputBox, ...options }, menuService, contextKeyService, contextMenuService, keybindingService, telemetryService);
1720
+ super(container, { resetMenu: MenuId.SCMInputBox, ...options }, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService);
1669
1721
  this.menuService = menuService;
1670
1722
  this.contextKeyService = contextKeyService;
1671
1723
  this.storageService = storageService;
@@ -1678,7 +1730,7 @@ let SCMInputWidgetToolbar = class SCMInputWidgetToolbar extends WorkbenchToolBar
1678
1730
  id: "scm.input.cancelAction" ,
1679
1731
  title: ( localizeWithPath(_moduleId, 32, "Cancel")),
1680
1732
  icon: Codicon.debugStop,
1681
- }, undefined, undefined, undefined, contextKeyService, commandService)));
1733
+ }, undefined, undefined, undefined, undefined, contextKeyService, commandService)));
1682
1734
  }
1683
1735
  setInput(input) {
1684
1736
  this.repositoryDisposables.clear();
@@ -1961,7 +2013,6 @@ let SCMInputWidget = class SCMInputWidget {
1961
2013
  this.contextMenuService = contextMenuService;
1962
2014
  this.disposables = ( (new DisposableStore()));
1963
2015
  this.repositoryDisposables = ( (new DisposableStore()));
1964
- this.validationDisposable = Disposable.None;
1965
2016
  this.validationHasFocus = false;
1966
2017
  this.lastLayoutWasTrash = false;
1967
2018
  this.shouldFocusAfterLayout = false;
@@ -1982,6 +2033,7 @@ let SCMInputWidget = class SCMInputWidget {
1982
2033
  ColorDetector.ID,
1983
2034
  ContextMenuController.ID,
1984
2035
  DragAndDropController.ID,
2036
+ CopyPasteController.ID,
1985
2037
  DropIntoEditorController.ID,
1986
2038
  LinkDetector.ID,
1987
2039
  MenuPreventer.ID,
@@ -1993,7 +2045,7 @@ let SCMInputWidget = class SCMInputWidget {
1993
2045
  InlineCompletionsController.ID,
1994
2046
  CodeActionController.ID,
1995
2047
  FormatOnType.ID,
1996
- EditorDictation.ID
2048
+ EditorDictation.ID,
1997
2049
  ])
1998
2050
  };
1999
2051
  const services = ( (new ServiceCollection([IContextKeyService, this.contextKeyService])));
@@ -2015,6 +2067,10 @@ let SCMInputWidget = class SCMInputWidget {
2015
2067
  }
2016
2068
  }, 0);
2017
2069
  }));
2070
+ this.disposables.add(this.inputEditor.onDidBlurEditorWidget(() => {
2071
+ CopyPasteController.get(this.inputEditor)?.clearWidgets();
2072
+ DropIntoEditorController.get(this.inputEditor)?.clearWidgets();
2073
+ }));
2018
2074
  const firstLineKey = this.contextKeyService.createKey('scmInputIsInFirstPosition', false);
2019
2075
  const lastLineKey = this.contextKeyService.createKey('scmInputIsInLastPosition', false);
2020
2076
  this.disposables.add(this.inputEditor.onDidChangeCursorPosition(({ position }) => {
@@ -2100,7 +2156,7 @@ let SCMInputWidget = class SCMInputWidget {
2100
2156
  return;
2101
2157
  }
2102
2158
  const disposables = ( (new DisposableStore()));
2103
- this.validationDisposable = this.contextViewService.showContextView({
2159
+ this.validationContextView = this.contextViewService.showContextView({
2104
2160
  getAnchor: () => this.element,
2105
2161
  render: container => {
2106
2162
  this.element.style.borderBottomLeftRadius = '0';
@@ -2175,7 +2231,8 @@ let SCMInputWidget = class SCMInputWidget {
2175
2231
  this.placeholderTextContainer.style.lineHeight = `${lineHeight}px`;
2176
2232
  }
2177
2233
  clearValidation() {
2178
- this.validationDisposable.dispose();
2234
+ this.validationContextView?.close();
2235
+ this.validationContextView = undefined;
2179
2236
  this.validationHasFocus = false;
2180
2237
  }
2181
2238
  dispose() {
@@ -2225,8 +2282,8 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2225
2282
  this.storageService.store(`scm.viewSortKey`, sortKey, 1 , 0 );
2226
2283
  }
2227
2284
  }
2228
- constructor(options, commandService, editorService, logService, menuService, scmService, scmViewService, storageService, uriIdentityService, keybindingService, themeService, contextMenuService, instantiationService, viewDescriptorService, configurationService, contextKeyService, openerService, telemetryService) {
2229
- super({ ...options, titleMenuId: MenuId.SCMTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
2285
+ constructor(options, commandService, editorService, logService, menuService, scmService, scmViewService, storageService, uriIdentityService, keybindingService, themeService, contextMenuService, instantiationService, viewDescriptorService, configurationService, contextKeyService, openerService, telemetryService, hoverService) {
2286
+ super({ ...options, titleMenuId: MenuId.SCMTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
2230
2287
  this.commandService = commandService;
2231
2288
  this.editorService = editorService;
2232
2289
  this.logService = logService;
@@ -2433,7 +2490,25 @@ let SCMViewPane = class SCMViewPane extends ViewPane {
2433
2490
  }
2434
2491
  else if (isSCMResource(e.element)) {
2435
2492
  if (e.element.command?.id === API_OPEN_EDITOR_COMMAND_ID || e.element.command?.id === API_OPEN_DIFF_EDITOR_COMMAND_ID) {
2436
- await this.commandService.executeCommand(e.element.command.id, ...(e.element.command.arguments || []), e);
2493
+ if (isPointerEvent(e.browserEvent) && e.browserEvent.button === 1) {
2494
+ const resourceGroup = e.element.resourceGroup;
2495
+ const title = `${resourceGroup.provider.label}: ${resourceGroup.label}`;
2496
+ await OpenScmGroupAction.openMultiFileDiffEditor(this.editorService, title, resourceGroup.provider.rootUri, resourceGroup.id, {
2497
+ ...e.editorOptions,
2498
+ viewState: {
2499
+ revealData: {
2500
+ resource: {
2501
+ original: e.element.multiDiffEditorOriginalUri,
2502
+ modified: e.element.multiDiffEditorModifiedUri,
2503
+ }
2504
+ }
2505
+ },
2506
+ preserveFocus: true,
2507
+ });
2508
+ }
2509
+ else {
2510
+ await this.commandService.executeCommand(e.element.command.id, ...(e.element.command.arguments || []), e);
2511
+ }
2437
2512
  }
2438
2513
  else {
2439
2514
  await e.element.open(!!e.editorOptions.preserveFocus);
@@ -2791,7 +2866,8 @@ SCMViewPane = ( (__decorate([
2791
2866
  ( (__param(14, IConfigurationService))),
2792
2867
  ( (__param(15, IContextKeyService))),
2793
2868
  ( (__param(16, IOpenerService))),
2794
- ( (__param(17, ITelemetryService)))
2869
+ ( (__param(17, ITelemetryService))),
2870
+ ( (__param(18, IHoverService)))
2795
2871
  ], SCMViewPane)));
2796
2872
  let SCMTreeDataSource = class SCMTreeDataSource {
2797
2873
  constructor(viewMode, configurationService, logService, scmViewService, uriIdentityService) {
@@ -2936,12 +3012,12 @@ let SCMTreeDataSource = class SCMTreeDataSource {
2936
3012
  }
2937
3013
  incomingHistoryItemGroup = currentHistoryItemGroup.base ? {
2938
3014
  id: currentHistoryItemGroup.base.id,
2939
- label: currentHistoryItemGroup.base.label,
3015
+ label: currentHistoryItemGroup.base.name,
2940
3016
  ariaLabel: ( localizeWithPath(
2941
3017
  _moduleId,
2942
3018
  40,
2943
3019
  "Incoming changes from {0}",
2944
- currentHistoryItemGroup.base.label
3020
+ currentHistoryItemGroup.base.name
2945
3021
  )),
2946
3022
  icon: Codicon.arrowCircleDown,
2947
3023
  direction: 'incoming',
@@ -2952,8 +3028,8 @@ let SCMTreeDataSource = class SCMTreeDataSource {
2952
3028
  } : undefined;
2953
3029
  outgoingHistoryItemGroup = {
2954
3030
  id: currentHistoryItemGroup.id,
2955
- label: currentHistoryItemGroup.label,
2956
- ariaLabel: ( localizeWithPath(_moduleId, 41, "Outgoing changes to {0}", currentHistoryItemGroup.label)),
3031
+ label: currentHistoryItemGroup.name,
3032
+ ariaLabel: ( localizeWithPath(_moduleId, 41, "Outgoing changes to {0}", currentHistoryItemGroup.name)),
2957
3033
  icon: Codicon.arrowCircleUp,
2958
3034
  direction: 'outgoing',
2959
3035
  ancestor: ancestor.id,
@@ -3004,7 +3080,7 @@ let SCMTreeDataSource = class SCMTreeDataSource {
3004
3080
  children.push({
3005
3081
  ...historyItemsElement[0],
3006
3082
  icon: historyItemsElement[0].icon ?? Codicon.files,
3007
- label: ( localizeWithPath(_moduleId, 42, "All Changes")),
3083
+ message: ( localizeWithPath(_moduleId, 42, "All Changes")),
3008
3084
  historyItemGroup: element,
3009
3085
  type: 'allChanges'
3010
3086
  });
@@ -14,6 +14,7 @@ import { binarySearch } from 'vscode/vscode/vs/base/common/arrays';
14
14
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
15
15
  import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
16
16
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
17
+ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
17
18
 
18
19
  function getProviderStorageKey(provider) {
19
20
  return `${provider.contextValue}:${provider.label}${provider.rootUri ? `:${( provider.rootUri.toString())}` : ''}`;
@@ -72,7 +73,7 @@ let SCMViewService = class SCMViewService {
72
73
  get focusedRepository() {
73
74
  return this._repositories.find(r => r.focused)?.repository;
74
75
  }
75
- constructor(scmService, contextKeyService, instantiationService, configurationService, storageService, workspaceContextService) {
76
+ constructor(scmService, contextKeyService, extensionService, instantiationService, configurationService, storageService, workspaceContextService) {
76
77
  this.configurationService = configurationService;
77
78
  this.storageService = storageService;
78
79
  this.workspaceContextService = workspaceContextService;
@@ -124,6 +125,10 @@ let SCMViewService = class SCMViewService {
124
125
  this.onDidAddRepository(repository);
125
126
  }
126
127
  storageService.onWillSaveState(this.onWillSaveState, this, this.disposables);
128
+ extensionService.onWillStop(() => {
129
+ this.onWillSaveState();
130
+ this.didFinishLoading = false;
131
+ }, this, this.disposables);
127
132
  }
128
133
  onDidAddRepository(repository) {
129
134
  if (!this.didFinishLoading) {
@@ -133,7 +138,7 @@ let SCMViewService = class SCMViewService {
133
138
  repository, discoveryTime: Date.now(), focused: false, selectionIndex: -1
134
139
  };
135
140
  let removed = Iterable.empty();
136
- if (this.previousState) {
141
+ if (this.previousState && !this.didFinishLoading) {
137
142
  const index = this.previousState.all.indexOf(getProviderStorageKey(repository.provider));
138
143
  if (index === -1) {
139
144
  const added = [];
@@ -272,8 +277,8 @@ let SCMViewService = class SCMViewService {
272
277
  }
273
278
  const all = ( this.repositories.map(r => getProviderStorageKey(r.provider)));
274
279
  const visible = ( this.visibleRepositories.map(r => all.indexOf(getProviderStorageKey(r.provider))));
275
- const raw = JSON.stringify({ all, sortKey: this._repositoriesSortKey, visible });
276
- this.storageService.store('scm:view:visibleRepositories', raw, 1 , 1 );
280
+ this.previousState = { all, sortKey: this._repositoriesSortKey, visible };
281
+ this.storageService.store('scm:view:visibleRepositories', JSON.stringify(this.previousState), 1 , 1 );
277
282
  }
278
283
  eventuallyFinishLoading() {
279
284
  this.finishLoading();
@@ -283,7 +288,6 @@ let SCMViewService = class SCMViewService {
283
288
  return;
284
289
  }
285
290
  this.didFinishLoading = true;
286
- this.previousState = undefined;
287
291
  }
288
292
  dispose() {
289
293
  this.disposables.dispose();
@@ -297,10 +301,11 @@ SCMViewService.__decorator = ( __decorate([
297
301
  SCMViewService = ( __decorate([
298
302
  ( __param(0, ISCMService)),
299
303
  ( __param(1, IContextKeyService)),
300
- ( __param(2, IInstantiationService)),
301
- ( __param(3, IConfigurationService)),
302
- ( __param(4, IStorageService)),
303
- ( __param(5, IWorkspaceContextService))
304
+ ( __param(2, IExtensionService)),
305
+ ( __param(3, IInstantiationService)),
306
+ ( __param(4, IConfigurationService)),
307
+ ( __param(5, IStorageService)),
308
+ ( __param(6, IWorkspaceContextService))
304
309
  ], SCMViewService));
305
310
 
306
311
  export { RepositoryContextKeys, SCMViewService };
@@ -117,5 +117,8 @@ function getActionViewItemProvider(instaService) {
117
117
  return createActionViewItem(instaService, action, options);
118
118
  };
119
119
  }
120
+ function getProviderKey(provider) {
121
+ return `${provider.contextValue}:${provider.label}${provider.rootUri ? `:${( provider.rootUri.toString())}` : ''}`;
122
+ }
120
123
 
121
- export { StatusBarAction, collectContextMenuActions, connectPrimaryMenu, connectPrimaryMenuToInlineActionBar, getActionViewItemProvider, isSCMActionButton, isSCMHistoryItemChangeNode, isSCMHistoryItemChangeTreeElement, isSCMHistoryItemGroupTreeElement, isSCMHistoryItemTreeElement, isSCMInput, isSCMRepository, isSCMResource, isSCMResourceGroup, isSCMResourceNode, isSCMViewSeparator, isSCMViewService, toDiffEditorArguments };
124
+ export { StatusBarAction, collectContextMenuActions, connectPrimaryMenu, connectPrimaryMenuToInlineActionBar, getActionViewItemProvider, getProviderKey, isSCMActionButton, isSCMHistoryItemChangeNode, isSCMHistoryItemChangeTreeElement, isSCMHistoryItemGroupTreeElement, isSCMHistoryItemTreeElement, isSCMInput, isSCMRepository, isSCMResource, isSCMResourceGroup, isSCMResourceNode, isSCMViewSeparator, isSCMViewService, toDiffEditorArguments };
@@ -0,0 +1,118 @@
1
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
+ import { Event } from 'vscode/vscode/vs/base/common/event';
3
+ import { DisposableMap, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
4
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
5
+ import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
6
+ import { getProviderKey } from './util.js';
7
+ import { ISCMService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm.service';
8
+ import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
9
+
10
+ let SCMWorkingSetController = class SCMWorkingSetController {
11
+ static { this.ID = 'workbench.contrib.scmWorkingSets'; }
12
+ constructor(configurationService, editorGroupsService, scmService, storageService) {
13
+ this.configurationService = configurationService;
14
+ this.editorGroupsService = editorGroupsService;
15
+ this.scmService = scmService;
16
+ this.storageService = storageService;
17
+ this._repositoryDisposables = ( new DisposableMap());
18
+ this._scmServiceDisposables = ( new DisposableStore());
19
+ this._disposables = ( new DisposableStore());
20
+ const onDidChangeConfiguration = Event.filter(configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('scm.workingSets.enabled'), this._disposables);
21
+ this._disposables.add(Event.runAndSubscribe(onDidChangeConfiguration, () => this._onDidChangeConfiguration()));
22
+ }
23
+ _onDidChangeConfiguration() {
24
+ if (!this.configurationService.getValue('scm.workingSets.enabled')) {
25
+ this.storageService.remove('scm.workingSets', 1 );
26
+ this._scmServiceDisposables.clear();
27
+ this._repositoryDisposables.clearAndDisposeAll();
28
+ return;
29
+ }
30
+ this._workingSets = this._loadWorkingSets();
31
+ this.scmService.onDidAddRepository(this._onDidAddRepository, this, this._scmServiceDisposables);
32
+ this.scmService.onDidRemoveRepository(this._onDidRemoveRepository, this, this._scmServiceDisposables);
33
+ for (const repository of this.scmService.repositories) {
34
+ this._onDidAddRepository(repository);
35
+ }
36
+ }
37
+ _onDidAddRepository(repository) {
38
+ const disposables = ( new DisposableStore());
39
+ disposables.add(Event.runAndSubscribe(repository.provider.onDidChangeHistoryProvider, () => {
40
+ if (!repository.provider.historyProvider) {
41
+ return;
42
+ }
43
+ disposables.add(Event.runAndSubscribe(repository.provider.historyProvider.onDidChangeCurrentHistoryItemGroup, async () => {
44
+ if (!repository.provider.historyProvider?.currentHistoryItemGroup?.id) {
45
+ return;
46
+ }
47
+ const providerKey = getProviderKey(repository.provider);
48
+ const currentHistoryItemGroupId = repository.provider.historyProvider.currentHistoryItemGroup.id;
49
+ const repositoryWorkingSets = this._workingSets.get(providerKey);
50
+ if (!repositoryWorkingSets) {
51
+ this._workingSets.set(providerKey, { currentHistoryItemGroupId, editorWorkingSets: ( new Map()) });
52
+ return;
53
+ }
54
+ if (repositoryWorkingSets.currentHistoryItemGroupId === currentHistoryItemGroupId) {
55
+ return;
56
+ }
57
+ this._saveWorkingSet(providerKey, currentHistoryItemGroupId, repositoryWorkingSets);
58
+ await this._restoreWorkingSet(providerKey, currentHistoryItemGroupId);
59
+ }));
60
+ }));
61
+ this._repositoryDisposables.set(repository, disposables);
62
+ }
63
+ _onDidRemoveRepository(repository) {
64
+ this._workingSets.delete(getProviderKey(repository.provider));
65
+ this._repositoryDisposables.deleteAndDispose(repository);
66
+ }
67
+ _loadWorkingSets() {
68
+ const workingSets = ( new Map());
69
+ const workingSetsRaw = this.storageService.get('scm.workingSets', 1 );
70
+ if (!workingSetsRaw) {
71
+ return workingSets;
72
+ }
73
+ for (const serializedWorkingSet of JSON.parse(workingSetsRaw)) {
74
+ workingSets.set(serializedWorkingSet.providerKey, {
75
+ currentHistoryItemGroupId: serializedWorkingSet.currentHistoryItemGroupId,
76
+ editorWorkingSets: ( new Map(serializedWorkingSet.editorWorkingSets))
77
+ });
78
+ }
79
+ return workingSets;
80
+ }
81
+ _saveWorkingSet(providerKey, currentHistoryItemGroupId, repositoryWorkingSets) {
82
+ const previousHistoryItemGroupId = repositoryWorkingSets.currentHistoryItemGroupId;
83
+ const editorWorkingSets = repositoryWorkingSets.editorWorkingSets;
84
+ const editorWorkingSet = this.editorGroupsService.saveWorkingSet(previousHistoryItemGroupId);
85
+ this._workingSets.set(providerKey, { currentHistoryItemGroupId, editorWorkingSets: editorWorkingSets.set(previousHistoryItemGroupId, editorWorkingSet) });
86
+ const workingSets = [];
87
+ for (const [providerKey, { currentHistoryItemGroupId, editorWorkingSets }] of this._workingSets) {
88
+ workingSets.push({ providerKey, currentHistoryItemGroupId, editorWorkingSets: [...editorWorkingSets] });
89
+ }
90
+ this.storageService.store('scm.workingSets', JSON.stringify(workingSets), 1 , 1 );
91
+ }
92
+ async _restoreWorkingSet(providerKey, currentHistoryItemGroupId) {
93
+ const workingSets = this._workingSets.get(providerKey);
94
+ if (!workingSets) {
95
+ return;
96
+ }
97
+ let editorWorkingSetId = workingSets.editorWorkingSets.get(currentHistoryItemGroupId);
98
+ if (!editorWorkingSetId && this.configurationService.getValue('scm.workingSets.default') === 'empty') {
99
+ editorWorkingSetId = 'empty';
100
+ }
101
+ if (editorWorkingSetId) {
102
+ await this.editorGroupsService.applyWorkingSet(editorWorkingSetId);
103
+ }
104
+ }
105
+ dispose() {
106
+ this._repositoryDisposables.dispose();
107
+ this._scmServiceDisposables.dispose();
108
+ this._disposables.dispose();
109
+ }
110
+ };
111
+ SCMWorkingSetController = ( __decorate([
112
+ ( __param(0, IConfigurationService)),
113
+ ( __param(1, IEditorGroupsService)),
114
+ ( __param(2, ISCMService)),
115
+ ( __param(3, IStorageService))
116
+ ], SCMWorkingSetController));
117
+
118
+ export { SCMWorkingSetController };