@codingame/monaco-vscode-xterm-common 25.1.1 → 26.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/package.json +4 -4
  2. package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +2 -2
  3. package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +20 -16
  4. package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +20 -11
  5. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +15 -21
  6. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +386 -301
  7. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +11 -2
  8. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.js +4 -8
  9. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.d.ts +0 -4
  10. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +793 -549
  11. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.d.ts +1 -1
  12. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +225 -128
  13. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +14 -5
  14. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +23 -19
  15. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +174 -126
  16. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +29 -22
  17. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +3 -1
  18. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +112 -114
  19. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +2 -1
  20. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +16 -15
  21. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +14 -14
  22. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.js +33 -23
  23. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.d.ts +2 -1
  24. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +115 -84
@@ -16,12 +16,22 @@ import { TerminalStickyScrollOverlay } from './terminalStickyScrollOverlay.js';
16
16
  var TerminalStickyScrollContribution_1;
17
17
  registerCss(stickyScroll);
18
18
  let TerminalStickyScrollContribution = class TerminalStickyScrollContribution extends Disposable {
19
- static { TerminalStickyScrollContribution_1 = this; }
20
- static { this.ID = 'terminal.stickyScroll'; }
19
+ static {
20
+ TerminalStickyScrollContribution_1 = this;
21
+ }
22
+ static {
23
+ this.ID = "terminal.stickyScroll";
24
+ }
21
25
  static get(instance) {
22
26
  return instance.getContribution(TerminalStickyScrollContribution_1.ID);
23
27
  }
24
- constructor(_ctx, _configurationService, _contextKeyService, _instantiationService, _keybindingService) {
28
+ constructor(
29
+ _ctx,
30
+ _configurationService,
31
+ _contextKeyService,
32
+ _instantiationService,
33
+ _keybindingService
34
+ ) {
25
35
  super();
26
36
  this._ctx = _ctx;
27
37
  this._configurationService = _configurationService;
@@ -32,11 +42,13 @@ let TerminalStickyScrollContribution = class TerminalStickyScrollContribution ex
32
42
  this._enableListeners = this._register(( new MutableDisposable()));
33
43
  this._disableListeners = this._register(( new MutableDisposable()));
34
44
  this._richCommandDetectionListeners = this._register(( new MutableDisposable()));
35
- this._register(Event.runAndSubscribe(this._configurationService.onDidChangeConfiguration, e => {
36
- if (!e || e.affectsConfiguration(TerminalStickyScrollSettingId.Enabled)) {
37
- this._refreshState();
38
- }
39
- }));
45
+ this._register(
46
+ Event.runAndSubscribe(this._configurationService.onDidChangeConfiguration, e => {
47
+ if (!e || e.affectsConfiguration(TerminalStickyScrollSettingId.Enabled)) {
48
+ this._refreshState();
49
+ }
50
+ })
51
+ );
40
52
  }
41
53
  xtermReady(xterm) {
42
54
  this._xterm = xterm;
@@ -54,8 +66,7 @@ let TerminalStickyScrollContribution = class TerminalStickyScrollContribution ex
54
66
  _refreshState() {
55
67
  if (this._overlay.value) {
56
68
  this._tryDisable();
57
- }
58
- else {
69
+ } else {
59
70
  this._tryEnable();
60
71
  }
61
72
  if (this._overlay.value) {
@@ -67,8 +78,7 @@ let TerminalStickyScrollContribution = class TerminalStickyScrollContribution ex
67
78
  }
68
79
  });
69
80
  }
70
- }
71
- else {
81
+ } else {
72
82
  this._disableListeners.clear();
73
83
  if (!this._enableListeners.value) {
74
84
  this._enableListeners.value = this._ctx.instance.capabilities.onDidAddCapability(e => {
@@ -83,15 +93,20 @@ let TerminalStickyScrollContribution = class TerminalStickyScrollContribution ex
83
93
  const capability = this._ctx.instance.capabilities.get(TerminalCapability.CommandDetection);
84
94
  if (this._shouldBeEnabled()) {
85
95
  const xtermCtorEventually = TerminalInstance.getXtermConstructor(this._keybindingService, this._contextKeyService);
86
- this._overlay.value = this._instantiationService.createInstance(TerminalStickyScrollOverlay, this._ctx.instance, this._xterm, this._instantiationService.createInstance(TerminalInstanceColorProvider, this._ctx.instance.targetRef), capability, xtermCtorEventually);
96
+ this._overlay.value = this._instantiationService.createInstance(
97
+ TerminalStickyScrollOverlay,
98
+ this._ctx.instance,
99
+ this._xterm,
100
+ this._instantiationService.createInstance(TerminalInstanceColorProvider, this._ctx.instance.targetRef),
101
+ capability,
102
+ xtermCtorEventually
103
+ );
87
104
  this._richCommandDetectionListeners.clear();
88
- }
89
- else if (capability && !capability.hasRichCommandDetection) {
105
+ } else if (capability && !capability.hasRichCommandDetection) {
90
106
  this._richCommandDetectionListeners.value = capability.onSetRichCommandDetection(() => {
91
107
  this._refreshState();
92
108
  });
93
- }
94
- else {
109
+ } else {
95
110
  this._richCommandDetectionListeners.clear();
96
111
  }
97
112
  }
@@ -107,11 +122,6 @@ let TerminalStickyScrollContribution = class TerminalStickyScrollContribution ex
107
122
  return result;
108
123
  }
109
124
  };
110
- TerminalStickyScrollContribution = TerminalStickyScrollContribution_1 = ( __decorate([
111
- ( __param(1, IConfigurationService)),
112
- ( __param(2, IContextKeyService)),
113
- ( __param(3, IInstantiationService)),
114
- ( __param(4, IKeybindingService))
115
- ], TerminalStickyScrollContribution));
125
+ TerminalStickyScrollContribution = TerminalStickyScrollContribution_1 = ( __decorate([( __param(1, IConfigurationService)), ( __param(2, IContextKeyService)), ( __param(3, IInstantiationService)), ( __param(4, IKeybindingService))], TerminalStickyScrollContribution));
116
126
 
117
127
  export { TerminalStickyScrollContribution };
@@ -32,6 +32,7 @@ export declare class TerminalStickyScrollOverlay extends Disposable {
32
32
  private _state;
33
33
  private _isRefreshQueued;
34
34
  private _rawMaxLineCount;
35
+ private _ignoredCommands;
35
36
  private _pendingShowOperation;
36
37
  constructor(_instance: ITerminalInstance, _xterm: IXtermTerminal & {
37
38
  raw: RawXtermTerminal;
@@ -53,5 +54,5 @@ export declare class TerminalStickyScrollOverlay extends Disposable {
53
54
  private _refreshGpuAcceleration;
54
55
  private _shouldLoadWebgl;
55
56
  private _getTheme;
56
- private _isClearCommand;
57
+ private _isIgnoredCommand;
57
58
  }
@@ -26,20 +26,33 @@ import { XtermAddonImporter } from '@codingame/monaco-vscode-xterm-addons-common
26
26
 
27
27
  registerCss(stickyScroll);
28
28
  var OverlayState;
29
- (function (OverlayState) {
29
+ (function(OverlayState) {
30
30
  OverlayState[OverlayState["Off"] = 0] = "Off";
31
31
  OverlayState[OverlayState["On"] = 1] = "On";
32
32
  })(OverlayState || (OverlayState = {}));
33
33
  var CssClasses;
34
- (function (CssClasses) {
34
+ (function(CssClasses) {
35
35
  CssClasses["Visible"] = "visible";
36
36
  })(CssClasses || (CssClasses = {}));
37
37
  var Constants;
38
- (function (Constants) {
38
+ (function(Constants) {
39
39
  Constants[Constants["StickyScrollPercentageCap"] = 0.4] = "StickyScrollPercentageCap";
40
40
  })(Constants || (Constants = {}));
41
41
  let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disposable {
42
- constructor(_instance, _xterm, _xtermColorProvider, _commandDetection, xtermCtor, configurationService, contextKeyService, _contextMenuService, _keybindingService, menuService, _terminalConfigurationService, _themeService) {
42
+ constructor(
43
+ _instance,
44
+ _xterm,
45
+ _xtermColorProvider,
46
+ _commandDetection,
47
+ xtermCtor,
48
+ configurationService,
49
+ contextKeyService,
50
+ _contextMenuService,
51
+ _keybindingService,
52
+ menuService,
53
+ _terminalConfigurationService,
54
+ _themeService
55
+ ) {
43
56
  super();
44
57
  this._instance = _instance;
45
58
  this._xterm = _xterm;
@@ -55,16 +68,26 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
55
68
  this._state = OverlayState.Off;
56
69
  this._isRefreshQueued = false;
57
70
  this._rawMaxLineCount = 5;
71
+ this._ignoredCommands = [];
58
72
  this._pendingShowOperation = false;
59
- this._contextMenu = this._register(menuService.createMenu(MenuId.TerminalStickyScrollContext, contextKeyService));
73
+ this._contextMenu = this._register(
74
+ menuService.createMenu(MenuId.TerminalStickyScrollContext, contextKeyService)
75
+ );
60
76
  this._register(Event.runAndSubscribe(this._xterm.raw.buffer.onBufferChange, buffer => {
61
- this._setState((buffer ?? this._xterm.raw.buffer.active).type === 'normal' ? OverlayState.On : OverlayState.Off);
62
- }));
63
- this._register(Event.runAndSubscribe(configurationService.onDidChangeConfiguration, e => {
64
- if (!e || e.affectsConfiguration(TerminalStickyScrollSettingId.MaxLineCount)) {
65
- this._rawMaxLineCount = configurationService.getValue(TerminalStickyScrollSettingId.MaxLineCount);
66
- }
77
+ this._setState(
78
+ (buffer ?? this._xterm.raw.buffer.active).type === "normal" ? OverlayState.On : OverlayState.Off
79
+ );
67
80
  }));
81
+ this._register(
82
+ Event.runAndSubscribe(configurationService.onDidChangeConfiguration, e => {
83
+ if (!e || e.affectsConfiguration(TerminalStickyScrollSettingId.MaxLineCount)) {
84
+ this._rawMaxLineCount = configurationService.getValue(TerminalStickyScrollSettingId.MaxLineCount);
85
+ }
86
+ if (!e || e.affectsConfiguration(TerminalStickyScrollSettingId.IgnoredCommands)) {
87
+ this._ignoredCommands = configurationService.getValue(TerminalStickyScrollSettingId.IgnoredCommands);
88
+ }
89
+ })
90
+ );
68
91
  this._register(this._instance.onDidChangeTarget(() => this._syncOptions()));
69
92
  xtermCtor.then(ctor => {
70
93
  if (this._store.isDisposed) {
@@ -94,7 +117,7 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
94
117
  this._refresh();
95
118
  }
96
119
  }));
97
- this._xtermAddonLoader.importAddon('serialize').then(SerializeAddon => {
120
+ this._xtermAddonLoader.importAddon("serialize").then(SerializeAddon => {
98
121
  if (this._store.isDisposed) {
99
122
  return;
100
123
  }
@@ -105,22 +128,24 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
105
128
  });
106
129
  }
107
130
  lockHide() {
108
- this._element?.classList.add('lock-hide');
131
+ this._element?.classList.add("lock-hide");
109
132
  }
110
133
  unlockHide() {
111
- this._element?.classList.remove('lock-hide');
134
+ this._element?.classList.remove("lock-hide");
112
135
  }
113
136
  _setState(state) {
114
137
  if (this._state === state) {
115
138
  return;
116
139
  }
117
140
  switch (state) {
118
- case OverlayState.Off: {
141
+ case OverlayState.Off:
142
+ {
119
143
  this._setVisible(false);
120
144
  this._uninstallRefreshListeners();
121
145
  break;
122
146
  }
123
- case OverlayState.On: {
147
+ case OverlayState.On:
148
+ {
124
149
  this._refresh();
125
150
  this._installRefreshListeners();
126
151
  break;
@@ -129,9 +154,16 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
129
154
  }
130
155
  _installRefreshListeners() {
131
156
  if (!this._refreshListeners.value) {
132
- this._refreshListeners.value = combinedDisposable(Event.any(this._xterm.raw.onScroll, this._xterm.raw.onLineFeed,
133
- this._xterm.raw.onCursorMove)(() => this._refresh()),
134
- addStandardDisposableListener(this._xterm.raw.element.querySelector('.xterm-viewport'), 'scroll', () => this._refresh()));
157
+ this._refreshListeners.value = combinedDisposable(Event.any(
158
+ this._xterm.raw.onScroll,
159
+ this._xterm.raw.onLineFeed,
160
+ this._xterm.raw.onCursorMove
161
+ )(() => this._refresh()),
162
+ addStandardDisposableListener(
163
+ this._xterm.raw.element.querySelector(".xterm-viewport"),
164
+ "scroll",
165
+ () => this._refresh()
166
+ ));
135
167
  }
136
168
  }
137
169
  _uninstallRefreshListeners() {
@@ -141,8 +173,7 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
141
173
  if (isVisible) {
142
174
  this._pendingShowOperation = true;
143
175
  this._show();
144
- }
145
- else {
176
+ } else {
146
177
  this._hide();
147
178
  }
148
179
  }
@@ -170,7 +201,7 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
170
201
  _refreshNow() {
171
202
  const command = this._commandDetection.getCommandForLine(this._xterm.raw.buffer.active.viewportY);
172
203
  this._currentStickyCommand = undefined;
173
- if (!command || this._isClearCommand(command)) {
204
+ if (!command || this._isIgnoredCommand(command)) {
174
205
  this._setVisible(false);
175
206
  return;
176
207
  }
@@ -205,7 +236,10 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
205
236
  const stickyScrollLineStart = startMarker.line - (promptRowCount - 1);
206
237
  const isPartialCommand = !isFullTerminalCommand(command);
207
238
  const rowOffset = !isPartialCommand && command.endMarker ? Math.max(buffer.viewportY - command.endMarker.line + 1, 0) : 0;
208
- const maxLineCount = Math.min(this._rawMaxLineCount, Math.floor(xterm.rows * Constants.StickyScrollPercentageCap));
239
+ const maxLineCount = Math.min(
240
+ this._rawMaxLineCount,
241
+ Math.floor(xterm.rows * Constants.StickyScrollPercentageCap)
242
+ );
209
243
  const stickyScrollLineCount = Math.min(promptRowCount + commandRowCount - 1, maxLineCount) - rowOffset;
210
244
  const isTruncated = stickyScrollLineCount < promptRowCount + commandRowCount - 1;
211
245
  if (buffer.viewportY <= stickyScrollLineStart) {
@@ -214,8 +248,7 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
214
248
  }
215
249
  if (isPartialCommand && buffer.viewportY === buffer.baseY && buffer.cursorY === xterm.rows - 1) {
216
250
  const line = buffer.getLine(buffer.baseY + xterm.rows - 1);
217
- if ((buffer.cursorX === 1 && lineStartsWith(line, ':')) ||
218
- (buffer.cursorX === 5 && lineStartsWith(line, '(END)'))) {
251
+ if ((buffer.cursorX === 1 && lineStartsWith(line, ":")) || (buffer.cursorX === 5 && lineStartsWith(line, "(END)"))) {
219
252
  this._setVisible(false);
220
253
  return;
221
254
  }
@@ -225,16 +258,14 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
225
258
  start: stickyScrollLineStart + rowOffset,
226
259
  end: stickyScrollLineStart + rowOffset + Math.max(stickyScrollLineCount - 1, 0)
227
260
  }
228
- }) + (isTruncated ? '\x1b[0m …' : '');
261
+ }) + (isTruncated ? "\u001b[0m …" : "");
229
262
  if (isPartialCommand && removeAnsiEscapeCodes(content).length === 0) {
230
263
  this._setVisible(false);
231
264
  return;
232
265
  }
233
- if (content && this._currentContent !== content ||
234
- this._stickyScrollOverlay.cols !== xterm.cols ||
235
- this._stickyScrollOverlay.rows !== stickyScrollLineCount) {
266
+ if (content && this._currentContent !== content || this._stickyScrollOverlay.cols !== xterm.cols || this._stickyScrollOverlay.rows !== stickyScrollLineCount) {
236
267
  this._stickyScrollOverlay.resize(this._stickyScrollOverlay.cols, stickyScrollLineCount);
237
- this._stickyScrollOverlay.write('\x1b[0m\x1b[H\x1b[2J');
268
+ this._stickyScrollOverlay.write("\u001b[0m\u001b[H\u001b[2J");
238
269
  this._stickyScrollOverlay.write(content);
239
270
  this._currentContent = content;
240
271
  }
@@ -257,36 +288,35 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
257
288
  this._element.style.bottom = `${termBox.height - overlayHeight + 1 + endMarkerOffset}px`;
258
289
  }
259
290
  }
260
- }
261
- else {
291
+ } else {
262
292
  this._setVisible(false);
263
293
  }
264
294
  }
265
295
  _ensureElement() {
266
296
  if (
267
297
  this._element ||
268
- !this._stickyScrollOverlay ||
269
- !this._xterm?.raw.element?.parentElement) {
298
+ !this._stickyScrollOverlay ||
299
+ !this._xterm?.raw.element?.parentElement) {
270
300
  return;
271
301
  }
272
302
  const overlay = this._stickyScrollOverlay;
273
- const hoverOverlay = $('.hover-overlay');
274
- this._element = $('.terminal-sticky-scroll', undefined, hoverOverlay);
303
+ const hoverOverlay = $(".hover-overlay");
304
+ this._element = $(".terminal-sticky-scroll", undefined, hoverOverlay);
275
305
  this._xterm.raw.element.parentElement.append(this._element);
276
306
  this._register(toDisposable(() => this._element?.remove()));
277
- let hoverTitle = ( localize(12263, 'Navigate to Command'));
307
+ let hoverTitle = ( localize(12619, "Navigate to Command"));
278
308
  const scrollToPreviousCommandKeybinding = this._keybindingService.lookupKeybinding(TerminalCommandId.ScrollToPreviousCommand);
279
309
  if (scrollToPreviousCommandKeybinding) {
280
310
  const label = scrollToPreviousCommandKeybinding.getLabel();
281
311
  if (label) {
282
- hoverTitle += '\n' + ( localize(12264, "{0} ({1})", terminalStrings.scrollToPreviousCommand.value, label));
312
+ hoverTitle += "\n" + ( localize(12620, "{0} ({1})", terminalStrings.scrollToPreviousCommand.value, label));
283
313
  }
284
314
  }
285
315
  const scrollToNextCommandKeybinding = this._keybindingService.lookupKeybinding(TerminalCommandId.ScrollToNextCommand);
286
316
  if (scrollToNextCommandKeybinding) {
287
317
  const label = scrollToNextCommandKeybinding.getLabel();
288
318
  if (label) {
289
- hoverTitle += '\n' + ( localize(12264, "{0} ({1})", terminalStrings.scrollToNextCommand.value, label));
319
+ hoverTitle += "\n" + ( localize(12620, "{0} ({1})", terminalStrings.scrollToNextCommand.value, label));
290
320
  }
291
321
  }
292
322
  hoverOverlay.title = hoverTitle;
@@ -295,37 +325,55 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
295
325
  this._element.style.right = `${scrollBarWidth}px`;
296
326
  }
297
327
  this._stickyScrollOverlay.open(this._element);
298
- this._stickyScrollOverlay.attachCustomKeyEventHandler((event) => {
299
- if (event.key === 'Tab') {
328
+ this._stickyScrollOverlay.attachCustomKeyEventHandler(event => {
329
+ if (event.key === "Tab") {
300
330
  return false;
301
331
  }
302
332
  return true;
303
333
  });
304
- this._xtermAddonLoader.importAddon('ligatures').then(LigaturesAddon => {
334
+ this._xtermAddonLoader.importAddon("ligatures").then(LigaturesAddon => {
305
335
  if (this._store.isDisposed || !this._stickyScrollOverlay) {
306
336
  return;
307
337
  }
308
338
  this._ligaturesAddon = ( new LigaturesAddon());
309
339
  this._stickyScrollOverlay.loadAddon(this._ligaturesAddon);
310
340
  });
311
- this._register(addStandardDisposableListener(hoverOverlay, 'click', () => {
341
+ this._register(addStandardDisposableListener(hoverOverlay, "click", () => {
312
342
  if (this._xterm && this._currentStickyCommand) {
313
343
  this._xterm.markTracker.revealCommand(this._currentStickyCommand);
314
344
  this._instance.focus();
315
345
  }
316
346
  }));
317
- this._register(addStandardDisposableListener(hoverOverlay, 'wheel', e => this._xterm?.raw.element?.dispatchEvent(( new WheelEvent(e.type, e)))));
318
- this._register(addDisposableListener(hoverOverlay, 'mousedown', e => {
347
+ this._register(addStandardDisposableListener(
348
+ hoverOverlay,
349
+ "wheel",
350
+ e => this._xterm?.raw.element?.dispatchEvent(( new WheelEvent(e.type, e)))
351
+ ));
352
+ this._register(addDisposableListener(hoverOverlay, "mousedown", e => {
319
353
  e.stopImmediatePropagation();
320
354
  e.preventDefault();
321
355
  }));
322
- this._register(addDisposableListener(hoverOverlay, 'contextmenu', e => {
356
+ this._register(addDisposableListener(hoverOverlay, "contextmenu", e => {
323
357
  e.stopImmediatePropagation();
324
358
  e.preventDefault();
325
- openContextMenu(getWindow(hoverOverlay), e, this._instance, this._contextMenu, this._contextMenuService);
359
+ openContextMenu(
360
+ getWindow(hoverOverlay),
361
+ e,
362
+ this._instance,
363
+ this._contextMenu,
364
+ this._contextMenuService
365
+ );
326
366
  }));
327
- this._register(addStandardDisposableListener(hoverOverlay, 'mouseover', () => overlay.options.theme = this._getTheme(true)));
328
- this._register(addStandardDisposableListener(hoverOverlay, 'mouseleave', () => overlay.options.theme = this._getTheme(false)));
367
+ this._register(addStandardDisposableListener(
368
+ hoverOverlay,
369
+ "mouseover",
370
+ () => overlay.options.theme = this._getTheme(true)
371
+ ));
372
+ this._register(addStandardDisposableListener(
373
+ hoverOverlay,
374
+ "mouseleave",
375
+ () => overlay.options.theme = this._getTheme(false)
376
+ ));
329
377
  }
330
378
  _syncOptions() {
331
379
  if (!this._stickyScrollOverlay) {
@@ -338,9 +386,9 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
338
386
  _getOptions() {
339
387
  const o = this._xterm.raw.options;
340
388
  return {
341
- cursorInactiveStyle: 'none',
389
+ cursorInactiveStyle: "none",
342
390
  scrollback: 0,
343
- logLevel: 'off',
391
+ logLevel: "off",
344
392
  theme: this._getTheme(false),
345
393
  documentOverride: o.documentOverride,
346
394
  fontFamily: o.fontFamily,
@@ -351,12 +399,12 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
351
399
  lineHeight: o.lineHeight,
352
400
  drawBoldTextInBrightColors: o.drawBoldTextInBrightColors,
353
401
  minimumContrastRatio: o.minimumContrastRatio,
354
- tabStopWidth: o.tabStopWidth,
402
+ tabStopWidth: o.tabStopWidth
355
403
  };
356
404
  }
357
405
  async _refreshGpuAcceleration() {
358
406
  if (this._shouldLoadWebgl() && (!this._webglAddon.value || this._webglAddonCustomGlyphs !== this._terminalConfigurationService.config.customGlyphs)) {
359
- const WebglAddon = await this._xtermAddonLoader.importAddon('webgl');
407
+ const WebglAddon = await this._xtermAddonLoader.importAddon("webgl");
360
408
  if (this._store.isDisposed) {
361
409
  return;
362
410
  }
@@ -365,56 +413,39 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
365
413
  }));
366
414
  this._webglAddonCustomGlyphs = this._terminalConfigurationService.config.customGlyphs;
367
415
  this._stickyScrollOverlay?.loadAddon(this._webglAddon.value);
368
- }
369
- else if (!this._shouldLoadWebgl() && this._webglAddon.value) {
416
+ } else if (!this._shouldLoadWebgl() && this._webglAddon.value) {
370
417
  this._webglAddon.clear();
371
418
  }
372
419
  }
373
420
  _shouldLoadWebgl() {
374
- return this._terminalConfigurationService.config.gpuAcceleration === 'auto' || this._terminalConfigurationService.config.gpuAcceleration === 'on';
421
+ return this._terminalConfigurationService.config.gpuAcceleration === "auto" || this._terminalConfigurationService.config.gpuAcceleration === "on";
375
422
  }
376
423
  _getTheme(isHovering) {
377
424
  const theme = this._themeService.getColorTheme();
378
425
  return {
379
426
  ...this._xterm.getXtermTheme(),
380
- background: isHovering
381
- ? theme.getColor(terminalStickyScrollHoverBackground)?.toString() ?? this._xtermColorProvider.getBackgroundColor(theme)?.toString()
382
- : theme.getColor(terminalStickyScrollBackground)?.toString() ?? this._xtermColorProvider.getBackgroundColor(theme)?.toString(),
427
+ background: isHovering ? theme.getColor(terminalStickyScrollHoverBackground)?.toString() ?? this._xtermColorProvider.getBackgroundColor(theme)?.toString() : theme.getColor(terminalStickyScrollBackground)?.toString() ?? this._xtermColorProvider.getBackgroundColor(theme)?.toString(),
383
428
  selectionBackground: undefined,
384
429
  selectionInactiveBackground: undefined
385
430
  };
386
431
  }
387
- _isClearCommand(command) {
432
+ _isIgnoredCommand(command) {
388
433
  if (!command.command) {
389
434
  return false;
390
435
  }
391
436
  const trimmedCommand = command.command.trim().toLowerCase();
392
- const clearCommands = [
393
- 'clear',
394
- 'cls',
395
- 'clear-host',
396
- ];
397
- return clearCommands.includes(trimmedCommand);
437
+ return ( this._ignoredCommands.some(cmd => cmd.toLowerCase() === trimmedCommand));
398
438
  }
399
439
  };
400
- TerminalStickyScrollOverlay.__decorator = ( __decorate([
401
- debounce(100)
402
- ], TerminalStickyScrollOverlay.prototype, "_show", null));
403
- TerminalStickyScrollOverlay.__decorator = ( __decorate([
404
- throttle(0)
405
- ], TerminalStickyScrollOverlay.prototype, "_syncOptions", null));
406
- TerminalStickyScrollOverlay.__decorator = ( __decorate([
407
- throttle(0)
408
- ], TerminalStickyScrollOverlay.prototype, "_refreshGpuAcceleration", null));
409
- TerminalStickyScrollOverlay = ( __decorate([
410
- ( __param(5, IConfigurationService)),
411
- ( __param(6, IContextKeyService)),
412
- ( __param(7, IContextMenuService)),
413
- ( __param(8, IKeybindingService)),
414
- ( __param(9, IMenuService)),
415
- ( __param(10, ITerminalConfigurationService)),
416
- ( __param(11, IThemeService))
417
- ], TerminalStickyScrollOverlay));
440
+ TerminalStickyScrollOverlay.__decorator = ( __decorate([debounce(100)], TerminalStickyScrollOverlay.prototype, "_show", null));
441
+ TerminalStickyScrollOverlay.__decorator = ( __decorate([throttle(0)], TerminalStickyScrollOverlay.prototype, "_syncOptions", null));
442
+ TerminalStickyScrollOverlay.__decorator = ( __decorate(
443
+ [throttle(0)],
444
+ TerminalStickyScrollOverlay.prototype,
445
+ "_refreshGpuAcceleration",
446
+ null
447
+ ));
448
+ TerminalStickyScrollOverlay = ( __decorate([( __param(5, IConfigurationService)), ( __param(6, IContextKeyService)), ( __param(7, IContextMenuService)), ( __param(8, IKeybindingService)), ( __param(9, IMenuService)), ( __param(10, ITerminalConfigurationService)), ( __param(11, IThemeService))], TerminalStickyScrollOverlay));
418
449
  function lineStartsWith(line, text) {
419
450
  if (!line) {
420
451
  return false;