@codingame/monaco-vscode-xterm-common 24.2.0 → 25.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.
@@ -43,26 +43,26 @@ var TerminalChatContextKeyStrings;
43
43
  })(TerminalChatContextKeyStrings || (TerminalChatContextKeyStrings = {}));
44
44
  var TerminalChatContextKeys;
45
45
  (function (TerminalChatContextKeys) {
46
- TerminalChatContextKeys.focused = ( new RawContextKey(TerminalChatContextKeyStrings.ChatFocus, false, ( localize(11942, "Whether the chat view is focused."))));
47
- TerminalChatContextKeys.visible = ( new RawContextKey(TerminalChatContextKeyStrings.ChatVisible, false, ( localize(11943, "Whether the chat view is visible."))));
48
- TerminalChatContextKeys.requestActive = ( new RawContextKey(TerminalChatContextKeyStrings.ChatActiveRequest, false, ( localize(11944, "Whether there is an active chat request."))));
49
- TerminalChatContextKeys.inputHasText = ( new RawContextKey(TerminalChatContextKeyStrings.ChatInputHasText, false, ( localize(11945, "Whether the chat input has text."))));
46
+ TerminalChatContextKeys.focused = ( new RawContextKey(TerminalChatContextKeyStrings.ChatFocus, false, ( localize(11967, "Whether the chat view is focused."))));
47
+ TerminalChatContextKeys.visible = ( new RawContextKey(TerminalChatContextKeyStrings.ChatVisible, false, ( localize(11968, "Whether the chat view is visible."))));
48
+ TerminalChatContextKeys.requestActive = ( new RawContextKey(TerminalChatContextKeyStrings.ChatActiveRequest, false, ( localize(11969, "Whether there is an active chat request."))));
49
+ TerminalChatContextKeys.inputHasText = ( new RawContextKey(TerminalChatContextKeyStrings.ChatInputHasText, false, ( localize(11970, "Whether the chat input has text."))));
50
50
  TerminalChatContextKeys.responseContainsCodeBlock = ( new RawContextKey(
51
51
  TerminalChatContextKeyStrings.ChatResponseContainsCodeBlock,
52
52
  false,
53
- ( localize(11946, "Whether the chat response contains a code block."))
53
+ ( localize(11971, "Whether the chat response contains a code block."))
54
54
  ));
55
55
  TerminalChatContextKeys.responseContainsMultipleCodeBlocks = ( new RawContextKey(
56
56
  TerminalChatContextKeyStrings.ChatResponseContainsMultipleCodeBlocks,
57
57
  false,
58
- ( localize(11947, "Whether the chat response contains multiple code blocks."))
58
+ ( localize(11972, "Whether the chat response contains multiple code blocks."))
59
59
  ));
60
- TerminalChatContextKeys.hasChatAgent = ( new RawContextKey(TerminalChatContextKeyStrings.ChatAgentRegistered, false, ( localize(11948, "Whether a chat agent is registered for the terminal location."))));
61
- TerminalChatContextKeys.hasChatTerminals = ( new RawContextKey(TerminalChatContextKeyStrings.ChatHasTerminals, false, ( localize(11949, "Whether there are any chat terminals."))));
60
+ TerminalChatContextKeys.hasChatAgent = ( new RawContextKey(TerminalChatContextKeyStrings.ChatAgentRegistered, false, ( localize(11973, "Whether a chat agent is registered for the terminal location."))));
61
+ TerminalChatContextKeys.hasChatTerminals = ( new RawContextKey(TerminalChatContextKeyStrings.ChatHasTerminals, false, ( localize(11974, "Whether there are any chat terminals."))));
62
62
  TerminalChatContextKeys.hasHiddenChatTerminals = ( new RawContextKey(
63
63
  TerminalChatContextKeyStrings.ChatHasHiddenTerminals,
64
64
  false,
65
- ( localize(11950, "Whether there are any hidden chat terminals."))
65
+ ( localize(11975, "Whether there are any hidden chat terminals."))
66
66
  ));
67
67
  })(TerminalChatContextKeys || (TerminalChatContextKeys = {}));
68
68
 
@@ -3,7 +3,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
3
3
  import { registerColor } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
4
4
 
5
5
  const terminalStickyScrollBackground = registerColor('terminalStickyScroll.background', null, ( localize(
6
- 12216,
6
+ 12259,
7
7
  'The background color of the sticky scroll overlay in the terminal.'
8
8
  )));
