@codingame/monaco-vscode-xterm-common 33.0.9 → 34.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/package.json +4 -4
  2. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/notifications.d.ts +51 -0
  3. package/vscode/src/vs/platform/agentHost/common/state/protocol/common/notifications.js +9 -0
  4. package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.js +14 -13
  5. package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.js +8 -8
  6. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +5 -5
  7. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +61 -61
  8. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +42 -31
  9. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +9 -3
  10. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.d.ts +1 -1
  11. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +7 -16
  12. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +5 -5
  13. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +3 -3
  14. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.d.ts +38 -0
  15. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +321 -0
  16. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +78 -0
  17. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +83 -0
  18. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +3 -3
  19. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +3 -3
  20. package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +0 -179
  21. package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.js +0 -16
@@ -84,7 +84,7 @@ import { ProcessState, TERMINAL_VIEW_ID, TerminalCommandId } from '@codingame/mo
84
84
  import { ITerminalProfileResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal.service';
85
85
  import { TERMINAL_BACKGROUND_COLOR } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry';
86
86
  import { TerminalContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminalContextKey';
87
- import { getShellIntegrationTimeout, preparePathForShell, getUriLabelForShell, getWorkspaceForTerminal } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment';
87
+ import { getShellIntegrationTimeout, preparePathForShell, getUriLabelForShell, getWorkspaceForTerminal } from '../common/terminalEnvironment.js';
88
88
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
89
89
  import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
90
90
  import { IHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service';
@@ -774,13 +774,13 @@ let TerminalInstance = class TerminalInstance extends Disposable {
774
774
  }
775
775
  xtermConstructor = Promises.withAsyncBody(async resolve => {
776
776
  const Terminal = (await import('@xterm/xterm')).Terminal;
777
- Terminal.strings.promptLabel = ( localize(13999, "Terminal input"));
777
+ Terminal.strings.promptLabel = ( localize(14188, "Terminal input"));
778
778
  Terminal.strings.tooMuchOutput = keybinding ? ( localize(
779
- 14000,
779
+ 14189,
780
780
  "Use the accessible buffer {0} to manually review output",
781
781
  keybinding.getLabel()
782
782
  )) : ( localize(
783
- 14001,
783
+ 14190,
784
784
  "Use the Terminal: Focus Accessible Buffer command to manually review output"
785
785
  ));
786
786
  resolve(Terminal);
@@ -842,7 +842,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
842
842
  id: TerminalStatus.Bell,
843
843
  severity: Severity.Warning,
844
844
  icon: Codicon.bell,
845
- tooltip: ( localize(14002, "Bell"))
845
+ tooltip: ( localize(14191, "Bell"))
846
846
  }, this._terminalConfigurationService.config.bellDuration);
847
847
  }
848
848
  this._accessibilitySignalService.playSignal(AccessibilitySignal.terminalBell);
@@ -920,7 +920,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
920
920
  if (!instance.xterm) {
921
921
  return;
922
922
  }
923
- const cmdDetectionType = (instance.capabilities.get(TerminalCapability.CommandDetection)?.hasRichCommandDetection ? ( localize(14003, "Rich")) : ( instance.capabilities.has(TerminalCapability.CommandDetection)) ? ( localize(14004, "Basic")) : instance.usedShellIntegrationInjection ? ( localize(14005, "Injection failed to activate")) : ( localize(14006, "No")));
923
+ const cmdDetectionType = (instance.capabilities.get(TerminalCapability.CommandDetection)?.hasRichCommandDetection ? ( localize(14192, "Rich")) : ( instance.capabilities.has(TerminalCapability.CommandDetection)) ? ( localize(14193, "Basic")) : instance.usedShellIntegrationInjection ? ( localize(14194, "Injection failed to activate")) : ( localize(14195, "No")));
924
924
  const detailedAdditions = [];
925
925
  if (instance.shellType) {
926
926
  detailedAdditions.push(`Shell type: \`${instance.shellType}\``);
@@ -945,8 +945,8 @@ let TerminalInstance = class TerminalInstance extends Disposable {
945
945
  instance.statusList.add({
946
946
  id: TerminalStatus.ShellIntegrationInfo,
947
947
  severity: Severity.Info,
948
- tooltip: `${( localize(14007, "Shell integration"))}: ${cmdDetectionType}`,
949
- detailedTooltip: `${( localize(14007, "Shell integration"))}: ${cmdDetectionType}${detailedAdditionsString}`
948
+ tooltip: `${( localize(14196, "Shell integration"))}: ${cmdDetectionType}`,
949
+ detailedTooltip: `${( localize(14196, "Shell integration"))}: ${cmdDetectionType}${detailedAdditionsString}`
950
950
  });
951
951
  }
952
952
  async runCommand(
@@ -1192,6 +1192,8 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1192
1192
  if (this._exitReason === undefined) {
1193
1193
  this._exitReason = reason ?? TerminalExitReason.Unknown;
1194
1194
  }
1195
+ this._resizeDebouncer?.dispose();
1196
+ this._resizeDebouncer = undefined;
1195
1197
  this._processManager.dispose();
1196
1198
  this._onProcessExit(undefined);
1197
1199
  this._onDisposed.fire(this);
@@ -1415,7 +1417,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1415
1417
  id: TerminalStatus.Disconnected,
1416
1418
  severity: Severity.Error,
1417
1419
  icon: Codicon.debugDisconnect,
1418
- tooltip: ( localize(14008, "Lost connection to process"))
1420
+ tooltip: ( localize(14197, "Lost connection to process"))
1419
1421
  });
1420
1422
  }));
