monaco-editor-core 0.55.0-dev-20251021 → 0.55.0-dev-20251022
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/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +17 -5
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/iconLabel/iconlabel.css +2 -3
- package/esm/vs/base/common/codiconsLibrary.js +1 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/policy.js +40 -1
- package/esm/vs/base/common/policy.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +1 -1
- package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js +4 -4
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +1 -1
- package/esm/vs/editor/browser/coreCommands.js +3 -3
- package/esm/vs/editor/browser/editorExtensions.js +9 -9
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/updatableHoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js +4 -4
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +14 -14
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +7 -7
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +54 -54
- package/esm/vs/editor/common/config/editorOptions.js +406 -406
- package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
- package/esm/vs/editor/common/editorContextKeys.js +46 -46
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +10 -10
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +18 -51
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +35 -28
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/package.json +2 -2
- package/version.txt +1 -1
|
@@ -1,2 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { localize } from '../../nls.js';
|
|
6
|
+
export var PolicyCategory;
|
|
7
|
+
(function (PolicyCategory) {
|
|
8
|
+
PolicyCategory["Extensions"] = "Extensions";
|
|
9
|
+
PolicyCategory["IntegratedTerminal"] = "IntegratedTerminal";
|
|
10
|
+
PolicyCategory["InteractiveSession"] = "InteractiveSession";
|
|
11
|
+
PolicyCategory["Telemetry"] = "Telemetry";
|
|
12
|
+
PolicyCategory["Update"] = "Update";
|
|
13
|
+
})(PolicyCategory || (PolicyCategory = {}));
|
|
14
|
+
export const PolicyCategoryData = {
|
|
15
|
+
[PolicyCategory.Extensions]: {
|
|
16
|
+
name: {
|
|
17
|
+
key: 'extensionsConfigurationTitle', value: localize(55, "Extensions"),
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
[PolicyCategory.IntegratedTerminal]: {
|
|
21
|
+
name: {
|
|
22
|
+
key: 'terminalIntegratedConfigurationTitle', value: localize(56, "Integrated Terminal"),
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
[PolicyCategory.InteractiveSession]: {
|
|
26
|
+
name: {
|
|
27
|
+
key: 'interactiveSessionConfigurationTitle', value: localize(57, "Chat"),
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
[PolicyCategory.Telemetry]: {
|
|
31
|
+
name: {
|
|
32
|
+
key: 'telemetryConfigurationTitle', value: localize(58, "Telemetry"),
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
[PolicyCategory.Update]: {
|
|
36
|
+
name: {
|
|
37
|
+
key: 'updateConfigurationTitle', value: localize(59, "Update"),
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
2
41
|
//# sourceMappingURL=policy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","
|
|
1
|
+
{"version":3,"sources":["vs/base/common/policy.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQxC,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACzB,2CAAyB,CAAA;IACzB,2DAAyC,CAAA;IACzC,2DAAyC,CAAA;IACzC,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AAClB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAED,MAAM,CAAC,MAAM,kBAAkB,GAE3B;IACH,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE;QAC5B,IAAI,EAAE;YACL,GAAG,EAAE,8BAA8B,EAAE,KAAK,EAAE,QAAQ,CAAC,EAA8B,EAAE,YAAY,CAAC;SAClG;KACD;IACD,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE;QACpC,IAAI,EAAE;YACL,GAAG,EAAE,sCAAsC,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAsC,EAAE,qBAAqB,CAAC;SAC3H;KACD;IACD,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE;QACpC,IAAI,EAAE;YACL,GAAG,EAAE,sCAAsC,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAsC,EAAE,MAAM,CAAC;SAC5G;KACD;IACD,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE;QAC3B,IAAI,EAAE;YACL,GAAG,EAAE,6BAA6B,EAAE,KAAK,EAAE,QAAQ,CAAC,EAA6B,EAAE,WAAW,CAAC;SAC/F;KACD;IACD,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;QACxB,IAAI,EAAE;YACL,GAAG,EAAE,0BAA0B,EAAE,KAAK,EAAE,QAAQ,CAAC,EAA0B,EAAE,QAAQ,CAAC;SACtF;KACD;CACD,CAAC","file":"policy.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { localize } from '../../nls.js';\n\nexport type PolicyName = string;\nexport type LocalizedValue = {\n\tkey: string;\n\tvalue: string;\n};\n\nexport enum PolicyCategory {\n\tExtensions = 'Extensions',\n\tIntegratedTerminal = 'IntegratedTerminal',\n\tInteractiveSession = 'InteractiveSession',\n\tTelemetry = 'Telemetry',\n\tUpdate = 'Update',\n}\n\nexport const PolicyCategoryData: {\n\t[key in PolicyCategory]: { name: LocalizedValue }\n} = {\n\t[PolicyCategory.Extensions]: {\n\t\tname: {\n\t\t\tkey: 'extensionsConfigurationTitle', value: localize('extensionsConfigurationTitle', \"Extensions\"),\n\t\t}\n\t},\n\t[PolicyCategory.IntegratedTerminal]: {\n\t\tname: {\n\t\t\tkey: 'terminalIntegratedConfigurationTitle', value: localize('terminalIntegratedConfigurationTitle', \"Integrated Terminal\"),\n\t\t}\n\t},\n\t[PolicyCategory.InteractiveSession]: {\n\t\tname: {\n\t\t\tkey: 'interactiveSessionConfigurationTitle', value: localize('interactiveSessionConfigurationTitle', \"Chat\"),\n\t\t}\n\t},\n\t[PolicyCategory.Telemetry]: {\n\t\tname: {\n\t\t\tkey: 'telemetryConfigurationTitle', value: localize('telemetryConfigurationTitle', \"Telemetry\"),\n\t\t}\n\t},\n\t[PolicyCategory.Update]: {\n\t\tname: {\n\t\t\tkey: 'updateConfigurationTitle', value: localize('updateConfigurationTitle', \"Update\"),\n\t\t}\n\t}\n};\n\nexport interface IPolicy {\n\n\t/**\n\t * The policy name.\n\t */\n\treadonly name: PolicyName;\n}\n"]}
|
|
@@ -90,7 +90,7 @@ let ScreenReaderSupport = class ScreenReaderSupport extends Disposable {
|
|
|
90
90
|
this._domNode.domNode.setAttribute('aria-required', options.get(9 /* EditorOption.ariaRequired */) ? 'true' : 'false');
|
|
91
91
|
this._domNode.domNode.setAttribute('aria-multiline', 'true');
|
|
92
92
|
this._domNode.domNode.setAttribute('aria-autocomplete', options.get(104 /* EditorOption.readOnly */) ? 'none' : 'both');
|
|
93
|
-
this._domNode.domNode.setAttribute('aria-roledescription', localize(
|
|
93
|
+
this._domNode.domNode.setAttribute('aria-roledescription', localize(60, "editor"));
|
|
94
94
|
this._domNode.domNode.setAttribute('aria-label', ariaLabelForScreenReaderContent(options, this._keybindingService));
|
|
95
95
|
const tabSize = this._context.viewModel.model.getOptions().tabSize;
|
|
96
96
|
const spaceWidth = options.get(59 /* EditorOption.fontInfo */).spaceWidth;
|
|
@@ -77,15 +77,15 @@ export function ariaLabelForScreenReaderContent(options, keybindingService) {
|
|
|
77
77
|
const toggleKeybindingLabel = keybindingService.lookupKeybinding('editor.action.toggleScreenReaderAccessibilityMode')?.getAriaLabel();
|
|
78
78
|
const runCommandKeybindingLabel = keybindingService.lookupKeybinding('workbench.action.showCommands')?.getAriaLabel();
|
|
79
79
|
const keybindingEditorKeybindingLabel = keybindingService.lookupKeybinding('workbench.action.openGlobalKeybindings')?.getAriaLabel();
|
|
80
|
-
const editorNotAccessibleMessage = nls.localize(
|
|
80
|
+
const editorNotAccessibleMessage = nls.localize(61, "The editor is not accessible at this time.");
|
|
81
81
|
if (toggleKeybindingLabel) {
|
|
82
|
-
return nls.localize(
|
|
82
|
+
return nls.localize(62, "{0} To enable screen reader optimized mode, use {1}", editorNotAccessibleMessage, toggleKeybindingLabel);
|
|
83
83
|
}
|
|
84
84
|
else if (runCommandKeybindingLabel) {
|
|
85
|
-
return nls.localize(
|
|
85
|
+
return nls.localize(63, "{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.", editorNotAccessibleMessage, runCommandKeybindingLabel);
|
|
86
86
|
}
|
|
87
87
|
else if (keybindingEditorKeybindingLabel) {
|
|
88
|
-
return nls.localize(
|
|
88
|
+
return nls.localize(64, "{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.", editorNotAccessibleMessage, keybindingEditorKeybindingLabel);
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
// SOS
|
|
@@ -131,7 +131,7 @@ let TextAreaEditContext = class TextAreaEditContext extends AbstractEditContext
|
|
|
131
131
|
this.textArea.setAttribute('aria-required', options.get(9 /* EditorOption.ariaRequired */) ? 'true' : 'false');
|
|
132
132
|
this.textArea.setAttribute('tabindex', String(options.get(140 /* EditorOption.tabIndex */)));
|
|
133
133
|
this.textArea.setAttribute('role', 'textbox');
|
|
134
|
-
this.textArea.setAttribute('aria-roledescription', nls.localize(
|
|
134
|
+
this.textArea.setAttribute('aria-roledescription', nls.localize(65, "editor"));
|
|
135
135
|
this.textArea.setAttribute('aria-multiline', 'true');
|
|
136
136
|
this.textArea.setAttribute('aria-autocomplete', options.get(104 /* EditorOption.readOnly */) ? 'none' : 'both');
|
|
137
137
|
this._ensureReadOnlyAttribute();
|
|
@@ -860,7 +860,7 @@ export var CoreNavigationCommands;
|
|
|
860
860
|
type: 'object',
|
|
861
861
|
properties: {
|
|
862
862
|
'sticky': {
|
|
863
|
-
description: nls.localize(
|
|
863
|
+
description: nls.localize(66, "Stick to the end even when going to longer lines"),
|
|
864
864
|
type: 'boolean',
|
|
865
865
|
default: false
|
|
866
866
|
}
|
|
@@ -888,7 +888,7 @@ export var CoreNavigationCommands;
|
|
|
888
888
|
type: 'object',
|
|
889
889
|
properties: {
|
|
890
890
|
'sticky': {
|
|
891
|
-
description: nls.localize(
|
|
891
|
+
description: nls.localize(67, "Stick to the end even when going to longer lines"),
|
|
892
892
|
type: 'boolean',
|
|
893
893
|
default: false
|
|
894
894
|
}
|
|
@@ -1436,7 +1436,7 @@ export var CoreNavigationCommands;
|
|
|
1436
1436
|
viewModel.getPrimaryCursorState()
|
|
1437
1437
|
]);
|
|
1438
1438
|
viewModel.revealAllCursors(args.source, true);
|
|
1439
|
-
status(nls.localize(
|
|
1439
|
+
status(nls.localize(68, "Removed secondary cursors"));
|
|
1440
1440
|
}
|
|
1441
1441
|
});
|
|
1442
1442
|
CoreNavigationCommands.RevealLine = registerEditorCommand(new class extends CoreEditorCommand {
|
|
@@ -412,17 +412,17 @@ export const UndoCommand = registerCommand(new MultiCommand({
|
|
|
412
412
|
menuOpts: [{
|
|
413
413
|
menuId: MenuId.MenubarEditMenu,
|
|
414
414
|
group: '1_do',
|
|
415
|
-
title: nls.localize(
|
|
415
|
+
title: nls.localize(69, "&&Undo"),
|
|
416
416
|
order: 1
|
|
417
417
|
}, {
|
|
418
418
|
menuId: MenuId.CommandPalette,
|
|
419
419
|
group: '',
|
|
420
|
-
title: nls.localize(
|
|
420
|
+
title: nls.localize(70, "Undo"),
|
|
421
421
|
order: 1
|
|
422
422
|
}, {
|
|
423
423
|
menuId: MenuId.SimpleEditorContext,
|
|
424
424
|
group: '1_do',
|
|
425
|
-
title: nls.localize(
|
|
425
|
+
title: nls.localize(71, "Undo"),
|
|
426
426
|
order: 1
|
|
427
427
|
}]
|
|
428
428
|
}));
|
|
@@ -439,17 +439,17 @@ export const RedoCommand = registerCommand(new MultiCommand({
|
|
|
439
439
|
menuOpts: [{
|
|
440
440
|
menuId: MenuId.MenubarEditMenu,
|
|
441
441
|
group: '1_do',
|
|
442
|
-
title: nls.localize(
|
|
442
|
+
title: nls.localize(72, "&&Redo"),
|
|
443
443
|
order: 2
|
|
444
444
|
}, {
|
|
445
445
|
menuId: MenuId.CommandPalette,
|
|
446
446
|
group: '',
|
|
447
|
-
title: nls.localize(
|
|
447
|
+
title: nls.localize(73, "Redo"),
|
|
448
448
|
order: 1
|
|
449
449
|
}, {
|
|
450
450
|
menuId: MenuId.SimpleEditorContext,
|
|
451
451
|
group: '1_do',
|
|
452
|
-
title: nls.localize(
|
|
452
|
+
title: nls.localize(74, "Redo"),
|
|
453
453
|
order: 2
|
|
454
454
|
}]
|
|
455
455
|
}));
|
|
@@ -465,17 +465,17 @@ export const SelectAllCommand = registerCommand(new MultiCommand({
|
|
|
465
465
|
menuOpts: [{
|
|
466
466
|
menuId: MenuId.MenubarSelectionMenu,
|
|
467
467
|
group: '1_basic',
|
|
468
|
-
title: nls.localize(
|
|
468
|
+
title: nls.localize(75, "&&Select All"),
|
|
469
469
|
order: 1
|
|
470
470
|
}, {
|
|
471
471
|
menuId: MenuId.CommandPalette,
|
|
472
472
|
group: '',
|
|
473
|
-
title: nls.localize(
|
|
473
|
+
title: nls.localize(76, "Select All"),
|
|
474
474
|
order: 1
|
|
475
475
|
}, {
|
|
476
476
|
menuId: MenuId.SimpleEditorContext,
|
|
477
477
|
group: '9_select',
|
|
478
|
-
title: nls.localize(
|
|
478
|
+
title: nls.localize(77, "Select All"),
|
|
479
479
|
order: 1
|
|
480
480
|
}]
|
|
481
481
|
}));
|
|
@@ -83,7 +83,7 @@ let ViewGpuContext = class ViewGpuContext extends Disposable {
|
|
|
83
83
|
if (!ViewGpuContext_1.device) {
|
|
84
84
|
ViewGpuContext_1.device = GPULifecycle.requestDevice((message) => {
|
|
85
85
|
const choices = [{
|
|
86
|
-
label: nls.localize(
|
|
86
|
+
label: nls.localize(78, "Use DOM-based rendering"),
|
|
87
87
|
run: () => this.configurationService.updateValue('editor.experimentalGpuAcceleration', 'off'),
|
|
88
88
|
}];
|
|
89
89
|
this._notificationService.prompt(Severity.Warning, message, choices);
|
|
@@ -197,7 +197,7 @@ let HoverWidget = class HoverWidget extends Widget {
|
|
|
197
197
|
if (options.appearance?.showHoverHint) {
|
|
198
198
|
const statusBarElement = $('div.hover-row.status-bar');
|
|
199
199
|
const infoElement = $('div.info');
|
|
200
|
-
infoElement.textContent = localize(
|
|
200
|
+
infoElement.textContent = localize(79, 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');
|
|
201
201
|
statusBarElement.appendChild(infoElement);
|
|
202
202
|
this._hover.containerDomNode.appendChild(statusBarElement);
|
|
203
203
|
}
|
|
@@ -47,7 +47,7 @@ export class ManagedHoverWidget {
|
|
|
47
47
|
if (managedContent instanceof Promise) {
|
|
48
48
|
// show 'Loading' if no hover is up yet
|
|
49
49
|
if (!this._hoverWidget) {
|
|
50
|
-
this.show(localize(
|
|
50
|
+
this.show(localize(80, "Loading..."), focus, options);
|
|
51
51
|
}
|
|
52
52
|
resolvedContent = await managedContent;
|
|
53
53
|
}
|
|
@@ -24,7 +24,7 @@ import { IQuickInputService } from '../../../platform/quickinput/common/quickInp
|
|
|
24
24
|
import { IStorageService } from '../../../platform/storage/common/storage.js';
|
|
25
25
|
import { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';
|
|
26
26
|
export const IInlineCompletionsService = createDecorator('IInlineCompletionsService');
|
|
27
|
-
const InlineCompletionsSnoozing = new RawContextKey('inlineCompletions.snoozed', false, localize(
|
|
27
|
+
const InlineCompletionsSnoozing = new RawContextKey('inlineCompletions.snoozed', false, localize(81, "Whether inline completions are currently snoozed"));
|
|
28
28
|
let InlineCompletionsService = class InlineCompletionsService extends Disposable {
|
|
29
29
|
get snoozeTimeLeft() {
|
|
30
30
|
if (this._snoozeTimeEnd === undefined) {
|
|
@@ -111,7 +111,7 @@ export class SnoozeInlineCompletion extends Action2 {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: SnoozeInlineCompletion.ID,
|
|
114
|
-
title: localize2(
|
|
114
|
+
title: localize2(83, "Snooze Inline Suggestions"),
|
|
115
115
|
precondition: ContextKeyExpr.true(),
|
|
116
116
|
f1: true,
|
|
117
117
|
});
|
|
@@ -142,7 +142,7 @@ export class SnoozeInlineCompletion extends Action2 {
|
|
|
142
142
|
{ label: '60 minutes', id: '60', value: 3_600_000 }
|
|
143
143
|
];
|
|
144
144
|
const picked = await quickInputService.pick(items, {
|
|
145
|
-
placeHolder: localize(
|
|
145
|
+
placeHolder: localize(82, "Select snooze duration for Inline Suggestions"),
|
|
146
146
|
activeItem: items.find(item => item.value === lastSelectedDuration),
|
|
147
147
|
});
|
|
148
148
|
if (picked) {
|
|
@@ -157,7 +157,7 @@ export class CancelSnoozeInlineCompletion extends Action2 {
|
|
|
157
157
|
constructor() {
|
|
158
158
|
super({
|
|
159
159
|
id: CancelSnoozeInlineCompletion.ID,
|
|
160
|
-
title: localize2(
|
|
160
|
+
title: localize2(84, "Cancel Snooze Inline Suggestions"),
|
|
161
161
|
precondition: InlineCompletionsSnoozing,
|
|
162
162
|
f1: true,
|
|
163
163
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/browser/services/inlineCompletionsService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,6CAA6C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AACtH,OAAO,EAAqB,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAoB,MAAM,yDAAyD,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAkB,MAAM,mDAAmD,CAAC;AACvG,OAAO,EAAE,eAAe,EAA+B,MAAM,6CAA6C,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAA4B,2BAA2B,CAAC,CAAC;AA4BjH,MAAM,yBAAyB,GAAG,IAAI,aAAa,CAAU,2BAA2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AAY,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;SACnD,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE;YAClD,WAAW,EAAE,QAAQ,CAAC,EAAoB,EAAE,qDAAqD,CAAC;YAClG,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,oBAAoB,CAAC;SACnE,CAAC,CAAC;QAEH,IAAI,MAAM,EAAE,CAAC;YACZ,cAAc,CAAC,KAAK,CAAC,wBAAwB,EAAE,MAAM,CAAC,KAAK,2DAA2C,CAAC;YACvG,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { TimeoutTimer } from '../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\treadonly onDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: TimeoutTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new TimeoutTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMs: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMs = args[0] * 60_000;\n\t\t}\n\n\t\tif (!durationMs) {\n\t\t\tdurationMs = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMs) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMs);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Code completions and NES\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/browser/services/inlineCompletionsService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,6CAA6C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AACtH,OAAO,EAAqB,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAoB,MAAM,yDAAyD,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAkB,MAAM,mDAAmD,CAAC;AACvG,OAAO,EAAE,eAAe,EAA+B,MAAM,6CAA6C,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AAEpF,MAAM,CAAC,MAAM,yBAAy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AK,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;YACnD,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;SACnD,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE;YAClD,WAAW,EAAE,QAAQ,CAAC,EAAoB,EAAE,+CAA+C,CAAC;YAC5F,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,oBAAoB,CAAC;SACnE,CAAC,CAAC;QAEH,IAAI,MAAM,EAAE,CAAC;YACZ,cAAc,CAAC,KAAK,CAAC,wBAAwB,EAAE,MAAM,CAAC,KAAK,2DAA2C,CAAC;YACvG,OAAO,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;;AAGF,MAAM,OAAO,4BAA6B,SAAQ,OAAO;aAC1C,OAAE,GAAG,2BAA2B,CAAC;IAC/C;QACC,KAAK,CAAC;YACL,EAAE,EAAE,4BAA4B,CAAC,EAAE;YACnC,KAAK,EAAE,SAAS,CAAC,EAAmC,EAAE,kCAAkC,CAAC;YACzF,YAAY,EAAE,yBAAyB;YACvC,EAAE,EAAE,IAAI;SACR,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,QAA0B;QAC1C,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC","file":"inlineCompletionsService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { TimeoutTimer } from '../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../base/common/errors.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { localize, localize2 } from '../../../nls.js';\nimport { Action2 } from '../../../platform/actions/common/actions.js';\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\nimport { InstantiationType, registerSingleton } from '../../../platform/instantiation/common/extensions.js';\nimport { createDecorator, ServicesAccessor } from '../../../platform/instantiation/common/instantiation.js';\nimport { IQuickInputService, IQuickPickItem } from '../../../platform/quickinput/common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js';\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\n\nexport const IInlineCompletionsService = createDecorator<IInlineCompletionsService>('IInlineCompletionsService');\n\nexport interface IInlineCompletionsService {\n\treadonly _serviceBrand: undefined;\n\n\treadonly onDidChangeIsSnoozing: Event<boolean>;\n\n\t/**\n\t * Snooze inline completions for the specified duration. If already snoozed, overwrite the existing snooze time.\n\t */\n\tsetSnoozeDuration(durationMs: number): void;\n\n\t/**\n\t * Check if inline completions are currently snoozed.\n\t*/\n\tisSnoozing(): boolean;\n\n\t/**\n\t * Cancel the current snooze.\n\t*/\n\tcancelSnooze(): void;\n\n\t/**\n\t * Report an inline completion.\n\t */\n\treportNewCompletion(requestUuid: string): void;\n}\n\nconst InlineCompletionsSnoozing = new RawContextKey<boolean>('inlineCompletions.snoozed', false, localize('inlineCompletions.snoozed', \"Whether inline completions are currently snoozed\"));\n\nexport class InlineCompletionsService extends Disposable implements IInlineCompletionsService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _onDidChangeIsSnoozing = this._register(new Emitter<boolean>());\n\treadonly onDidChangeIsSnoozing: Event<boolean> = this._onDidChangeIsSnoozing.event; // 5 minutes\n\n\tprivate _snoozeTimeEnd: undefined | number = undefined;\n\tget snoozeTimeLeft(): number {\n\t\tif (this._snoozeTimeEnd === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, this._snoozeTimeEnd - Date.now());\n\t}\n\n\tprivate _timer: TimeoutTimer;\n\n\tconstructor(\n\t\t@IContextKeyService private _contextKeyService: IContextKeyService,\n\t\t@ITelemetryService private _telemetryService: ITelemetryService,\n\t) {\n\t\tsuper();\n\n\t\tthis._timer = this._register(new TimeoutTimer());\n\n\t\tconst inlineCompletionsSnoozing = InlineCompletionsSnoozing.bindTo(this._contextKeyService);\n\t\tthis._register(this.onDidChangeIsSnoozing(() => inlineCompletionsSnoozing.set(this.isSnoozing())));\n\t}\n\n\tsetSnoozeDuration(durationMs: number): void {\n\t\tif (durationMs < 0) {\n\t\t\tthrow new BugIndicatingError(`Invalid snooze duration: ${durationMs}. Duration must be non-negative.`);\n\t\t}\n\t\tif (durationMs === 0) {\n\t\t\tthis.cancelSnooze();\n\t\t\treturn;\n\t\t}\n\n\t\tconst wasSnoozing = this.isSnoozing();\n\t\tconst timeLeft = this.snoozeTimeLeft;\n\n\t\tthis._snoozeTimeEnd = Date.now() + durationMs;\n\n\t\tif (!wasSnoozing) {\n\t\t\tthis._onDidChangeIsSnoozing.fire(true);\n\t\t}\n\n\t\tthis._timer.cancelAndSet(\n\t\t\t() => {\n\t\t\t\tif (!this.isSnoozing()) {\n\t\t\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new BugIndicatingError('Snooze timer did not fire as expected');\n\t\t\t\t}\n\t\t\t},\n\t\t\tthis.snoozeTimeLeft + 1,\n\t\t);\n\n\t\tthis._reportSnooze(durationMs - timeLeft, durationMs);\n\t}\n\n\tisSnoozing(): boolean {\n\t\treturn this.snoozeTimeLeft > 0;\n\t}\n\n\tcancelSnooze(): void {\n\t\tif (this.isSnoozing()) {\n\t\t\tthis._reportSnooze(-this.snoozeTimeLeft, 0);\n\t\t\tthis._snoozeTimeEnd = undefined;\n\t\t\tthis._timer.cancel();\n\t\t\tthis._onDidChangeIsSnoozing.fire(false);\n\t\t}\n\t}\n\n\tprivate _lastCompletionId: string | undefined;\n\tprivate _recentCompletionIds: string[] = [];\n\treportNewCompletion(requestUuid: string): void {\n\t\tthis._lastCompletionId = requestUuid;\n\n\t\tthis._recentCompletionIds.unshift(requestUuid);\n\t\tif (this._recentCompletionIds.length > 5) {\n\t\t\tthis._recentCompletionIds.pop();\n\t\t}\n\t}\n\n\tprivate _reportSnooze(deltaMs: number, totalMs: number): void {\n\t\tconst deltaSeconds = Math.round(deltaMs / 1000);\n\t\tconst totalSeconds = Math.round(totalMs / 1000);\n\t\ttype WorkspaceStatsClassification = {\n\t\t\towner: 'benibenj';\n\t\t\tcomment: 'Snooze duration for inline completions';\n\t\t\tdeltaSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration by which the snooze has changed, in seconds.' };\n\t\t\ttotalSeconds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The total duration for which inline completions are snoozed, in seconds.' };\n\t\t\tlastCompletionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The ID of the last completion.' };\n\t\t\trecentCompletionIds: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The IDs of the recent completions.' };\n\t\t};\n\t\ttype WorkspaceStatsEvent = {\n\t\t\tdeltaSeconds: number;\n\t\t\ttotalSeconds: number;\n\t\t\tlastCompletionId: string | undefined;\n\t\t\trecentCompletionIds: string[];\n\t\t};\n\t\tthis._telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('inlineCompletions.snooze', {\n\t\t\tdeltaSeconds,\n\t\t\ttotalSeconds,\n\t\t\tlastCompletionId: this._lastCompletionId,\n\t\t\trecentCompletionIds: this._recentCompletionIds,\n\t\t});\n\t}\n}\n\nregisterSingleton(IInlineCompletionsService, InlineCompletionsService, InstantiationType.Delayed);\n\nconst snoozeInlineSuggestId = 'editor.action.inlineSuggest.snooze';\nconst cancelSnoozeInlineSuggestId = 'editor.action.inlineSuggest.cancelSnooze';\nconst LAST_SNOOZE_DURATION_KEY = 'inlineCompletions.lastSnoozeDuration';\n\nexport class SnoozeInlineCompletion extends Action2 {\n\tpublic static ID = snoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: SnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.snooze', \"Snooze Inline Suggestions\"),\n\t\t\tprecondition: ContextKeyExpr.true(),\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor, ...args: unknown[]): Promise<void> {\n\t\tconst quickInputService = accessor.get(IQuickInputService);\n\t\tconst inlineCompletionsService = accessor.get(IInlineCompletionsService);\n\t\tconst storageService = accessor.get(IStorageService);\n\n\t\tlet durationMs: number | undefined;\n\t\tif (args.length > 0 && typeof args[0] === 'number') {\n\t\t\tdurationMs = args[0] * 60_000;\n\t\t}\n\n\t\tif (!durationMs) {\n\t\t\tdurationMs = await this.getDurationFromUser(quickInputService, storageService);\n\t\t}\n\n\t\tif (durationMs) {\n\t\t\tinlineCompletionsService.setSnoozeDuration(durationMs);\n\t\t}\n\t}\n\n\tprivate async getDurationFromUser(quickInputService: IQuickInputService, storageService: IStorageService): Promise<number | undefined> {\n\t\tconst lastSelectedDuration = storageService.getNumber(LAST_SNOOZE_DURATION_KEY, StorageScope.PROFILE, 300_000);\n\n\t\tconst items: (IQuickPickItem & { value: number })[] = [\n\t\t\t{ label: '1 minute', id: '1', value: 60_000 },\n\t\t\t{ label: '5 minutes', id: '5', value: 300_000 },\n\t\t\t{ label: '10 minutes', id: '10', value: 600_000 },\n\t\t\t{ label: '15 minutes', id: '15', value: 900_000 },\n\t\t\t{ label: '30 minutes', id: '30', value: 1_800_000 },\n\t\t\t{ label: '60 minutes', id: '60', value: 3_600_000 }\n\t\t];\n\n\t\tconst picked = await quickInputService.pick(items, {\n\t\t\tplaceHolder: localize('snooze.placeholder', \"Select snooze duration for Inline Suggestions\"),\n\t\t\tactiveItem: items.find(item => item.value === lastSelectedDuration),\n\t\t});\n\n\t\tif (picked) {\n\t\t\tstorageService.store(LAST_SNOOZE_DURATION_KEY, picked.value, StorageScope.PROFILE, StorageTarget.USER);\n\t\t\treturn picked.value;\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n\nexport class CancelSnoozeInlineCompletion extends Action2 {\n\tpublic static ID = cancelSnoozeInlineSuggestId;\n\tconstructor() {\n\t\tsuper({\n\t\t\tid: CancelSnoozeInlineCompletion.ID,\n\t\t\ttitle: localize2('action.inlineSuggest.cancelSnooze', \"Cancel Snooze Inline Suggestions\"),\n\t\t\tprecondition: InlineCompletionsSnoozing,\n\t\t\tf1: true,\n\t\t});\n\t}\n\n\tpublic async run(accessor: ServicesAccessor): Promise<void> {\n\t\taccessor.get(IInlineCompletionsService).cancelSnooze();\n\t}\n}\n"]}
|
|
@@ -1278,7 +1278,7 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
1278
1278
|
case 7 /* OutgoingViewModelEventKind.CursorStateChanged */: {
|
|
1279
1279
|
if (e.reachedMaxCursorCount) {
|
|
1280
1280
|
const multiCursorLimit = this.getOption(89 /* EditorOption.multiCursorLimit */);
|
|
1281
|
-
const message = nls.localize(
|
|
1281
|
+
const message = nls.localize(85, "The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.", multiCursorLimit);
|
|
1282
1282
|
this._notificationService.prompt(Severity.Warning, message, [
|
|
1283
1283
|
{
|
|
1284
1284
|
label: 'Find and Replace',
|
|
@@ -1287,7 +1287,7 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
},
|
|
1289
1289
|
{
|
|
1290
|
-
label: nls.localize(
|
|
1290
|
+
label: nls.localize(86, 'Increase Multi Cursor Limit'),
|
|
1291
1291
|
run: () => {
|
|
1292
1292
|
this._commandService.executeCommand('workbench.action.openSettings2', {
|
|
1293
1293
|
query: 'editor.multiCursorLimit'
|
|
@@ -17,7 +17,7 @@ export class ToggleCollapseUnchangedRegions extends Action2 {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super({
|
|
19
19
|
id: 'diffEditor.toggleCollapseUnchangedRegions',
|
|
20
|
-
title: localize2(
|
|
20
|
+
title: localize2(87, 'Toggle Collapse Unchanged Regions'),
|
|
21
21
|
icon: Codicon.map,
|
|
22
22
|
toggled: ContextKeyExpr.has('config.diffEditor.hideUnchangedRegions.enabled'),
|
|
23
23
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
@@ -39,7 +39,7 @@ export class ToggleShowMovedCodeBlocks extends Action2 {
|
|
|
39
39
|
constructor() {
|
|
40
40
|
super({
|
|
41
41
|
id: 'diffEditor.toggleShowMovedCodeBlocks',
|
|
42
|
-
title: localize2(
|
|
42
|
+
title: localize2(88, 'Toggle Show Moved Code Blocks'),
|
|
43
43
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -53,7 +53,7 @@ export class ToggleUseInlineViewWhenSpaceIsLimited extends Action2 {
|
|
|
53
53
|
constructor() {
|
|
54
54
|
super({
|
|
55
55
|
id: 'diffEditor.toggleUseInlineViewWhenSpaceIsLimited',
|
|
56
|
-
title: localize2(
|
|
56
|
+
title: localize2(89, 'Toggle Use Inline View When Space Is Limited'),
|
|
57
57
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -63,12 +63,12 @@ export class ToggleUseInlineViewWhenSpaceIsLimited extends Action2 {
|
|
|
63
63
|
configurationService.updateValue('diffEditor.useInlineViewWhenSpaceIsLimited', newValue);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
const diffEditorCategory = localize2(
|
|
66
|
+
const diffEditorCategory = localize2(90, "Diff Editor");
|
|
67
67
|
export class SwitchSide extends EditorAction2 {
|
|
68
68
|
constructor() {
|
|
69
69
|
super({
|
|
70
70
|
id: 'diffEditor.switchSide',
|
|
71
|
-
title: localize2(
|
|
71
|
+
title: localize2(91, 'Switch Side'),
|
|
72
72
|
icon: Codicon.arrowSwap,
|
|
73
73
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
74
74
|
f1: true,
|
|
@@ -92,7 +92,7 @@ export class ExitCompareMove extends EditorAction2 {
|
|
|
92
92
|
constructor() {
|
|
93
93
|
super({
|
|
94
94
|
id: 'diffEditor.exitCompareMove',
|
|
95
|
-
title: localize2(
|
|
95
|
+
title: localize2(92, 'Exit Compare Move'),
|
|
96
96
|
icon: Codicon.close,
|
|
97
97
|
precondition: EditorContextKeys.comparingMovedCode,
|
|
98
98
|
f1: false,
|
|
@@ -114,7 +114,7 @@ export class CollapseAllUnchangedRegions extends EditorAction2 {
|
|
|
114
114
|
constructor() {
|
|
115
115
|
super({
|
|
116
116
|
id: 'diffEditor.collapseAllUnchangedRegions',
|
|
117
|
-
title: localize2(
|
|
117
|
+
title: localize2(93, 'Collapse All Unchanged Regions'),
|
|
118
118
|
icon: Codicon.fold,
|
|
119
119
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
120
120
|
f1: true,
|
|
@@ -132,7 +132,7 @@ export class ShowAllUnchangedRegions extends EditorAction2 {
|
|
|
132
132
|
constructor() {
|
|
133
133
|
super({
|
|
134
134
|
id: 'diffEditor.showAllUnchangedRegions',
|
|
135
|
-
title: localize2(
|
|
135
|
+
title: localize2(94, 'Show All Unchanged Regions'),
|
|
136
136
|
icon: Codicon.unfold,
|
|
137
137
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
138
138
|
f1: true,
|
|
@@ -150,7 +150,7 @@ export class RevertHunkOrSelection extends Action2 {
|
|
|
150
150
|
constructor() {
|
|
151
151
|
super({
|
|
152
152
|
id: 'diffEditor.revert',
|
|
153
|
-
title: localize2(
|
|
153
|
+
title: localize2(95, 'Revert'),
|
|
154
154
|
f1: true,
|
|
155
155
|
category: diffEditorCategory,
|
|
156
156
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
@@ -174,13 +174,13 @@ export class RevertHunkOrSelection extends Action2 {
|
|
|
174
174
|
return undefined;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
const accessibleDiffViewerCategory = localize2(
|
|
177
|
+
const accessibleDiffViewerCategory = localize2(96, "Accessible Diff Viewer");
|
|
178
178
|
export class AccessibleDiffViewerNext extends Action2 {
|
|
179
179
|
static { this.id = 'editor.action.accessibleDiffViewer.next'; }
|
|
180
180
|
constructor() {
|
|
181
181
|
super({
|
|
182
182
|
id: AccessibleDiffViewerNext.id,
|
|
183
|
-
title: localize2(
|
|
183
|
+
title: localize2(97, 'Go to Next Difference'),
|
|
184
184
|
category: accessibleDiffViewerCategory,
|
|
185
185
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
186
186
|
keybinding: {
|
|
@@ -200,7 +200,7 @@ export class AccessibleDiffViewerPrev extends Action2 {
|
|
|
200
200
|
constructor() {
|
|
201
201
|
super({
|
|
202
202
|
id: AccessibleDiffViewerPrev.id,
|
|
203
|
-
title: localize2(
|
|
203
|
+
title: localize2(98, 'Go to Previous Difference'),
|
|
204
204
|
category: accessibleDiffViewerCategory,
|
|
205
205
|
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
|
206
206
|
keybinding: {
|
|
@@ -38,9 +38,9 @@ import { IInstantiationService } from '../../../../../platform/instantiation/com
|
|
|
38
38
|
import { registerIcon } from '../../../../../platform/theme/common/iconRegistry.js';
|
|
39
39
|
import './accessibleDiffViewer.css';
|
|
40
40
|
import { toAction } from '../../../../../base/common/actions.js';
|
|
41
|
-
const accessibleDiffViewerInsertIcon = registerIcon('diff-review-insert', Codicon.add, localize(
|
|
42
|
-
const accessibleDiffViewerRemoveIcon = registerIcon('diff-review-remove', Codicon.remove, localize(
|
|
43
|
-
const accessibleDiffViewerCloseIcon = registerIcon('diff-review-close', Codicon.close, localize(
|
|
41
|
+
const accessibleDiffViewerInsertIcon = registerIcon('diff-review-insert', Codicon.add, localize(99, 'Icon for \'Insert\' in accessible diff viewer.'));
|
|
42
|
+
const accessibleDiffViewerRemoveIcon = registerIcon('diff-review-remove', Codicon.remove, localize(100, 'Icon for \'Remove\' in accessible diff viewer.'));
|
|
43
|
+
const accessibleDiffViewerCloseIcon = registerIcon('diff-review-close', Codicon.close, localize(101, 'Icon for \'Close\' in accessible diff viewer.'));
|
|
44
44
|
let AccessibleDiffViewer = class AccessibleDiffViewer extends Disposable {
|
|
45
45
|
static { this._ttPolicy = createTrustedTypesPolicy('diffReview', { createHTML: value => value }); }
|
|
46
46
|
constructor(_parentNode, _visible, _setVisible, _canClose, _width, _height, _diffs, _models, _instantiationService) {
|
|
@@ -298,7 +298,7 @@ let View = class View extends Disposable {
|
|
|
298
298
|
if (this._model.canClose.read(reader)) {
|
|
299
299
|
this._actionBar.push(toAction({
|
|
300
300
|
id: 'diffreview.close',
|
|
301
|
-
label: localize(
|
|
301
|
+
label: localize(102, "Close"),
|
|
302
302
|
class: 'close-diff-review ' + ThemeIcon.asClassName(accessibleDiffViewerCloseIcon),
|
|
303
303
|
enabled: true,
|
|
304
304
|
run: async () => _model.close()
|
|
@@ -357,7 +357,7 @@ let View = class View extends Disposable {
|
|
|
357
357
|
const container = document.createElement('div');
|
|
358
358
|
container.className = 'diff-review-table';
|
|
359
359
|
container.setAttribute('role', 'list');
|
|
360
|
-
container.setAttribute('aria-label', localize(
|
|
360
|
+
container.setAttribute('aria-label', localize(103, 'Accessible Diff Viewer. Use arrow up and down to navigate.'));
|
|
361
361
|
applyFontInfo(container, modifiedOptions.get(59 /* EditorOption.fontInfo */));
|
|
362
362
|
reset(this._content, container);
|
|
363
363
|
const originalModel = this._models.getOriginalModel();
|
|
@@ -381,12 +381,12 @@ let View = class View extends Disposable {
|
|
|
381
381
|
const r = group.range;
|
|
382
382
|
const diffIndex = this._model.currentGroupIndex.get();
|
|
383
383
|
const diffsLength = this._model.groups.get().length;
|
|
384
|
-
const getAriaLines = (lines) => lines === 0 ? localize(
|
|
385
|
-
: lines === 1 ? localize(
|
|
386
|
-
: localize(
|
|
384
|
+
const getAriaLines = (lines) => lines === 0 ? localize(104, "no lines changed")
|
|
385
|
+
: lines === 1 ? localize(105, "1 line changed")
|
|
386
|
+
: localize(106, "{0} lines changed", lines);
|
|
387
387
|
const originalChangedLinesCntAria = getAriaLines(r.original.length);
|
|
388
388
|
const modifiedChangedLinesCntAria = getAriaLines(r.modified.length);
|
|
389
|
-
header.setAttribute('aria-label', localize(
|
|
389
|
+
header.setAttribute('aria-label', localize(107, "Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}", (diffIndex + 1), diffsLength, r.original.startLineNumber, originalChangedLinesCntAria, r.modified.startLineNumber, modifiedChangedLinesCntAria));
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
|
|
@@ -506,23 +506,23 @@ let View = class View extends Disposable {
|
|
|
506
506
|
lineContent = originalModel.getLineContent(item.originalLineNumber);
|
|
507
507
|
}
|
|
508
508
|
if (lineContent.length === 0) {
|
|
509
|
-
lineContent = localize(
|
|
509
|
+
lineContent = localize(108, "blank");
|
|
510
510
|
}
|
|
511
511
|
let ariaLabel = '';
|
|
512
512
|
switch (item.type) {
|
|
513
513
|
case LineType.Unchanged:
|
|
514
514
|
if (item.originalLineNumber === item.modifiedLineNumber) {
|
|
515
|
-
ariaLabel = localize(
|
|
515
|
+
ariaLabel = localize(109, "{0} unchanged line {1}", lineContent, item.originalLineNumber);
|
|
516
516
|
}
|
|
517
517
|
else {
|
|
518
|
-
ariaLabel = localize(
|
|
518
|
+
ariaLabel = localize(110, "{0} original line {1} modified line {2}", lineContent, item.originalLineNumber, item.modifiedLineNumber);
|
|
519
519
|
}
|
|
520
520
|
break;
|
|
521
521
|
case LineType.Added:
|
|
522
|
-
ariaLabel = localize(
|
|
522
|
+
ariaLabel = localize(111, "+ {0} modified line {1}", lineContent, item.modifiedLineNumber);
|
|
523
523
|
break;
|
|
524
524
|
case LineType.Deleted:
|
|
525
|
-
ariaLabel = localize(
|
|
525
|
+
ariaLabel = localize(112, "- {0} original line {1}", lineContent, item.originalLineNumber);
|
|
526
526
|
break;
|
|
527
527
|
}
|
|
528
528
|
row.setAttribute('aria-label', ariaLabel);
|