monaco-editor-core 0.53.0-dev-20250903 → 0.53.0-dev-20250904

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.
Files changed (46) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.de.js +2 -2
  3. package/esm/nls.messages.es.js +2 -2
  4. package/esm/nls.messages.fr.js +2 -2
  5. package/esm/nls.messages.it.js +2 -2
  6. package/esm/nls.messages.ja.js +2 -2
  7. package/esm/nls.messages.js +1 -1
  8. package/esm/nls.messages.json +1 -1
  9. package/esm/nls.messages.ko.js +2 -2
  10. package/esm/nls.messages.ru.js +2 -2
  11. package/esm/nls.messages.zh-cn.js +2 -2
  12. package/esm/nls.messages.zh-tw.js +2 -2
  13. package/esm/nls.metadata.json +2 -0
  14. package/esm/vs/editor/common/core/edits/stringEdit.js +1 -1
  15. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  16. package/esm/vs/platform/contextkey/common/contextkeys.js +2 -1
  17. package/esm/vs/platform/contextkey/common/contextkeys.js.map +1 -1
  18. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  19. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  20. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  21. package/esm/vs/platform/list/browser/listService.js +27 -27
  22. package/esm/vs/platform/markers/common/markerService.js +2 -2
  23. package/esm/vs/platform/markers/common/markers.js +6 -6
  24. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
  25. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  26. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  27. package/esm/vs/platform/quickinput/browser/quickInputActions.js +3 -3
  28. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  29. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  30. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  31. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  32. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  33. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  34. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  35. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  36. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  37. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  38. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  39. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  40. package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
  41. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  42. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  43. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  44. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  45. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  46. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/core/edits/stringEdit.ts","vs/editor/common/core/edits/stringEdit.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGtD,MAAM,OAAgB,cAAmJ,SAAQ,QAAkB;IAE3L,KAAK,CAAC,IAAY;QACxB,MAAM,UAAU,GAAa,EAAE,CAAC;QAChC,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,E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CAAC,MAAM,CAAC,CAAC;YAC/B,CAAC;YAED,2CAA2C;YAC3C,qEAAqE;YACrE,6BAA6B;YAC7B,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;YAEzD,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC;QAED,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;IACpD,CAAC;IAED,OAAO,IAAI,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,CAAC,EAAE,CAAC;YACR,MAAM;QACP,CAAC;QACD,YAAY,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC","file":"stringEdit.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 { commonPrefixLength, commonSuffixLength } from '../../../../base/common/strings.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\nimport { BaseEdit, BaseReplacement } from './edit.js';\n\n\nexport abstract class BaseStringEdit<T extends BaseStringReplacement<T> = BaseStringReplacement<any>, TEdit extends BaseStringEdit<T, TEdit> = BaseStringEdit<any, any>> extends BaseEdit<T, TEdit> {\n\n\tpublic apply(base: string): string {\n\t\tconst resultText: string[] = [];\n\t\tlet pos = 0;\n\t\tfor (const edit of this.replacements) {\n\t\t\tresultText.push(base.substring(pos, edit.replaceRange.start));\n\t\t\tresultText.push(edit.newText);\n\t\t\tpos = edit.replaceRange.endExclusive;\n\t\t}\n\t\tresultText.push(base.substring(pos));\n\t\treturn resultText.join('');\n\t}\n}\n\nexport abstract class BaseStringReplacement<T extends BaseStringReplacement<T> = BaseStringReplacement<any>> extends BaseReplacement<T> {\n\tconstructor(\n\t\trange: OffsetRange,\n\t\tpublic readonly newText: string\n\t) {\n\t\tsuper(range);\n\t}\n\n\tgetNewLength(): number { return this.newText.length; }\n\n\toverride toString(): string {\n\t\treturn `${this.replaceRange} -> \"${this.newText}\"`;\n\t}\n\n\treplace(str: string): string {\n\t\treturn str.substring(0, this.replaceRange.start) + this.newText + str.substring(this.replaceRange.endExclusive);\n\t}\n\n\tremoveCommonSuffixPrefix(originalText: string): StringReplacement {\n\t\tconst oldText = originalText.substring(this.replaceRange.start, this.replaceRange.endExclusive);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tconst suffixLen = Math.min(\n\t\t\toldText.length - prefixLen,\n\t\t\tthis.newText.length - prefixLen,\n\t\t\tcommonSuffixLength(oldText, this.newText)\n\t\t);\n\n\t\tconst replaceRange = new OffsetRange(\n\t\t\tthis.replaceRange.start + prefixLen,\n\t\t\tthis.replaceRange.endExclusive - suffixLen,\n\t\t);\n\t\tconst newText = this.newText.substring(prefixLen, this.newText.length - suffixLen);\n\n\t\treturn new StringReplacement(replaceRange, newText);\n\t}\n\n\tpublic removeCommonSuffixAndPrefix(source: string): T {\n\t\treturn this.removeCommonSuffix(source).removeCommonPrefix(source);\n\t}\n\n\tpublic removeCommonPrefix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tif (prefixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\n\t\treturn this.slice(this.replaceRange.deltaStart(prefixLen), new OffsetRange(prefixLen, this.newText.length));\n\t}\n\n\tpublic removeCommonSuffix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst suffixLen = commonSuffixLength(oldText, this.newText);\n\t\tif (suffixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\t\treturn this.slice(this.replaceRange.deltaEnd(-suffixLen), new OffsetRange(0, this.newText.length - suffixLen));\n\t}\n\n\tpublic toJson(): ISerializedStringReplacement {\n\t\treturn ({\n\t\t\ttxt: this.newText,\n\t\t\tpos: this.replaceRange.start,\n\t\t\tlen: this.replaceRange.length,\n\t\t});\n\t}\n}\n\n\n/**\n * Represents a set of replacements to a string.\n * All these replacements are applied at once.\n*/\nexport class StringEdit extends BaseStringEdit<StringReplacement, StringEdit> {\n\tpublic static readonly empty = new StringEdit([]);\n\n\tpublic static compose(edits: readonly StringEdit[]): StringEdit {\n\t\tif (edits.length === 0) {\n\t\t\treturn StringEdit.empty;\n\t\t}\n\t\tlet result = edits[0];\n\t\tfor (let i = 1; i < edits.length; i++) {\n\t\t\tresult = result.compose(edits[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\tconstructor(replacements: readonly StringReplacement[]) {\n\t\tsuper(replacements);\n\t}\n\n\tprotected override _createNew(replacements: readonly StringReplacement[]): StringEdit {\n\t\treturn new StringEdit(replacements);\n\t}\n}\n\n/**\n * Warning: Be careful when changing this type, as it is used for serialization!\n*/\nexport interface ISerializedStringReplacement {\n\ttxt: string;\n\tpos: number;\n\tlen: number;\n}\n\nexport class StringReplacement extends BaseStringReplacement<StringReplacement> {\n\tpublic static insert(offset: number, text: string): StringReplacement {\n\t\treturn new StringReplacement(OffsetRange.emptyAt(offset), text);\n\t}\n\n\tpublic static replace(range: OffsetRange, text: string): StringReplacement {\n\t\treturn new StringReplacement(range, text);\n\t}\n\n\toverride equals(other: StringReplacement): boolean {\n\t\treturn this.replaceRange.equals(other.replaceRange) && this.newText === other.newText;\n\t}\n\n\toverride tryJoinTouching(other: StringReplacement): StringReplacement | undefined {\n\t\treturn new StringReplacement(this.replaceRange.joinRightTouching(other.replaceRange), this.newText + other.newText);\n\t}\n\n\toverride slice(range: OffsetRange, rangeInReplacement?: OffsetRange): StringReplacement {\n\t\treturn new StringReplacement(range, rangeInReplacement ? rangeInReplacement.substring(this.newText) : this.newText);\n\t}\n}\n\nexport function applyEditsToRanges(sortedRanges: OffsetRange[], edit: StringEdit): OffsetRange[] {\n\tsortedRanges = sortedRanges.slice();\n\n\t// treat edits as deletion of the replace range and then as insertion that extends the first range\n\tconst result: OffsetRange[] = [];\n\n\tlet offset = 0;\n\n\tfor (const e of edit.replacements) {\n\t\twhile (true) {\n\t\t\t// ranges before the current edit\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || r.endExclusive >= e.replaceRange.start) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tresult.push(r.delta(offset));\n\t\t}\n\n\t\tconst intersecting: OffsetRange[] = [];\n\t\twhile (true) {\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || !r.intersectsOrTouches(e.replaceRange)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tintersecting.push(r);\n\t\t}\n\n\t\tfor (let i = intersecting.length - 1; i >= 0; i--) {\n\t\t\tlet r = intersecting[i];\n\n\t\t\tconst overlap = r.intersect(e.replaceRange)!.length;\n\t\t\tr = r.deltaEnd(-overlap + (i === 0 ? e.newText.length : 0));\n\n\t\t\tconst rangeAheadOfReplaceRange = r.start - e.replaceRange.start;\n\t\t\tif (rangeAheadOfReplaceRange > 0) {\n\t\t\t\tr = r.delta(-rangeAheadOfReplaceRange);\n\t\t\t}\n\n\t\t\tif (i !== 0) {\n\t\t\t\tr = r.delta(e.newText.length);\n\t\t\t}\n\n\t\t\t// We already took our offset into account.\n\t\t\t// Because we add r back to the queue (which then adds offset again),\n\t\t\t// we have to remove it here.\n\t\t\tr = r.delta(-(e.newText.length - e.replaceRange.length));\n\n\t\t\tsortedRanges.unshift(r);\n\t\t}\n\n\t\toffset += e.newText.length - e.replaceRange.length;\n\t}\n\n\twhile (true) {\n\t\tconst r = sortedRanges[0];\n\t\tif (!r) {\n\t\t\tbreak;\n\t\t}\n\t\tsortedRanges.shift();\n\t\tresult.push(r.delta(offset));\n\t}\n\n\treturn result;\n}\n\n","/*---------------------------------------------------------------------------------------------\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 { commonPrefixLength, commonSuffixLength } from '../../../../base/common/strings.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\nimport { BaseEdit, BaseReplacement } from './edit.js';\n\n\nexport abstract class BaseStringEdit<T extends BaseStringReplacement<T> = BaseStringReplacement<any>, TEdit extends BaseStringEdit<T, TEdit> = BaseStringEdit<any, any>> extends BaseEdit<T, TEdit> {\n\n\tpublic apply(base: string): string {\n\t\tconst resultText: string[] = [];\n\t\tlet pos = 0;\n\t\tfor (const edit of this.replacements) {\n\t\t\tresultText.push(base.substring(pos, edit.replaceRange.start));\n\t\t\tresultText.push(edit.newText);\n\t\t\tpos = edit.replaceRange.endExclusive;\n\t\t}\n\t\tresultText.push(base.substring(pos));\n\t\treturn resultText.join('');\n\t}\n}\n\nexport abstract class BaseStringReplacement<T extends BaseStringReplacement<T> = BaseStringReplacement<any>> extends BaseReplacement<T> {\n\tconstructor(\n\t\trange: OffsetRange,\n\t\tpublic readonly newText: string\n\t) {\n\t\tsuper(range);\n\t}\n\n\tgetNewLength(): number { return this.newText.length; }\n\n\toverride toString(): string {\n\t\treturn `${this.replaceRange} -> \"${this.newText}\"`;\n\t}\n\n\treplace(str: string): string {\n\t\treturn str.substring(0, this.replaceRange.start) + this.newText + str.substring(this.replaceRange.endExclusive);\n\t}\n\n\tremoveCommonSuffixPrefix(originalText: string): StringReplacement {\n\t\tconst oldText = originalText.substring(this.replaceRange.start, this.replaceRange.endExclusive);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tconst suffixLen = Math.min(\n\t\t\toldText.length - prefixLen,\n\t\t\tthis.newText.length - prefixLen,\n\t\t\tcommonSuffixLength(oldText, this.newText)\n\t\t);\n\n\t\tconst replaceRange = new OffsetRange(\n\t\t\tthis.replaceRange.start + prefixLen,\n\t\t\tthis.replaceRange.endExclusive - suffixLen,\n\t\t);\n\t\tconst newText = this.newText.substring(prefixLen, this.newText.length - suffixLen);\n\n\t\treturn new StringReplacement(replaceRange, newText);\n\t}\n\n\tpublic removeCommonSuffixAndPrefix(source: string): T {\n\t\treturn this.removeCommonSuffix(source).removeCommonPrefix(source);\n\t}\n\n\tpublic removeCommonPrefix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tif (prefixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\n\t\treturn this.slice(this.replaceRange.deltaStart(prefixLen), new OffsetRange(prefixLen, this.newText.length));\n\t}\n\n\tpublic removeCommonSuffix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst suffixLen = commonSuffixLength(oldText, this.newText);\n\t\tif (suffixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\t\treturn this.slice(this.replaceRange.deltaEnd(-suffixLen), new OffsetRange(0, this.newText.length - suffixLen));\n\t}\n\n\tpublic toJson(): ISerializedStringReplacement {\n\t\treturn ({\n\t\t\ttxt: this.newText,\n\t\t\tpos: this.replaceRange.start,\n\t\t\tlen: this.replaceRange.length,\n\t\t});\n\t}\n}\n\n\n/**\n * Represents a set of replacements to a string.\n * All these replacements are applied at once.\n*/\nexport class StringEdit extends BaseStringEdit<StringReplacement, StringEdit> {\n\tpublic static readonly empty = new StringEdit([]);\n\n\tpublic static compose(edits: readonly StringEdit[]): StringEdit {\n\t\tif (edits.length === 0) {\n\t\t\treturn StringEdit.empty;\n\t\t}\n\t\tlet result = edits[0];\n\t\tfor (let i = 1; i < edits.length; i++) {\n\t\t\tresult = result.compose(edits[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\tconstructor(replacements: readonly StringReplacement[]) {\n\t\tsuper(replacements);\n\t}\n\n\tprotected override _createNew(replacements: readonly StringReplacement[]): StringEdit {\n\t\treturn new StringEdit(replacements);\n\t}\n}\n\n/**\n * Warning: Be careful when changing this type, as it is used for serialization!\n*/\nexport interface ISerializedStringReplacement {\n\ttxt: string;\n\tpos: number;\n\tlen: number;\n}\n\nexport class StringReplacement extends BaseStringReplacement<StringReplacement> {\n\tpublic static insert(offset: number, text: string): StringReplacement {\n\t\treturn new StringReplacement(OffsetRange.emptyAt(offset), text);\n\t}\n\n\tpublic static replace(range: OffsetRange, text: string): StringReplacement {\n\t\treturn new StringReplacement(range, text);\n\t}\n\n\toverride equals(other: StringReplacement): boolean {\n\t\treturn this.replaceRange.equals(other.replaceRange) && this.newText === other.newText;\n\t}\n\n\toverride tryJoinTouching(other: StringReplacement): StringReplacement | undefined {\n\t\treturn new StringReplacement(this.replaceRange.joinRightTouching(other.replaceRange), this.newText + other.newText);\n\t}\n\n\toverride slice(range: OffsetRange, rangeInReplacement?: OffsetRange): StringReplacement {\n\t\treturn new StringReplacement(range, rangeInReplacement ? rangeInReplacement.substring(this.newText) : this.newText);\n\t}\n}\n\nexport function applyEditsToRanges(sortedRanges: OffsetRange[], edit: StringEdit): OffsetRange[] {\n\tsortedRanges = sortedRanges.slice();\n\n\t// treat edits as deletion of the replace range and then as insertion that extends the first range\n\tconst result: OffsetRange[] = [];\n\n\tlet offset = 0;\n\n\tfor (const e of edit.replacements) {\n\t\twhile (true) {\n\t\t\t// ranges before the current edit\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || r.endExclusive >= e.replaceRange.start) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tresult.push(r.delta(offset));\n\t\t}\n\n\t\tconst intersecting: OffsetRange[] = [];\n\t\twhile (true) {\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || !r.intersectsOrTouches(e.replaceRange)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tintersecting.push(r);\n\t\t}\n\n\t\tfor (let i = intersecting.length - 1; i >= 0; i--) {\n\t\t\tlet r = intersecting[i];\n\n\t\t\tconst overlap = r.intersect(e.replaceRange)!.length;\n\t\t\tr = r.deltaEnd(-overlap + (i === 0 ? e.newText.length : 0));\n\n\t\t\tconst rangeAheadOfReplaceRange = r.start - e.replaceRange.start;\n\t\t\tif (rangeAheadOfReplaceRange > 0) {\n\t\t\t\tr = r.delta(-rangeAheadOfReplaceRange);\n\t\t\t}\n\n\t\t\tif (i !== 0) {\n\t\t\t\tr = r.delta(e.newText.length);\n\t\t\t}\n\n\t\t\t// We already took our offset into account.\n\t\t\t// Because we add r back to the queue (which then adds offset again),\n\t\t\t// we have to remove it here.\n\t\t\tr = r.delta(-(e.newText.length - e.replaceRange.length));\n\n\t\t\tsortedRanges.unshift(r);\n\t\t}\n\n\t\toffset += e.newText.length - e.replaceRange.length;\n\t}\n\n\twhile (true) {\n\t\tconst r = sortedRanges[0];\n\t\tif (!r) {\n\t\t\tbreak;\n\t\t}\n\t\tsortedRanges.shift();\n\t\tresult.push(r.delta(offset));\n\t}\n\n\treturn result;\n}\n\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/core/edits/stringEdit.ts","vs/editor/common/core/edits/stringEdit.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGtD,MAAM,OAAgB,cAAmJ,SAAQ,QAAkB;IAE3L,KAAK,CAAC,IAAY;QACxB,MAAM,UAAU,GAAa,EAAE,CAAC;QAChC,IAAI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CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,CAAC,CAAC;YACxC,CAAC;YAED,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACb,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC/B,CAAC;YAED,2CAA2C;YAC3C,qEAAqE;YACrE,6BAA6B;YAC7B,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;YAEzD,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC;QAED,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;IACpD,CAAC;IAED,OAAO,IAAI,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,CAAC,EAAE,CAAC;YACR,MAAM;QACP,CAAC;QACD,YAAY,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC","file":"stringEdit.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 { commonPrefixLength, commonSuffixLength } from '../../../../base/common/strings.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\nimport { BaseEdit, BaseReplacement } from './edit.js';\n\n\nexport abstract class BaseStringEdit<T extends BaseStringReplacement<T> = BaseStringReplacement<any>, TEdit extends BaseStringEdit<T, TEdit> = BaseStringEdit<any, any>> extends BaseEdit<T, TEdit> {\n\n\tpublic apply(base: string): string {\n\t\tconst resultText: string[] = [];\n\t\tlet pos = 0;\n\t\tfor (const edit of this.replacements) {\n\t\t\tresultText.push(base.substring(pos, edit.replaceRange.start));\n\t\t\tresultText.push(edit.newText);\n\t\t\tpos = edit.replaceRange.endExclusive;\n\t\t}\n\t\tresultText.push(base.substring(pos));\n\t\treturn resultText.join('');\n\t}\n}\n\nexport abstract class BaseStringReplacement<T extends BaseStringReplacement<T> = BaseStringReplacement<any>> extends BaseReplacement<T> {\n\tconstructor(\n\t\trange: OffsetRange,\n\t\tpublic readonly newText: string\n\t) {\n\t\tsuper(range);\n\t}\n\n\tgetNewLength(): number { return this.newText.length; }\n\n\toverride toString(): string {\n\t\treturn `${this.replaceRange} -> ${JSON.stringify(this.newText)}`;\n\t}\n\n\treplace(str: string): string {\n\t\treturn str.substring(0, this.replaceRange.start) + this.newText + str.substring(this.replaceRange.endExclusive);\n\t}\n\n\tremoveCommonSuffixPrefix(originalText: string): StringReplacement {\n\t\tconst oldText = originalText.substring(this.replaceRange.start, this.replaceRange.endExclusive);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tconst suffixLen = Math.min(\n\t\t\toldText.length - prefixLen,\n\t\t\tthis.newText.length - prefixLen,\n\t\t\tcommonSuffixLength(oldText, this.newText)\n\t\t);\n\n\t\tconst replaceRange = new OffsetRange(\n\t\t\tthis.replaceRange.start + prefixLen,\n\t\t\tthis.replaceRange.endExclusive - suffixLen,\n\t\t);\n\t\tconst newText = this.newText.substring(prefixLen, this.newText.length - suffixLen);\n\n\t\treturn new StringReplacement(replaceRange, newText);\n\t}\n\n\tpublic removeCommonSuffixAndPrefix(source: string): T {\n\t\treturn this.removeCommonSuffix(source).removeCommonPrefix(source);\n\t}\n\n\tpublic removeCommonPrefix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tif (prefixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\n\t\treturn this.slice(this.replaceRange.deltaStart(prefixLen), new OffsetRange(prefixLen, this.newText.length));\n\t}\n\n\tpublic removeCommonSuffix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst suffixLen = commonSuffixLength(oldText, this.newText);\n\t\tif (suffixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\t\treturn this.slice(this.replaceRange.deltaEnd(-suffixLen), new OffsetRange(0, this.newText.length - suffixLen));\n\t}\n\n\tpublic toJson(): ISerializedStringReplacement {\n\t\treturn ({\n\t\t\ttxt: this.newText,\n\t\t\tpos: this.replaceRange.start,\n\t\t\tlen: this.replaceRange.length,\n\t\t});\n\t}\n}\n\n\n/**\n * Represents a set of replacements to a string.\n * All these replacements are applied at once.\n*/\nexport class StringEdit extends BaseStringEdit<StringReplacement, StringEdit> {\n\tpublic static readonly empty = new StringEdit([]);\n\n\tpublic static compose(edits: readonly StringEdit[]): StringEdit {\n\t\tif (edits.length === 0) {\n\t\t\treturn StringEdit.empty;\n\t\t}\n\t\tlet result = edits[0];\n\t\tfor (let i = 1; i < edits.length; i++) {\n\t\t\tresult = result.compose(edits[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\tconstructor(replacements: readonly StringReplacement[]) {\n\t\tsuper(replacements);\n\t}\n\n\tprotected override _createNew(replacements: readonly StringReplacement[]): StringEdit {\n\t\treturn new StringEdit(replacements);\n\t}\n}\n\n/**\n * Warning: Be careful when changing this type, as it is used for serialization!\n*/\nexport interface ISerializedStringReplacement {\n\ttxt: string;\n\tpos: number;\n\tlen: number;\n}\n\nexport class StringReplacement extends BaseStringReplacement<StringReplacement> {\n\tpublic static insert(offset: number, text: string): StringReplacement {\n\t\treturn new StringReplacement(OffsetRange.emptyAt(offset), text);\n\t}\n\n\tpublic static replace(range: OffsetRange, text: string): StringReplacement {\n\t\treturn new StringReplacement(range, text);\n\t}\n\n\toverride equals(other: StringReplacement): boolean {\n\t\treturn this.replaceRange.equals(other.replaceRange) && this.newText === other.newText;\n\t}\n\n\toverride tryJoinTouching(other: StringReplacement): StringReplacement | undefined {\n\t\treturn new StringReplacement(this.replaceRange.joinRightTouching(other.replaceRange), this.newText + other.newText);\n\t}\n\n\toverride slice(range: OffsetRange, rangeInReplacement?: OffsetRange): StringReplacement {\n\t\treturn new StringReplacement(range, rangeInReplacement ? rangeInReplacement.substring(this.newText) : this.newText);\n\t}\n}\n\nexport function applyEditsToRanges(sortedRanges: OffsetRange[], edit: StringEdit): OffsetRange[] {\n\tsortedRanges = sortedRanges.slice();\n\n\t// treat edits as deletion of the replace range and then as insertion that extends the first range\n\tconst result: OffsetRange[] = [];\n\n\tlet offset = 0;\n\n\tfor (const e of edit.replacements) {\n\t\twhile (true) {\n\t\t\t// ranges before the current edit\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || r.endExclusive >= e.replaceRange.start) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tresult.push(r.delta(offset));\n\t\t}\n\n\t\tconst intersecting: OffsetRange[] = [];\n\t\twhile (true) {\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || !r.intersectsOrTouches(e.replaceRange)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tintersecting.push(r);\n\t\t}\n\n\t\tfor (let i = intersecting.length - 1; i >= 0; i--) {\n\t\t\tlet r = intersecting[i];\n\n\t\t\tconst overlap = r.intersect(e.replaceRange)!.length;\n\t\t\tr = r.deltaEnd(-overlap + (i === 0 ? e.newText.length : 0));\n\n\t\t\tconst rangeAheadOfReplaceRange = r.start - e.replaceRange.start;\n\t\t\tif (rangeAheadOfReplaceRange > 0) {\n\t\t\t\tr = r.delta(-rangeAheadOfReplaceRange);\n\t\t\t}\n\n\t\t\tif (i !== 0) {\n\t\t\t\tr = r.delta(e.newText.length);\n\t\t\t}\n\n\t\t\t// We already took our offset into account.\n\t\t\t// Because we add r back to the queue (which then adds offset again),\n\t\t\t// we have to remove it here.\n\t\t\tr = r.delta(-(e.newText.length - e.replaceRange.length));\n\n\t\t\tsortedRanges.unshift(r);\n\t\t}\n\n\t\toffset += e.newText.length - e.replaceRange.length;\n\t}\n\n\twhile (true) {\n\t\tconst r = sortedRanges[0];\n\t\tif (!r) {\n\t\t\tbreak;\n\t\t}\n\t\tsortedRanges.shift();\n\t\tresult.push(r.delta(offset));\n\t}\n\n\treturn result;\n}\n\n","/*---------------------------------------------------------------------------------------------\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 { commonPrefixLength, commonSuffixLength } from '../../../../base/common/strings.js';\nimport { OffsetRange } from '../ranges/offsetRange.js';\nimport { BaseEdit, BaseReplacement } from './edit.js';\n\n\nexport abstract class BaseStringEdit<T extends BaseStringReplacement<T> = BaseStringReplacement<any>, TEdit extends BaseStringEdit<T, TEdit> = BaseStringEdit<any, any>> extends BaseEdit<T, TEdit> {\n\n\tpublic apply(base: string): string {\n\t\tconst resultText: string[] = [];\n\t\tlet pos = 0;\n\t\tfor (const edit of this.replacements) {\n\t\t\tresultText.push(base.substring(pos, edit.replaceRange.start));\n\t\t\tresultText.push(edit.newText);\n\t\t\tpos = edit.replaceRange.endExclusive;\n\t\t}\n\t\tresultText.push(base.substring(pos));\n\t\treturn resultText.join('');\n\t}\n}\n\nexport abstract class BaseStringReplacement<T extends BaseStringReplacement<T> = BaseStringReplacement<any>> extends BaseReplacement<T> {\n\tconstructor(\n\t\trange: OffsetRange,\n\t\tpublic readonly newText: string\n\t) {\n\t\tsuper(range);\n\t}\n\n\tgetNewLength(): number { return this.newText.length; }\n\n\toverride toString(): string {\n\t\treturn `${this.replaceRange} -> ${JSON.stringify(this.newText)}`;\n\t}\n\n\treplace(str: string): string {\n\t\treturn str.substring(0, this.replaceRange.start) + this.newText + str.substring(this.replaceRange.endExclusive);\n\t}\n\n\tremoveCommonSuffixPrefix(originalText: string): StringReplacement {\n\t\tconst oldText = originalText.substring(this.replaceRange.start, this.replaceRange.endExclusive);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tconst suffixLen = Math.min(\n\t\t\toldText.length - prefixLen,\n\t\t\tthis.newText.length - prefixLen,\n\t\t\tcommonSuffixLength(oldText, this.newText)\n\t\t);\n\n\t\tconst replaceRange = new OffsetRange(\n\t\t\tthis.replaceRange.start + prefixLen,\n\t\t\tthis.replaceRange.endExclusive - suffixLen,\n\t\t);\n\t\tconst newText = this.newText.substring(prefixLen, this.newText.length - suffixLen);\n\n\t\treturn new StringReplacement(replaceRange, newText);\n\t}\n\n\tpublic removeCommonSuffixAndPrefix(source: string): T {\n\t\treturn this.removeCommonSuffix(source).removeCommonPrefix(source);\n\t}\n\n\tpublic removeCommonPrefix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst prefixLen = commonPrefixLength(oldText, this.newText);\n\t\tif (prefixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\n\t\treturn this.slice(this.replaceRange.deltaStart(prefixLen), new OffsetRange(prefixLen, this.newText.length));\n\t}\n\n\tpublic removeCommonSuffix(source: string): T {\n\t\tconst oldText = this.replaceRange.substring(source);\n\n\t\tconst suffixLen = commonSuffixLength(oldText, this.newText);\n\t\tif (suffixLen === 0) {\n\t\t\treturn this as unknown as T;\n\t\t}\n\t\treturn this.slice(this.replaceRange.deltaEnd(-suffixLen), new OffsetRange(0, this.newText.length - suffixLen));\n\t}\n\n\tpublic toJson(): ISerializedStringReplacement {\n\t\treturn ({\n\t\t\ttxt: this.newText,\n\t\t\tpos: this.replaceRange.start,\n\t\t\tlen: this.replaceRange.length,\n\t\t});\n\t}\n}\n\n\n/**\n * Represents a set of replacements to a string.\n * All these replacements are applied at once.\n*/\nexport class StringEdit extends BaseStringEdit<StringReplacement, StringEdit> {\n\tpublic static readonly empty = new StringEdit([]);\n\n\tpublic static compose(edits: readonly StringEdit[]): StringEdit {\n\t\tif (edits.length === 0) {\n\t\t\treturn StringEdit.empty;\n\t\t}\n\t\tlet result = edits[0];\n\t\tfor (let i = 1; i < edits.length; i++) {\n\t\t\tresult = result.compose(edits[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\tconstructor(replacements: readonly StringReplacement[]) {\n\t\tsuper(replacements);\n\t}\n\n\tprotected override _createNew(replacements: readonly StringReplacement[]): StringEdit {\n\t\treturn new StringEdit(replacements);\n\t}\n}\n\n/**\n * Warning: Be careful when changing this type, as it is used for serialization!\n*/\nexport interface ISerializedStringReplacement {\n\ttxt: string;\n\tpos: number;\n\tlen: number;\n}\n\nexport class StringReplacement extends BaseStringReplacement<StringReplacement> {\n\tpublic static insert(offset: number, text: string): StringReplacement {\n\t\treturn new StringReplacement(OffsetRange.emptyAt(offset), text);\n\t}\n\n\tpublic static replace(range: OffsetRange, text: string): StringReplacement {\n\t\treturn new StringReplacement(range, text);\n\t}\n\n\toverride equals(other: StringReplacement): boolean {\n\t\treturn this.replaceRange.equals(other.replaceRange) && this.newText === other.newText;\n\t}\n\n\toverride tryJoinTouching(other: StringReplacement): StringReplacement | undefined {\n\t\treturn new StringReplacement(this.replaceRange.joinRightTouching(other.replaceRange), this.newText + other.newText);\n\t}\n\n\toverride slice(range: OffsetRange, rangeInReplacement?: OffsetRange): StringReplacement {\n\t\treturn new StringReplacement(range, rangeInReplacement ? rangeInReplacement.substring(this.newText) : this.newText);\n\t}\n}\n\nexport function applyEditsToRanges(sortedRanges: OffsetRange[], edit: StringEdit): OffsetRange[] {\n\tsortedRanges = sortedRanges.slice();\n\n\t// treat edits as deletion of the replace range and then as insertion that extends the first range\n\tconst result: OffsetRange[] = [];\n\n\tlet offset = 0;\n\n\tfor (const e of edit.replacements) {\n\t\twhile (true) {\n\t\t\t// ranges before the current edit\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || r.endExclusive >= e.replaceRange.start) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tresult.push(r.delta(offset));\n\t\t}\n\n\t\tconst intersecting: OffsetRange[] = [];\n\t\twhile (true) {\n\t\t\tconst r = sortedRanges[0];\n\t\t\tif (!r || !r.intersectsOrTouches(e.replaceRange)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsortedRanges.shift();\n\t\t\tintersecting.push(r);\n\t\t}\n\n\t\tfor (let i = intersecting.length - 1; i >= 0; i--) {\n\t\t\tlet r = intersecting[i];\n\n\t\t\tconst overlap = r.intersect(e.replaceRange)!.length;\n\t\t\tr = r.deltaEnd(-overlap + (i === 0 ? e.newText.length : 0));\n\n\t\t\tconst rangeAheadOfReplaceRange = r.start - e.replaceRange.start;\n\t\t\tif (rangeAheadOfReplaceRange > 0) {\n\t\t\t\tr = r.delta(-rangeAheadOfReplaceRange);\n\t\t\t}\n\n\t\t\tif (i !== 0) {\n\t\t\t\tr = r.delta(e.newText.length);\n\t\t\t}\n\n\t\t\t// We already took our offset into account.\n\t\t\t// Because we add r back to the queue (which then adds offset again),\n\t\t\t// we have to remove it here.\n\t\t\tr = r.delta(-(e.newText.length - e.replaceRange.length));\n\n\t\t\tsortedRanges.unshift(r);\n\t\t}\n\n\t\toffset += e.newText.length - e.replaceRange.length;\n\t}\n\n\twhile (true) {\n\t\tconst r = sortedRanges[0];\n\t\tif (!r) {\n\t\t\tbreak;\n\t\t}\n\t\tsortedRanges.shift();\n\t\tresult.push(r.delta(offset));\n\t}\n\n\treturn result;\n}\n\n"]}
@@ -14,6 +14,7 @@ export const IsIOSContext = new RawContextKey('isIOS', isIOS, localize(1671, "Wh
14
14
  export const IsMobileContext = new RawContextKey('isMobile', isMobile, localize(1672, "Whether the platform is a mobile web browser"));
15
15
  export const IsDevelopmentContext = new RawContextKey('isDevelopment', false, true);
16
16
  export const ProductQualityContext = new RawContextKey('productQualityType', '', localize(1673, "Quality type of VS Code"));
17
+ export const IsSimulationContext = new RawContextKey('isSimulation', false, localize(1674, "Whether the application runs in simulation mode"));
17
18
  export const InputFocusedContextKey = 'inputFocus';
18
- export const InputFocusedContext = new RawContextKey(InputFocusedContextKey, false, localize(1674, "Whether keyboard focus is inside an input box"));
19
+ export const InputFocusedContext = new RawContextKey(InputFocusedContextKey, false, localize(1675, "Whether keyboard focus is inside an input box"));
19
20
  //# sourceMappingURL=contextkeys.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/platform/contextkey/common/contextkeys.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC3G,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,aAAa,CAAU,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,IAAO,EAAE,uCAAuC,CAAC,CAAC,CAAC;AACzI,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,aAAa,CAAU,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAS,EAAE,uCAAuC,CAAC,CAAC,CAAC;AAC3I,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,aAAa,CAAU,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,IAAW,EAAE,yCAAyC,CAAC,CAAC,CAAC;AAErJ,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,aAAa,CAAU,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAO,EAAE,uCAAuC,CAAC,CAAC,CAAC;AACnI,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,aAAa,CAAU,aAAa,EAAE,WAAW,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAa,EAAE,iEAAiE,CAAC,CAAC,CAAC;AAC/L,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,aAAa,CAAU,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAO,EAAE,qCAAqC,CAAC,CAAC,CAAC;AACjI,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,aAAa,CAAU,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAU,EAAE,8CAA8C,CAAC,CAAC,CAAC;AAEtJ,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,aAAa,CAAU,eAAe,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC7F,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,aAAa,CAAS,oBAAoB,EAAE,EAAE,EAAE,QAAQ,CAAC,IAAoB,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAEpJ,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAU,sBAAsB,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAY,EAAE,+CAA+C,CAAC,CAAC,CAAC","file":"contextkeys.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 { isIOS, isLinux, isMacintosh, isMobile, isWeb, isWindows } from '../../../base/common/platform.js';\nimport { localize } from '../../../nls.js';\nimport { RawContextKey } from './contextkey.js';\n\nexport const IsMacContext = new RawContextKey<boolean>('isMac', isMacintosh, localize('isMac', \"Whether the operating system is macOS\"));\nexport const IsLinuxContext = new RawContextKey<boolean>('isLinux', isLinux, localize('isLinux', \"Whether the operating system is Linux\"));\nexport const IsWindowsContext = new RawContextKey<boolean>('isWindows', isWindows, localize('isWindows', \"Whether the operating system is Windows\"));\n\nexport const IsWebContext = new RawContextKey<boolean>('isWeb', isWeb, localize('isWeb', \"Whether the platform is a web browser\"));\nexport const IsMacNativeContext = new RawContextKey<boolean>('isMacNative', isMacintosh && !isWeb, localize('isMacNative', \"Whether the operating system is macOS on a non-browser platform\"));\nexport const IsIOSContext = new RawContextKey<boolean>('isIOS', isIOS, localize('isIOS', \"Whether the operating system is iOS\"));\nexport const IsMobileContext = new RawContextKey<boolean>('isMobile', isMobile, localize('isMobile', \"Whether the platform is a mobile web browser\"));\n\nexport const IsDevelopmentContext = new RawContextKey<boolean>('isDevelopment', false, true);\nexport const ProductQualityContext = new RawContextKey<string>('productQualityType', '', localize('productQualityType', \"Quality type of VS Code\"));\n\nexport const InputFocusedContextKey = 'inputFocus';\nexport const InputFocusedContext = new RawContextKey<boolean>(InputFocusedContextKey, false, localize('inputFocus', \"Whether keyboard focus is inside an input box\"));\n"]}
1
+ {"version":3,"sources":["vs/platform/contextkey/common/contextkeys.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC3G,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,aAAa,CAAU,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,IAAO,EAAE,uCAAuC,CAAC,CAAC,CAAC;AACzI,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,aAAa,CAAU,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAS,EAAE,uCAAuC,CAAC,CAAC,CAAC;AAC3I,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,aAAa,CAAU,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,IAAW,EAAE,yCAAyC,CAAC,CAAC,CAAC;AAErJ,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,aAAa,CAAU,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAO,EAAE,uCAAuC,CAAC,CAAC,CAAC;AACnI,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,aAAa,CAAU,aAAa,EAAE,WAAW,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAa,EAAE,iEAAiE,CAAC,CAAC,CAAC;AAC/L,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,aAAa,CAAU,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAO,EAAE,qCAAqC,CAAC,CAAC,CAAC;AACjI,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,aAAa,CAAU,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAU,EAAE,8CAA8C,CAAC,CAAC,CAAC;AAEtJ,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,aAAa,CAAU,eAAe,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC7F,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,aAAa,CAAS,oBAAoB,EAAE,EAAE,EAAE,QAAQ,CAAC,IAAoB,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAEpJ,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAU,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAc,EAAE,iDAAiD,CAAC,CAAC,CAAC;AAElK,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAU,sBAAsB,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAY,EAAE,+CAA+C,CAAC,CAAC,CAAC","file":"contextkeys.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 { isIOS, isLinux, isMacintosh, isMobile, isWeb, isWindows } from '../../../base/common/platform.js';\nimport { localize } from '../../../nls.js';\nimport { RawContextKey } from './contextkey.js';\n\nexport const IsMacContext = new RawContextKey<boolean>('isMac', isMacintosh, localize('isMac', \"Whether the operating system is macOS\"));\nexport const IsLinuxContext = new RawContextKey<boolean>('isLinux', isLinux, localize('isLinux', \"Whether the operating system is Linux\"));\nexport const IsWindowsContext = new RawContextKey<boolean>('isWindows', isWindows, localize('isWindows', \"Whether the operating system is Windows\"));\n\nexport const IsWebContext = new RawContextKey<boolean>('isWeb', isWeb, localize('isWeb', \"Whether the platform is a web browser\"));\nexport const IsMacNativeContext = new RawContextKey<boolean>('isMacNative', isMacintosh && !isWeb, localize('isMacNative', \"Whether the operating system is macOS on a non-browser platform\"));\nexport const IsIOSContext = new RawContextKey<boolean>('isIOS', isIOS, localize('isIOS', \"Whether the operating system is iOS\"));\nexport const IsMobileContext = new RawContextKey<boolean>('isMobile', isMobile, localize('isMobile', \"Whether the platform is a mobile web browser\"));\n\nexport const IsDevelopmentContext = new RawContextKey<boolean>('isDevelopment', false, true);\nexport const ProductQualityContext = new RawContextKey<string>('productQualityType', '', localize('productQualityType', \"Quality type of VS Code\"));\n\nexport const IsSimulationContext = new RawContextKey<boolean>('isSimulation', false, localize('isSimulation', \"Whether the application runs in simulation mode\"));\n\nexport const InputFocusedContextKey = 'inputFocus';\nexport const InputFocusedContext = new RawContextKey<boolean>(InputFocusedContextKey, false, localize('inputFocus', \"Whether keyboard focus is inside an input box\"));\n"]}
@@ -7,17 +7,17 @@ import { localize } from '../../../nls.js';
7
7
  function hintDidYouMean(...meant) {
8
8
  switch (meant.length) {
9
9
  case 1:
10
- return localize(1675, "Did you mean {0}?", meant[0]);
10
+ return localize(1676, "Did you mean {0}?", meant[0]);
11
11
  case 2:
12
- return localize(1676, "Did you mean {0} or {1}?", meant[0], meant[1]);
12
+ return localize(1677, "Did you mean {0} or {1}?", meant[0], meant[1]);
13
13
  case 3:
14
- return localize(1677, "Did you mean {0}, {1} or {2}?", meant[0], meant[1], meant[2]);
14
+ return localize(1678, "Did you mean {0}, {1} or {2}?", meant[0], meant[1], meant[2]);
15
15
  default: // we just don't expect that many
16
16
  return undefined;
17
17
  }
18
18
  }
19
- const hintDidYouForgetToOpenOrCloseQuote = localize(1678, "Did you forget to open or close the quote?");
20
- const hintDidYouForgetToEscapeSlash = localize(1679, "Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/\'.");
19
+ const hintDidYouForgetToOpenOrCloseQuote = localize(1679, "Did you forget to open or close the quote?");
20
+ const hintDidYouForgetToEscapeSlash = localize(1680, "Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/\'.");
21
21
  /**
22
22
  * A simple scanner for context keys.
23
23
  *
@@ -18,7 +18,7 @@ import { KeybindingsRegistry } from '../../keybinding/common/keybindingsRegistry
18
18
  import { localize } from '../../../nls.js';
19
19
  import { DisposableStore, toDisposable } from '../../../base/common/lifecycle.js';
20
20
  import { isActiveElement } from '../../../base/browser/dom.js';
21
- export const historyNavigationVisible = new RawContextKey('suggestWidgetVisible', false, localize(1680, "Whether suggestion are visible"));
21
+ export const historyNavigationVisible = new RawContextKey('suggestWidgetVisible', false, localize(1681, "Whether suggestion are visible"));
22
22
  const HistoryNavigationWidgetFocusContext = 'historyNavigationWidgetFocus';
23
23
  const HistoryNavigationForwardsEnablementContext = 'historyNavigationForwardsEnabled';
24
24
  const HistoryNavigationBackwardsEnablementContext = 'historyNavigationBackwardsEnabled';
@@ -95,11 +95,11 @@ export class AbstractKeybindingService extends Disposable {
95
95
  throw illegalState('impossible');
96
96
  case 1:
97
97
  // TODO@ulugbekna: revise this message and the one below (at least, fix terminology)
98
- this._currentChordStatusMessage = this._notificationService.status(nls.localize(1681, "({0}) was pressed. Waiting for second key of chord...", keypressLabel));
98
+ this._currentChordStatusMessage = this._notificationService.status(nls.localize(1682, "({0}) was pressed. Waiting for second key of chord...", keypressLabel));
99
99
  break;
100
100
  default: {
101
101
  const fullKeypressLabel = this._currentChords.map(({ label }) => label).join(', ');
102
- this._currentChordStatusMessage = this._notificationService.status(nls.localize(1682, "({0}) was pressed. Waiting for next key of chord...", fullKeypressLabel));
102
+ this._currentChordStatusMessage = this._notificationService.status(nls.localize(1683, "({0}) was pressed. Waiting for next key of chord...", fullKeypressLabel));
103
103
  }
104
104
  }
105
105
  this._scheduleLeaveChordMode();
@@ -198,7 +198,7 @@ export class AbstractKeybindingService extends Disposable {
198
198
  if (this.inChordMode) {
199
199
  const currentChordsLabel = this._currentChords.map(({ label }) => label).join(', ');
200
200
  this._log(`+ Leaving multi-chord mode: Nothing bound to "${currentChordsLabel}, ${keypressLabel}".`);
201
- this._notificationService.status(nls.localize(1683, "The key combination ({0}, {1}) is not a command.", currentChordsLabel, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ });
201
+ this._notificationService.status(nls.localize(1684, "The key combination ({0}, {1}) is not a command.", currentChordsLabel, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ });
202
202
  this._leaveChordMode();
203
203
  shouldPreventDefault = true;
204
204
  }
@@ -217,7 +217,7 @@ export class AbstractKeybindingService extends Disposable {
217
217
  if (this.inChordMode) {
218
218
  const currentChordsLabel = this._currentChords.map(({ label }) => label).join(', ');
219
219
  this._log(`+ Leaving chord mode: Nothing bound to "${currentChordsLabel}, ${keypressLabel}".`);
220
- this._notificationService.status(nls.localize(1684, "The key combination ({0}, {1}) is not a command.", currentChordsLabel, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ });
220
+ this._notificationService.status(nls.localize(1685, "The key combination ({0}, {1}) is not a command.", currentChordsLabel, keypressLabel), { hideAfter: 10 * 1000 /* 10s */ });
221
221
  this._leaveChordMode();
222
222
  shouldPreventDefault = true;
223
223
  }
@@ -899,18 +899,18 @@ const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration)
899
899
  configurationRegistry.registerConfiguration({
900
900
  id: 'workbench',
901
901
  order: 7,
902
- title: localize(1685, "Workbench"),
902
+ title: localize(1686, "Workbench"),
903
903
  type: 'object',
904
904
  properties: {
905
905
  [multiSelectModifierSettingKey]: {
906
906
  type: 'string',
907
907
  enum: ['ctrlCmd', 'alt'],
908
908
  markdownEnumDescriptions: [
909
- localize(1686, "Maps to `Control` on Windows and Linux and to `Command` on macOS."),
910
- localize(1687, "Maps to `Alt` on Windows and Linux and to `Option` on macOS.")
909
+ localize(1687, "Maps to `Control` on Windows and Linux and to `Command` on macOS."),
910
+ localize(1688, "Maps to `Alt` on Windows and Linux and to `Option` on macOS.")
911
911
  ],
912
912
  default: 'ctrlCmd',
913
- description: localize(1688, "The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")
913
+ description: localize(1689, "The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")
914
914
 
915
915
 
916
916
 
@@ -922,7 +922,7 @@ configurationRegistry.registerConfiguration({
922
922
  type: 'string',
923
923
  enum: ['singleClick', 'doubleClick'],
924
924
  default: 'singleClick',
925
- description: localize(1689, "Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")
925
+ description: localize(1690, "Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")
926
926
 
927
927
 
928
928
 
@@ -930,96 +930,96 @@ configurationRegistry.registerConfiguration({
930
930
  [horizontalScrollingKey]: {
931
931
  type: 'boolean',
932
932
  default: false,
933
- description: localize(1690, "Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")
933
+ description: localize(1691, "Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")
934
934
  },
935
935
  [scrollByPageKey]: {
936
936
  type: 'boolean',
937
937
  default: false,
938
- description: localize(1691, "Controls whether clicks in the scrollbar scroll page by page.")
938
+ description: localize(1692, "Controls whether clicks in the scrollbar scroll page by page.")
939
939
  },
940
940
  [treeIndentKey]: {
941
941
  type: 'number',
942
942
  default: 8,
943
943
  minimum: 4,
944
944
  maximum: 40,
945
- description: localize(1692, "Controls tree indentation in pixels.")
945
+ description: localize(1693, "Controls tree indentation in pixels.")
946
946
  },
947
947
  [treeRenderIndentGuidesKey]: {
948
948
  type: 'string',
949
949
  enum: ['none', 'onHover', 'always'],
950
950
  default: 'onHover',
951
- description: localize(1693, "Controls whether the tree should render indent guides.")
951
+ description: localize(1694, "Controls whether the tree should render indent guides.")
952
952
  },
953
953
  [listSmoothScrolling]: {
954
954
  type: 'boolean',
955
955
  default: false,
956
- description: localize(1694, "Controls whether lists and trees have smooth scrolling."),
956
+ description: localize(1695, "Controls whether lists and trees have smooth scrolling."),
957
957
  },
958
958
  [mouseWheelScrollSensitivityKey]: {
959
959
  type: 'number',
960
960
  default: 1,
961
- markdownDescription: localize(1695, "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")
961
+ markdownDescription: localize(1696, "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")
962
962
  },
963
963
  [fastScrollSensitivityKey]: {
964
964
  type: 'number',
965
965
  default: 5,
966
- markdownDescription: localize(1696, "Scrolling speed multiplier when pressing `Alt`.")
966
+ markdownDescription: localize(1697, "Scrolling speed multiplier when pressing `Alt`.")
967
967
  },
968
968
  [defaultFindModeSettingKey]: {
969
969
  type: 'string',
970
970
  enum: ['highlight', 'filter'],
971
971
  enumDescriptions: [
972
- localize(1697, "Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),
973
- localize(1698, "Filter elements when searching.")
972
+ localize(1698, "Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),
973
+ localize(1699, "Filter elements when searching.")
974
974
  ],
975
975
  default: 'highlight',
976
- description: localize(1699, "Controls the default find mode for lists and trees in the workbench.")
976
+ description: localize(1700, "Controls the default find mode for lists and trees in the workbench.")
977
977
  },
978
978
  [keyboardNavigationSettingKey]: {
979
979
  type: 'string',
980
980
  enum: ['simple', 'highlight', 'filter'],
981
981
  enumDescriptions: [
982
- localize(1700, "Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),
983
- localize(1701, "Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),
984
- localize(1702, "Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")
982
+ localize(1701, "Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),
983
+ localize(1702, "Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),
984
+ localize(1703, "Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")
985
985
  ],
986
986
  default: 'highlight',
987
- description: localize(1703, "Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),
987
+ description: localize(1704, "Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),
988
988
  deprecated: true,
989
- deprecationMessage: localize(1704, "Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")
989
+ deprecationMessage: localize(1705, "Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.")
990
990
  },
991
991
  [defaultFindMatchTypeSettingKey]: {
992
992
  type: 'string',
993
993
  enum: ['fuzzy', 'contiguous'],
994
994
  enumDescriptions: [
995
- localize(1705, "Use fuzzy matching when searching."),
996
- localize(1706, "Use contiguous matching when searching.")
995
+ localize(1706, "Use fuzzy matching when searching."),
996
+ localize(1707, "Use contiguous matching when searching.")
997
997
  ],
998
998
  default: 'fuzzy',
999
- description: localize(1707, "Controls the type of matching used when searching lists and trees in the workbench.")
999
+ description: localize(1708, "Controls the type of matching used when searching lists and trees in the workbench.")
1000
1000
  },
1001
1001
  [treeExpandMode]: {
1002
1002
  type: 'string',
1003
1003
  enum: ['singleClick', 'doubleClick'],
1004
1004
  default: 'singleClick',
1005
- description: localize(1708, "Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable."),
1005
+ description: localize(1709, "Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable."),
1006
1006
  },
1007
1007
  [treeStickyScroll]: {
1008
1008
  type: 'boolean',
1009
1009
  default: true,
1010
- description: localize(1709, "Controls whether sticky scrolling is enabled in trees."),
1010
+ description: localize(1710, "Controls whether sticky scrolling is enabled in trees."),
1011
1011
  },
1012
1012
  [treeStickyScrollMaxElements]: {
1013
1013
  type: 'number',
1014
1014
  minimum: 1,
1015
1015
  default: 7,
1016
- markdownDescription: localize(1710, "Controls the number of sticky elements displayed in the tree when {0} is enabled.", '`#workbench.tree.enableStickyScroll#`'),
1016
+ markdownDescription: localize(1711, "Controls the number of sticky elements displayed in the tree when {0} is enabled.", '`#workbench.tree.enableStickyScroll#`'),
1017
1017
  },
1018
1018
  [typeNavigationModeSettingKey]: {
1019
1019
  type: 'string',
1020
1020
  enum: ['automatic', 'trigger'],
1021
1021
  default: 'automatic',
1022
- markdownDescription: localize(1711, "Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run."),
1022
+ markdownDescription: localize(1712, "Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run."),
1023
1023
  }
1024
1024
  }
1025
1025
  });
@@ -239,8 +239,8 @@ export class MarkerService {
239
239
  */
240
240
  _createFilteredMarker(resource, reasons) {
241
241
  const message = reasons.length === 1
242
- ? localize(1718, "Problems are paused because: \"{0}\"", reasons[0])
243
- : localize(1719, "Problems are paused because: \"{0}\" and {1} more", reasons[0], reasons.length - 1);
242
+ ? localize(1719, "Problems are paused because: \"{0}\"", reasons[0])
243
+ : localize(1720, "Problems are paused because: \"{0}\" and {1} more", reasons[0], reasons.length - 1);
244
244
  return {
245
245
  owner: 'markersFilter',
246
246
  resource,
@@ -18,17 +18,17 @@ export var MarkerSeverity;
18
18
  }
19
19
  MarkerSeverity.compare = compare;
20
20
  const _displayStrings = Object.create(null);
21
- _displayStrings[MarkerSeverity.Error] = localize(1712, "Error");
22
- _displayStrings[MarkerSeverity.Warning] = localize(1713, "Warning");
23
- _displayStrings[MarkerSeverity.Info] = localize(1714, "Info");
21
+ _displayStrings[MarkerSeverity.Error] = localize(1713, "Error");
22
+ _displayStrings[MarkerSeverity.Warning] = localize(1714, "Warning");
23
+ _displayStrings[MarkerSeverity.Info] = localize(1715, "Info");
24
24
  function toString(a) {
25
25
  return _displayStrings[a] || '';
26
26
  }
27
27
  MarkerSeverity.toString = toString;
28
28
  const _displayStringsPlural = Object.create(null);
29
- _displayStringsPlural[MarkerSeverity.Error] = localize(1715, "Errors");
30
- _displayStringsPlural[MarkerSeverity.Warning] = localize(1716, "Warnings");
31
- _displayStringsPlural[MarkerSeverity.Info] = localize(1717, "Infos");
29
+ _displayStringsPlural[MarkerSeverity.Error] = localize(1716, "Errors");
30
+ _displayStringsPlural[MarkerSeverity.Warning] = localize(1717, "Warnings");
31
+ _displayStringsPlural[MarkerSeverity.Info] = localize(1718, "Infos");
32
32
  function toStringPlural(a) {
33
33
  return _displayStringsPlural[a] || '';
34
34
  }
@@ -154,22 +154,22 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
154
154
  const commandPick = filteredCommandPicks[i];
155
155
  // Separator: recently used
156
156
  if (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {
157
- commandPicks.push({ type: 'separator', label: localize(1720, "recently used") });
157
+ commandPicks.push({ type: 'separator', label: localize(1721, "recently used") });
158
158
  addOtherSeparator = true;
159
159
  }
160
160
  if (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {
161
- commandPicks.push({ type: 'separator', label: localize(1721, "similar commands") });
161
+ commandPicks.push({ type: 'separator', label: localize(1722, "similar commands") });
162
162
  addSuggestedSeparator = false;
163
163
  }
164
164
  // Separator: commonly used
165
165
  if (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {
166
- commandPicks.push({ type: 'separator', label: localize(1722, "commonly used") });
166
+ commandPicks.push({ type: 'separator', label: localize(1723, "commonly used") });
167
167
  addOtherSeparator = true;
168
168
  addCommonlyUsedSeparator = false;
169
169
  }
170
170
  // Separator: other commands
171
171
  if (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {
172
- commandPicks.push({ type: 'separator', label: localize(1723, "other commands") });
172
+ commandPicks.push({ type: 'separator', label: localize(1724, "other commands") });
173
173
  addOtherSeparator = false;
174
174
  }
175
175
  // Command
@@ -189,7 +189,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
189
189
  // Basically, if we haven't already added a separator, we add one before the additional picks so long
190
190
  // as one hasn't been added to the start of the array.
191
191
  if (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {
192
- commandPicks.unshift({ type: 'separator', label: localize(1724, "similar commands") });
192
+ commandPicks.unshift({ type: 'separator', label: localize(1725, "similar commands") });
193
193
  }
194
194
  return commandPicks;
195
195
  })()
@@ -201,7 +201,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
201
201
  }
202
202
  const keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);
203
203
  const ariaLabel = keybinding ?
204
- localize(1725, "{0}, {1}", commandPick.label, keybinding.getAriaLabel()) :
204
+ localize(1726, "{0}, {1}", commandPick.label, keybinding.getAriaLabel()) :
205
205
  commandPick.label;
206
206
  return {
207
207
  ...commandPick,
@@ -224,7 +224,7 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
224
224
  }
225
225
  catch (error) {
226
226
  if (!isCancellationError(error)) {
227
- this.dialogService.error(localize(1726, "Command '{0}' resulted in an error", commandPick.label), toErrorMessage(error));
227
+ this.dialogService.error(localize(1727, "Command '{0}' resulted in an error", commandPick.label), toErrorMessage(error));
228
228
  }
229
229
  }
230
230
  }
@@ -62,7 +62,7 @@ let HelpQuickAccessProvider = class HelpQuickAccessProvider {
62
62
  prefix,
63
63
  label,
64
64
  keybinding: helpEntry.commandId ? this.keybindingService.lookupKeybinding(helpEntry.commandId) : undefined,
65
- ariaLabel: localize(1727, "{0}, {1}", label, helpEntry.description),
65
+ ariaLabel: localize(1728, "{0}, {1}", label, helpEntry.description),
66
66
  description: helpEntry.description
67
67
  };
68
68
  });
@@ -31,22 +31,22 @@ import { IHoverService, WorkbenchHoverDelegate } from '../../hover/browser/hover
31
31
  import { ContextKeyExpr, RawContextKey } from '../../contextkey/common/contextkey.js';
32
32
  import { observableValue } from '../../../base/common/observable.js';
33
33
  export const inQuickInputContextKeyValue = 'inQuickInput';
34
- export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(1728, "Whether keyboard focus is inside the quick input control"));
34
+ export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(1729, "Whether keyboard focus is inside the quick input control"));
35
35
  export const inQuickInputContext = ContextKeyExpr.has(inQuickInputContextKeyValue);
36
36
  export const quickInputAlignmentContextKeyValue = 'quickInputAlignment';
37
- export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(1729, "The alignment of the quick input"));
37
+ export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(1730, "The alignment of the quick input"));
38
38
  export const quickInputTypeContextKeyValue = 'quickInputType';
39
- export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(1730, "The type of the currently visible quick input"));
39
+ export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(1731, "The type of the currently visible quick input"));
40
40
  export const endOfQuickInputBoxContextKeyValue = 'cursorAtEndOfQuickInputBox';
41
- export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(1731, "Whether the cursor in the quick input is at the end of the input box"));
41
+ export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(1732, "Whether the cursor in the quick input is at the end of the input box"));
42
42
  export const endOfQuickInputBoxContext = ContextKeyExpr.has(endOfQuickInputBoxContextKeyValue);
43
43
  export const backButton = {
44
44
  iconClass: ThemeIcon.asClassName(Codicon.quickInputBack),
45
- tooltip: localize(1732, "Back"),
45
+ tooltip: localize(1733, "Back"),
46
46
  handle: -1 // TODO
47
47
  };
48
48
  export class QuickInput extends Disposable {
49
- static { this.noPromptMessage = localize(1733, "Press 'Enter' to confirm your input or 'Escape' to cancel"); }
49
+ static { this.noPromptMessage = localize(1734, "Press 'Enter' to confirm your input or 'Escape' to cancel"); }
50
50
  constructor(ui) {
51
51
  super();
52
52
  this.ui = ui;
@@ -314,7 +314,7 @@ export class QuickInput extends Disposable {
314
314
  }
315
315
  getSteps() {
316
316
  if (this.step && this.totalSteps) {
317
- return localize(1734, "{0}/{1}", this.step, this.totalSteps);
317
+ return localize(1735, "{0}/{1}", this.step, this.totalSteps);
318
318
  }
319
319
  if (this.step) {
320
320
  return String(this.step);
@@ -386,7 +386,7 @@ export class QuickPick extends QuickInput {
386
386
  this.onDidTriggerItemButton = this.onDidTriggerItemButtonEmitter.event;
387
387
  this.onDidTriggerSeparatorButton = this.onDidTriggerSeparatorButtonEmitter.event;
388
388
  }
389
- static { this.DEFAULT_ARIA_LABEL = localize(1735, "Type to narrow down results."); }
389
+ static { this.DEFAULT_ARIA_LABEL = localize(1736, "Type to narrow down results."); }
390
390
  get quickNavigate() {
391
391
  return this._quickNavigate;
392
392
  }
@@ -570,7 +570,7 @@ export class QuickPick extends QuickInput {
570
570
  this.update();
571
571
  }
572
572
  get okLabel() {
573
- return this._okLabel ?? localize(1736, "OK");
573
+ return this._okLabel ?? localize(1737, "OK");
574
574
  }
575
575
  set okLabel(okLabel) {
576
576
  this._okLabel = okLabel;
@@ -911,7 +911,7 @@ export class InputBox extends QuickInput {
911
911
  set prompt(prompt) {
912
912
  this._prompt = prompt;
913
913
  this.noValidationMessage = prompt
914
- ? localize(1737, "{0} (Press 'Enter' to confirm or 'Escape' to cancel)", prompt)
914
+ ? localize(1738, "{0} (Press 'Enter' to confirm or 'Escape' to cancel)", prompt)
915
915
  : QuickInput.noPromptMessage;
916
916
  this.update();
917
917
  }
@@ -12,7 +12,7 @@ import { IQuickInputService, QuickPickFocus } from '../common/quickInput.js';
12
12
  const defaultCommandAndKeybindingRule = {
13
13
  weight: 200 /* KeybindingWeight.WorkbenchContrib */,
14
14
  when: ContextKeyExpr.and(ContextKeyExpr.or(ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickPick" /* QuickInputType.QuickPick */), ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickTree" /* QuickInputType.QuickTree */)), inQuickInputContext),
15
- metadata: { description: localize(1738, "Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") }
15
+ metadata: { description: localize(1739, "Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") }
16
16
  };
17
17
  function registerQuickPickCommandAndKeybindingRule(rule, options = {}) {
18
18
  KeybindingsRegistry.registerCommandAndKeybindingRule({
@@ -71,8 +71,8 @@ registerQuickPickCommandAndKeybindingRule({ id: 'quickInput.previous', primary:
71
71
  // In this case, we want that modifier key+up/down to navigate to the next/previous item, not the next/previous separator.
72
72
  // To handle this, we have a separate command for navigating to the next/previous separator when we are not in quick access mode.
73
73
  // If, however, we are in quick access mode, and you hold down an additional modifier key, we will navigate to the next/previous separator.
74
- const nextSeparatorFallbackDesc = localize(1739, "If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator.");
75
- const prevSeparatorFallbackDesc = localize(1740, "If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");
74
+ const nextSeparatorFallbackDesc = localize(1740, "If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator.");
75
+ const prevSeparatorFallbackDesc = localize(1741, "If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");
76
76
  if (isMacintosh) {
77
77
  registerQuickPickCommandAndKeybindingRule({
78
78
  id: 'quickInput.nextSeparatorWithQuickAccessFallback',
@@ -117,7 +117,7 @@ let QuickInputController = class QuickInputController extends Disposable {
117
117
  const rightActionBar = this._register(new ActionBar(titleBar, { hoverDelegate: this.options.hoverDelegate }));
118
118
  rightActionBar.domNode.classList.add('quick-input-right-action-bar');
119
119
  const headerContainer = dom.append(container, $('.quick-input-header'));
120
- const checkAll = this._register(new TriStateCheckbox(localize(1741, "Toggle all checkboxes"), false, { ...defaultCheckboxStyles, size: 15 }));
120
+ const checkAll = this._register(new TriStateCheckbox(localize(1742, "Toggle all checkboxes"), false, { ...defaultCheckboxStyles, size: 15 }));
121
121
  dom.append(headerContainer, checkAll.domNode);
122
122
  this._register(checkAll.onChange(() => {
123
123
  const checked = checkAll.checked;
@@ -136,21 +136,21 @@ let QuickInputController = class QuickInputController extends Disposable {
136
136
  const visibleCountContainer = dom.append(filterContainer, $('.quick-input-visible-count'));
137
137
  visibleCountContainer.setAttribute('aria-live', 'polite');
138
138
  visibleCountContainer.setAttribute('aria-atomic', 'true');
139
- const visibleCount = this._register(new CountBadge(visibleCountContainer, { countFormat: localize(1742, "{0} Results") }, this.styles.countBadge));
139
+ const visibleCount = this._register(new CountBadge(visibleCountContainer, { countFormat: localize(1743, "{0} Results") }, this.styles.countBadge));
140
140
  const countContainer = dom.append(filterContainer, $('.quick-input-count'));
141
141
  countContainer.setAttribute('aria-live', 'polite');
142
- const count = this._register(new CountBadge(countContainer, { countFormat: localize(1743, "{0} Selected") }, this.styles.countBadge));
142
+ const count = this._register(new CountBadge(countContainer, { countFormat: localize(1744, "{0} Selected") }, this.styles.countBadge));
143
143
  const inlineActionBar = this._register(new ActionBar(headerContainer, { hoverDelegate: this.options.hoverDelegate }));
144
144
  inlineActionBar.domNode.classList.add('quick-input-inline-action-bar');
145
145
  const okContainer = dom.append(headerContainer, $('.quick-input-action'));
146
146
  const ok = this._register(new Button(okContainer, this.styles.button));
147
- ok.label = localize(1744, "OK");
147
+ ok.label = localize(1745, "OK");
148
148
  this._register(ok.onDidClick(e => {
149
149
  this.onDidAcceptEmitter.fire();
150
150
  }));
151
151
  const customButtonContainer = dom.append(headerContainer, $('.quick-input-action'));
152
152
  const customButton = this._register(new Button(customButtonContainer, { ...this.styles.button, supportIcons: true }));
153
- customButton.label = localize(1745, "Custom");
153
+ customButton.label = localize(1746, "Custom");
154
154
  this._register(customButton.onDidClick(e => {
155
155
  this.onDidCustomEmitter.fire();
156
156
  }));
@@ -613,7 +613,7 @@ let QuickInputController = class QuickInputController extends Disposable {
613
613
  ui.ignoreFocusOut = false;
614
614
  ui.inputBox.toggles = undefined;
615
615
  const backKeybindingLabel = this.options.backKeybindingLabel();
616
- backButton.tooltip = backKeybindingLabel ? localize(1746, "Back ({0})", backKeybindingLabel) : localize(1747, "Back");
616
+ backButton.tooltip = backKeybindingLabel ? localize(1747, "Back ({0})", backKeybindingLabel) : localize(1748, "Back");
617
617
  ui.container.style.display = '';
618
618
  this.updateLayout();
619
619
  this.dndController?.layoutContainer();
@@ -206,7 +206,7 @@ class QuickInputItemDelegate {
206
206
  }
207
207
  class QuickInputAccessibilityProvider {
208
208
  getWidgetAriaLabel() {
209
- return localize(1748, "Quick Input");
209
+ return localize(1749, "Quick Input");
210
210
  }
211
211
  getAriaLabel(element) {
212
212
  return element.separator?.label