1421
1423
  this._register(processManager.onPtyReconnect(() => {
@@ -1434,12 +1436,12 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1434
1436
  const isRemoteTerminal = !!this.remoteAuthority;
1435
1437
  if (!trusted && !(isRemoteTerminal && this._workbenchEnvironmentService.remoteAuthority)) {
1436
1438
  this._onProcessExit({
1437
- message: ( localize(14009, "Cannot launch a terminal process in an untrusted workspace"))
1439
+ message: ( localize(14198, "Cannot launch a terminal process in an untrusted workspace"))
1438
1440
  });
1439
1441
  } else if (this._workspaceContextService.getWorkspace().folders.length === 0 && this._cwd && this._userHome && normalizeDriveLetter(this._cwd) !== normalizeDriveLetter(this._userHome)) {
1440
1442
  this._onProcessExit({
1441
1443
  message: ( localize(
1442
- 14010,
1444
+ 14199,
1443
1445
  "Cannot launch a terminal process in an empty workspace with cwd {0} different from userHome {1}",
1444
1446
  this._cwd,
1445
1447
  this._userHome
@@ -1553,6 +1555,9 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1553
1555
  this._processManager.processState
1554
1556
  );
1555
1557
  this._onExit.fire(exitCodeOrError);
1558
+ if (this.isDisposed) {
1559
+ return;
1560
+ }
1556
1561
  const waitOnExit = this.waitOnExit;
1557
1562
  if (waitOnExit && this._processManager.processState !== ProcessState.KilledByUser) {
1558
1563
  this._xtermReadyPromise.then(xterm => {
@@ -1609,10 +1614,10 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1609
1614
  id: TerminalStatus.ShellIntegrationAttentionNeeded,
1610
1615
  severity: Severity.Warning,
1611
1616
  icon: Codicon.warning,
1612
- tooltip: `${exitMessage} ` + ( localize(14011, "Disabling shell integration in user settings might help.")),
1617
+ tooltip: `${exitMessage} ` + ( localize(14200, "Disabling shell integration in user settings might help.")),
1613
1618
  hoverActions: [{
1614
1619
  commandId: TerminalCommandId.ShellIntegrationLearnMore,
1615
- label: ( localize(14012, "Learn more about shell integration")),
1620
+ label: ( localize(14201, "Learn more about shell integration")),
1616
1621
  run: () => {
1617
1622
  this._openerService.open(
1618
1623
  "https://code.visualstudio.com/docs/editor/integrated-terminal#_shell-integration"
@@ -1620,7 +1625,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1620
1625
  }
1621
1626
  }, {
1622
1627
  commandId: "workbench.action.openSettings",
1623
- label: ( localize(14013, "Open user settings")),
1628
+ label: ( localize(14202, "Open user settings")),
1624
1629
  run: () => {
1625
1630
  this._commandService.executeCommand(
1626
1631
  "workbench.action.openSettings",
@@ -1754,7 +1759,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1754
1759
  return true;
1755
1760
  }
1756
1761
  const trustRequest = await this._workspaceTrustRequestService.requestWorkspaceTrust({
1757
- message: ( localize(14014, "Creating a terminal process requires executing code"))
1762
+ message: ( localize(14203, "Creating a terminal process requires executing code"))
1758
1763
  });
1759
1764
  return trustRequest === true;
1760
1765
  }
@@ -1812,7 +1817,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1812
1817
  }
1813
1818
  }
1814
1819
  async _resize(immediate) {
1815
- if (!this.xterm) {
1820
+ if (!this.xterm || !this._resizeDebouncer) {
1816
1821
  return;
1817
1822
  }
1818
1823
  let cols = this.cols;
@@ -1847,7 +1852,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1847
1852
  cols,
1848
1853
  rows
1849
1854
  };
1850
- this._resizeDebouncer.resize(cols, rows, immediate ?? false);
1855
+ this._resizeDebouncer?.resize(cols, rows, immediate ?? false);
1851
1856
  }
1852
1857
  async _updatePtyDimensions(rawXterm) {
1853
1858
  if (this.isDisposed) {
@@ -1882,21 +1887,21 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1882
1887
  const labelParts = [];
1883
1888
  if (xterm && xterm.textarea) {
1884
1889
  if (title && title.length > 0) {
1885
- labelParts.push(( localize(14015, "Terminal {0}, {1}", terminalId, title)));
1890
+ labelParts.push(( localize(14204, "Terminal {0}, {1}", terminalId, title)));
1886
1891
  } else {
1887
- labelParts.push(( localize(14016, "Terminal {0}", terminalId)));
1892
+ labelParts.push(( localize(14205, "Terminal {0}", terminalId)));
1888
1893
  }
1889
1894
  const screenReaderOptimized = this._accessibilityService.isScreenReaderOptimized();
1890
1895
  if (!screenReaderOptimized) {
1891
1896
  labelParts.push(( localize(
1892
- 14017,
1897
+ 14206,
1893
1898
  "Run the command: Toggle Screen Reader Accessibility Mode for an optimized screen reader experience"
1894
1899
  )));
1895
1900
  }
1896
1901
  const accessibilityHelpKeybinding = this._keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp)?.getLabel();
1897
1902
  if (this._configurationService.getValue(AccessibilityVerbositySettingId.Terminal) && accessibilityHelpKeybinding) {
1898
1903
  labelParts.push(( localize(
1899
- 14018,
1904
+ 14207,
1900
1905
  "Use {0} for terminal accessibility help",
1901
1906
  accessibilityHelpKeybinding
1902
1907
  )));
@@ -1905,7 +1910,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1905
1910
  }
1906
1911
  }
1907
1912
  _updateTitleProperties(title, eventSource) {
1908
- if (!title) {
1913
+ if (title === undefined) {
1909
1914
  return this._processName;
1910
1915
  }
1911
1916
  switch (eventSource) {
@@ -1950,7 +1955,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1950
1955
  }
1951
1956
  async setFixedDimensions() {
1952
1957
  const cols = await this._quickInputService.input({
1953
- title: ( localize(14019, "Set Fixed Dimensions: Column")),
1958
+ title: ( localize(14208, "Set Fixed Dimensions: Column")),
1954
1959
  placeHolder: "Enter a number of columns or leave empty for automatic width",
1955
1960
  validateInput: async text => text.length > 0 && !text.match(/^\d+$/) ? {
1956
1961
  content: "Enter a number or leave empty size automatically",
@@ -1964,7 +1969,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
1964
1969
  this._labelComputer?.refreshLabel(this);
1965
1970
  this._terminalHasFixedWidth.set(!!this._fixedCols);
1966
1971
  const rows = await this._quickInputService.input({
1967
- title: ( localize(14020, "Set Fixed Dimensions: Row")),
1972
+ title: ( localize(14209, "Set Fixed Dimensions: Row")),
1968
1973
  placeHolder: "Enter a number of rows or leave empty for automatic height",
1969
1974
  validateInput: async text => text.length > 0 && !text.match(/^\d+$/) ? {
1970
1975
  content: "Enter a number or leave empty size automatically",
@@ -2074,7 +2079,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
2074
2079
  _onEnvironmentVariableInfoChanged(info) {
2075
2080
  if (info.requiresAction) {
2076
2081
  this.xterm?.raw.textarea?.setAttribute("aria-label", ( localize(
2077
- 14021,
2082
+ 14210,
2078
2083
  "Terminal {0} environment is stale, run the 'Show Environment Information' command for more information",
2079
2084
  this._instanceId
2080
2085
  )));
@@ -2132,6 +2137,9 @@ let TerminalInstance = class TerminalInstance extends Disposable {
2132
2137
  } else {
2133
2138
  resource = URI.file(cwd);
2134
2139
  }
2140
+ if (!(await this._fileService.canHandleResource(resource))) {
2141
+ return undefined;
2142
+ }
2135
2143
  if (await this._fileService.exists(resource)) {
2136
2144
  return resource;
2137
2145
  }
@@ -2145,6 +2153,9 @@ let TerminalInstance = class TerminalInstance extends Disposable {
2145
2153
  return this._processManager.updateProperty(type, value);
2146
2154
  }
2147
2155
  async rename(title, source) {
2156
+ if (title !== undefined && !title) {
2157
+ title = undefined;
2158
+ }
2148
2159
  this._setTitle(title, source ?? TitleEventSource.Api);
2149
2160
  }
2150
2161
  _setTitle(title, eventSource) {
@@ -2230,7 +2241,7 @@ let TerminalInstance = class TerminalInstance extends Disposable {
2230
2241
  disposables.push(quickPick);
2231
2242
  quickPick.items = items;
2232
2243
  quickPick.matchOnDescription = true;
2233
- quickPick.placeholder = ( localize(14022, "Select a color for the terminal"));
2244
+ quickPick.placeholder = ( localize(14211, "Select a color for the terminal"));
2234
2245
  quickPick.show();
2235
2246
  const result = await ( new Promise(r => {
2236
2247
  disposables.push(quickPick.onDidHide(() => r(undefined)));
@@ -2567,24 +2578,24 @@ function parseExitResult(exitCodeOrError, shellLaunchConfig, processState, initi
2567
2578
  if (processState === ProcessState.KilledDuringLaunch) {
2568
2579
  if (commandLine) {
2569
2580
  message = ( localize(
2570
- 14023,
2581
+ 14212,
2571
2582
  "The terminal process \"{0}\" failed to launch (exit code: {1}).",
2572
2583
  commandLine,
2573
2584
  code
2574
2585
  ));
2575
2586
  } else {
2576
- message = ( localize(14024, "The terminal process failed to launch (exit code: {0}).", code));
2587
+ message = ( localize(14213, "The terminal process failed to launch (exit code: {0}).", code));
2577
2588
  }
2578
2589
  } else {
2579
2590
  if (commandLine) {
2580
2591
  message = ( localize(
2581
- 14025,
2592
+ 14214,
2582
2593
  "The terminal process \"{0}\" terminated with exit code: {1}.",
2583
2594
  commandLine,
2584
2595
  code
2585
2596
  ));
2586
2597
  } else {
2587
- message = ( localize(14026, "The terminal process terminated with exit code: {0}.", code));
2598
+ message = ( localize(14215, "The terminal process terminated with exit code: {0}.", code));
2588
2599
  }
2589
2600
  }
2590
2601
  break;
@@ -2610,7 +2621,7 @@ function parseExitResult(exitCodeOrError, shellLaunchConfig, processState, initi
2610
2621
  break;
2611
2622
  }
2612
2623
  }
2613
- message = ( localize(14027, "The terminal process failed to launch: {0}.", innerMessage));
2624
+ message = ( localize(14216, "The terminal process failed to launch: {0}.", innerMessage));
2614
2625
  break;
2615
2626
  }
2616
2627
  }
@@ -25,7 +25,7 @@ import { MergedEnvironmentVariableCollection } from '../../../../platform/termin
25
25
  import { serializeEnvironmentVariableCollections } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/environmentVariableShared';
26
26
  import { ProcessState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal';
27
27
  import { ITerminalProfileResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal.service';
28
- import { getWorkspaceForTerminal, mergeEnvironments, createVariableResolver, createTerminalEnvironment, getCwd } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminalEnvironment';
28
+ import { getWorkspaceForTerminal, mergeEnvironments, createVariableResolver, createTerminalEnvironment, getCwd } from '../common/terminalEnvironment.js';
29
29
  import { IConfigurationResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.service';
30
30
  import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
31
31
  import { IHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service';
@@ -202,7 +202,7 @@ let TerminalProcessManager = class TerminalProcessManager extends Disposable {
202
202
  } catch (e) {
203
203
  this._notificationService.notify({
204
204
  message: ( localize(
205
- 14058,
205
+ 14247,
206
206
  "Could not kill process listening on port {0}, command exited with error {1}",
207
207
  port,
208
208
  e
@@ -538,7 +538,7 @@ let TerminalProcessManager = class TerminalProcessManager extends Disposable {
538
538
  this._onExit(-1);
539
539
  } else {
540
540
  const message = ( localize(
541
- 14059,
541
+ 14248,
542
542
  "Restarting the terminal because the connection to the shell process was lost..."
543
543
  ));
544
544
  let postRestartMessage = "";
@@ -582,6 +582,12 @@ let TerminalProcessManager = class TerminalProcessManager extends Disposable {
582
582
  this._resize(cols, rows, pixelWidth, pixelHeight);
583
583
  return;
584
584
  }
585
+ if (this._store.isDisposed) {
586
+ return Promise.resolve();
587
+ }
588
+ if (!this.ptyProcessReady) {
589
+ throw ( new Error("TerminalProcessManager.setDimensions called before initialization"));
590
+ }
585
591
  return this.ptyProcessReady.then(() => this._resize(cols, rows, pixelWidth, pixelHeight));
586
592
  }
587
593
  async setUnicodeVersion(version) {
@@ -10,8 +10,8 @@ export declare class TerminalResizeDebouncer extends Disposable {
10
10
  private _latestY;
11
11
  private readonly _resizeXJob;
12
12
  private readonly _resizeYJob;
13
+ private readonly _debounceResizeXScheduler;
13
14
  constructor(_isVisible: () => boolean, _getXterm: () => XtermTerminal | undefined, _resizeBothCallback: (cols: number, rows: number) => void, _resizeXCallback: (cols: number) => void, _resizeYCallback: (rows: number) => void);
14
15
  resize(cols: number, rows: number, immediate: boolean): Promise<void>;
15
16
  flush(): void;
16
- private _debounceResizeX;
17
17
  }
@@ -1,12 +1,12 @@
1
1
 
2
- import { __decorate } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
2
  import { getWindow, runWhenWindowIdle } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
- import { debounce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/decorators';
3
+ import { RunOnceScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
5
4
  import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
5
 
7
6
  var Constants;
8
7
  (function(Constants) {
9
8
  Constants[Constants["StartDebouncingThreshold"] = 200] = "StartDebouncingThreshold";
9
+ Constants[Constants["DebounceResizeXDelay"] = 100] = "DebounceResizeXDelay";
10
10
  })(Constants || (Constants = {}));
11
11
  class TerminalResizeDebouncer extends Disposable {
12
12
  constructor(
@@ -26,6 +26,7 @@ class TerminalResizeDebouncer extends Disposable {
26
26
  this._latestY = 0;
27
27
  this._resizeXJob = this._register(( new MutableDisposable()));
28
28
  this._resizeYJob = this._register(( new MutableDisposable()));
29
+ this._debounceResizeXScheduler = this._register(( new RunOnceScheduler(() => this._resizeXCallback(this._latestX), Constants.DebounceResizeXDelay)));
29
30
  }
30
31
  async resize(cols, rows, immediate) {
31
32
  if (this._store.isDisposed) {
@@ -36,6 +37,7 @@ class TerminalResizeDebouncer extends Disposable {
36
37
  if (immediate || this._getXterm().raw.buffer.normal.length < Constants.StartDebouncingThreshold) {
37
38
  this._resizeXJob.clear();
38
39
  this._resizeYJob.clear();
40
+ this._debounceResizeXScheduler.cancel();
39
41
  this._resizeBothCallback(cols, rows);
40
42
  return;
41
43
  }
@@ -63,30 +65,19 @@ class TerminalResizeDebouncer extends Disposable {
63
65
  }
64
66
  this._resizeYCallback(rows);
65
67
  this._latestX = cols;
66
- this._debounceResizeX(cols);
68
+ this._debounceResizeXScheduler.schedule();
67
69
  }
68
70
  flush() {
69
71
  if (this._store.isDisposed) {
70
72
  return;
71
73
  }
72
- if (this._resizeXJob.value || this._resizeYJob.value) {
74
+ if (this._resizeXJob.value || this._resizeYJob.value || this._debounceResizeXScheduler.isScheduled()) {
73
75
  this._resizeXJob.clear();
74
76
  this._resizeYJob.clear();
77
+ this._debounceResizeXScheduler.cancel();
75
78
  this._resizeBothCallback(this._latestX, this._latestY);
76
79
  }
77
80
  }
78
- _debounceResizeX(cols) {
79
- if (this._store.isDisposed) {
80
- return;
81
- }
82
- this._resizeXCallback(cols);
83
- }
84
81
  }
85
- TerminalResizeDebouncer.__decorator = ( __decorate(
86
- [debounce(100)],
87
- TerminalResizeDebouncer.prototype,
88
- "_debounceResizeX",
89
- null
90
- ));
91
82
 
92
83
  export { TerminalResizeDebouncer };
@@ -435,7 +435,7 @@ let TerminalTabsRenderer = class TerminalTabsRenderer {
435
435
  };
436
436
  }
437
437
  },
438
- ariaLabel: ( localize(14086, "Type terminal name. Press Enter to confirm or Escape to cancel.")),
438
+ ariaLabel: ( localize(14275, "Type terminal name. Press Enter to confirm or Escape to cancel.")),
439
439
  inputBoxStyles: defaultInputBoxStyles
440
440
  }));
441
441
  inputBox.element.style.height = "22px";
@@ -566,7 +566,7 @@ let TerminalTabsAccessibilityProvider = class TerminalTabsAccessibilityProvider
566
566
  this._terminalGroupService = _terminalGroupService;
567
567
  }
568
568
  getWidgetAriaLabel() {
569
- return localize(14087, "Terminal tabs");
569
+ return localize(14276, "Terminal tabs");
570
570
  }
571
571
  getAriaLabel(instance) {
572
572
  let ariaLabel = "";
@@ -574,7 +574,7 @@ let TerminalTabsAccessibilityProvider = class TerminalTabsAccessibilityProvider
574
574
  if (tab && tab.terminalInstances?.length > 1) {
575
575
  const terminalIndex = tab.terminalInstances.indexOf(instance);
576
576
  ariaLabel = ( localize(
577
- 14088,
577
+ 14277,
578
578
  "Terminal {0} {1}, split {2} of {3}",
579
579
  instance.instanceId,
580
580
  instance.title,
@@ -582,7 +582,7 @@ let TerminalTabsAccessibilityProvider = class TerminalTabsAccessibilityProvider
582
582
  tab.terminalInstances.length
583
583
  ));
584
584
  } else {
585
- ariaLabel = ( localize(14089, "Terminal {0} {1}", instance.instanceId, instance.title));
585
+ ariaLabel = ( localize(14278, "Terminal {0} {1}", instance.instanceId, instance.title));
586
586
  }
587
587
  return ariaLabel;
588
588
  }
@@ -770,7 +770,7 @@ let TabDecorationsProvider = class TabDecorationsProvider extends Disposable {
770
770
  constructor(_terminalService) {
771
771
  super();
772
772
  this._terminalService = _terminalService;
773
- this.label = ( localize(14090, "Terminal"));
773
+ this.label = ( localize(14279, "Terminal"));
774
774
  this._onDidChange = this._register(( new Emitter()));
775
775
  this.onDidChange = this._onDidChange.event;
776
776
  this._register(
@@ -29,7 +29,7 @@ function getInstanceHoverInfo(instance, storageService) {
29
29
  }
30
30
  actions.push({
31
31
  commandId: "toggleDetailedInfo",
32
- label: showDetailed ? ( localize(14091, "Hide Details")) : ( localize(14092, "Show Details")),
32
+ label: showDetailed ? ( localize(14280, "Hide Details")) : ( localize(14281, "Show Details")),
33
33
  run() {
34
34
  storageService.store(
35
35
  TerminalStorageKeys.TabsShowDetailed,
@@ -51,7 +51,7 @@ function getInstanceHoverInfo(instance, storageService) {
51
51
  function getShellProcessTooltip(instance, showDetailed) {
52
52
  const lines = [];
53
53
  if (instance.processId && instance.processId > 0) {
54
- lines.push(( localize(14093, "Process ID ({0}): {1}", "PID", instance.processId)) + "\n");
54
+ lines.push(( localize(14282, "Process ID ({0}): {1}", "PID", instance.processId)) + "\n");
55
55
  }
56
56
  if (instance.shellLaunchConfig.executable) {
57
57
  let commandLine = "";
@@ -67,7 +67,7 @@ function getShellProcessTooltip(instance, showDetailed) {
67
67
  if (args) {
68
68
  commandLine += ` ${args}`;
69
69
  }
70
- lines.push(( localize(14094, "Command line: {0}", commandLine)));
70
+ lines.push(( localize(14283, "Command line: {0}", commandLine)));
71
71
  }
72
72
  return lines.length ? `\n\n---\n\n${lines.join("\n")}` : "";
73
73
  }
@@ -0,0 +1,38 @@
1
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
+ import { IWorkspaceFolder } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
3
+ import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
4
+ import { IConfigurationResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.service";
5
+ import { IShellLaunchConfig, ITerminalBackend, ITerminalEnvironment, TerminalShellType } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
6
+ import { IProcessEnvironment, OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
7
+ import { IHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service";
8
+ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
9
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
10
+ export declare function mergeEnvironments(parent: IProcessEnvironment, other: ITerminalEnvironment | undefined): void;
11
+ export declare function addTerminalEnvironmentKeys(env: IProcessEnvironment, version: string | undefined, locale: string | undefined, detectLocale: "auto" | "off" | "on"): void;
12
+ export declare function shouldSetLangEnvVariable(env: IProcessEnvironment, detectLocale: "auto" | "off" | "on"): boolean;
13
+ export declare function getLangEnvVariable(locale?: string): string;
14
+ export declare function getCwd(shell: IShellLaunchConfig, userHome: string | undefined, variableResolver: VariableResolver | undefined, root: URI | undefined, customCwd: string | undefined, logService?: ILogService): Promise<string>;
15
+ export type VariableResolver = (str: string) => Promise<string>;
16
+ export declare function createVariableResolver(lastActiveWorkspace: IWorkspaceFolder | undefined, env: IProcessEnvironment, configurationResolverService: IConfigurationResolverService | undefined): VariableResolver | undefined;
17
+ export declare function createTerminalEnvironment(shellLaunchConfig: IShellLaunchConfig, envFromConfig: ITerminalEnvironment | undefined, variableResolver: VariableResolver | undefined, version: string | undefined, detectLocale: "auto" | "off" | "on", baseEnv: IProcessEnvironment): Promise<IProcessEnvironment>;
18
+ /**
19
+ * Takes a path and returns the properly escaped path to send to a given shell. On Windows, this
20
+ * included trying to prepare the path for WSL if needed.
21
+ *
22
+ * @param originalPath The path to be escaped and formatted.
23
+ * @param executable The executable off the shellLaunchConfig.
24
+ * @param title The terminal's title.
25
+ * @param shellType The type of shell the path is being sent to.
26
+ * @param backend The backend for the terminal.
27
+ * @param isWindowsFrontend Whether the frontend is Windows, this is only exposed for injection via
28
+ * tests.
29
+ * @returns An escaped version of the path to be executed in the terminal.
30
+ */
31
+ export declare function preparePathForShell(resource: string | URI, executable: string | undefined, title: string, shellType: TerminalShellType | undefined, backend: Pick<ITerminalBackend, "getWslPath"> | undefined, os: OperatingSystem | undefined, isWindowsFrontend?: boolean): Promise<string>;
32
+ export declare function getWorkspaceForTerminal(cwd: URI | string | undefined, workspaceContextService: IWorkspaceContextService, historyService: IHistoryService): IWorkspaceFolder | undefined;
33
+ export declare function getUriLabelForShell(uri: URI | string, backend: Pick<ITerminalBackend, "getWslPath">, shellType?: TerminalShellType, os?: OperatingSystem, isWindowsFrontend?: boolean): Promise<string>;
34
+ /**
35
+ * Gets the unified duration to wait for shell integration after the terminal launches before
36
+ * declaring the terminal lacks shell integration.
37
+ */
38
+ export declare function getShellIntegrationTimeout(configurationService: IConfigurationService, siInjectionEnabled: boolean, isRemote: boolean, processReadyTimestamp?: number): number;