9
9
  const terminalStickyScrollHoverBackground = registerColor('terminalStickyScrollHover.background', {
@@ -12,7 +12,7 @@ const terminalStickyScrollHoverBackground = registerColor('terminalStickyScrollH
12
12
  hcDark: '#E48B39',
13
13
  hcLight: '#0f4a85'
14
14
  }, ( localize(
15
- 12217,
15
+ 12260,
16
16
  'The background color of the sticky scroll overlay in the terminal when hovered.'
17
17
  )));
18
18
  registerColor('terminalStickyScroll.border', {
@@ -20,6 +20,6 @@ registerColor('terminalStickyScroll.border', {
20
20
  light: null,
21
21
  hcDark: '#6fc3df',
22
22
  hcLight: '#0f4a85'
23
- }, ( localize(12218, 'The border of the sticky scroll overlay in the terminal.')));
23
+ }, ( localize(12261, 'The border of the sticky scroll overlay in the terminal.')));
24
24
 
25
25
  export { terminalStickyScrollBackground, terminalStickyScrollHoverBackground };
@@ -21,7 +21,8 @@ export declare class TerminalStickyScrollOverlay extends Disposable {
21
21
  private _stickyScrollOverlay?;
22
22
  private readonly _xtermAddonLoader;
23
23
  private _serializeAddon?;
24
- private _webglAddon?;
24
+ private readonly _webglAddon;
25
+ private _webglAddonCustomGlyphs?;
25
26
  private _ligaturesAddon?;
26
27
  private _element?;
27
28
  private _currentStickyCommand?;
@@ -50,6 +50,7 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
50
50
  this._terminalConfigurationService = _terminalConfigurationService;
51
51
  this._themeService = _themeService;
52
52
  this._xtermAddonLoader = ( new XtermAddonImporter());
53
+ this._webglAddon = this._register(( new MutableDisposable()));
53
54
  this._refreshListeners = this._register(( new MutableDisposable()));
54
55
  this._state = OverlayState.Off;
55
56
  this._isRefreshQueued = false;
@@ -273,19 +274,19 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
273
274
  this._element = $('.terminal-sticky-scroll', undefined, hoverOverlay);
274
275
  this._xterm.raw.element.parentElement.append(this._element);
275
276
  this._register(toDisposable(() => this._element?.remove()));
276
- let hoverTitle = ( localize(12219, 'Navigate to Command'));
277
+ let hoverTitle = ( localize(12262, 'Navigate to Command'));
277
278
  const scrollToPreviousCommandKeybinding = this._keybindingService.lookupKeybinding(TerminalCommandId.ScrollToPreviousCommand);
278
279
  if (scrollToPreviousCommandKeybinding) {
279
280
  const label = scrollToPreviousCommandKeybinding.getLabel();
280
281
  if (label) {
281
- hoverTitle += '\n' + ( localize(12220, "{0} ({1})", terminalStrings.scrollToPreviousCommand.value, label));
282
+ hoverTitle += '\n' + ( localize(12263, "{0} ({1})", terminalStrings.scrollToPreviousCommand.value, label));
282
283
  }
283
284
  }
284
285
  const scrollToNextCommandKeybinding = this._keybindingService.lookupKeybinding(TerminalCommandId.ScrollToNextCommand);
285
286
  if (scrollToNextCommandKeybinding) {
286
287
  const label = scrollToNextCommandKeybinding.getLabel();
287
288
  if (label) {
288
- hoverTitle += '\n' + ( localize(12220, "{0} ({1})", terminalStrings.scrollToNextCommand.value, label));
289
+ hoverTitle += '\n' + ( localize(12263, "{0} ({1})", terminalStrings.scrollToNextCommand.value, label));
289
290
  }
290
291
  }
291
292
  hoverOverlay.title = hoverTitle;
@@ -351,21 +352,22 @@ let TerminalStickyScrollOverlay = class TerminalStickyScrollOverlay extends Disp
351
352
  drawBoldTextInBrightColors: o.drawBoldTextInBrightColors,
352
353
  minimumContrastRatio: o.minimumContrastRatio,
353
354
  tabStopWidth: o.tabStopWidth,
354
- customGlyphs: o.customGlyphs,
355
355
  };
356
356
  }
357
357
  async _refreshGpuAcceleration() {
358
- if (this._shouldLoadWebgl() && !this._webglAddon) {
358
+ if (this._shouldLoadWebgl() && (!this._webglAddon.value || this._webglAddonCustomGlyphs !== this._terminalConfigurationService.config.customGlyphs)) {
359
359
  const WebglAddon = await this._xtermAddonLoader.importAddon('webgl');
360
360
  if (this._store.isDisposed) {
361
361
  return;
362
362
  }
363
- this._webglAddon = this._register(( new WebglAddon()));
364
- this._stickyScrollOverlay?.loadAddon(this._webglAddon);
363
+ this._webglAddon.value = ( new WebglAddon({
364
+ customGlyphs: this._terminalConfigurationService.config.customGlyphs
365
+ }));
366
+ this._webglAddonCustomGlyphs = this._terminalConfigurationService.config.customGlyphs;
367
+ this._stickyScrollOverlay?.loadAddon(this._webglAddon.value);
365
368
  }
366
- else if (!this._shouldLoadWebgl() && this._webglAddon) {
367
- this._webglAddon.dispose();
368
- this._webglAddon = undefined;
369
+ else if (!this._shouldLoadWebgl() && this._webglAddon.value) {
370
+ this._webglAddon.clear();
369
371
  }
370
372
  }
371
373
  _shouldLoadWebgl() {