@codingame/monaco-vscode-xterm-common 24.1.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 (45) hide show
  1. package/empty.js +1 -0
  2. package/package.json +45 -0
  3. package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.d.ts +11 -0
  4. package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +26 -0
  5. package/vscode/src/vs/platform/terminal/common/environmentVariable.d.ts +86 -0
  6. package/vscode/src/vs/platform/terminal/common/environmentVariable.js +10 -0
  7. package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.d.ts +17 -0
  8. package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +214 -0
  9. package/vscode/src/vs/platform/terminal/common/terminalRecorder.d.ts +14 -0
  10. package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +75 -0
  11. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.d.ts +28 -0
  12. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +125 -0
  13. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.d.ts +104 -0
  14. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +1554 -0
  15. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.d.ts +19 -0
  16. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +45 -0
  17. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.d.ts +12 -0
  18. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.js +82 -0
  19. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.d.ts +408 -0
  20. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +2338 -0
  21. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.d.ts +143 -0
  22. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +684 -0
  23. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.d.ts +17 -0
  24. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +68 -0
  25. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.d.ts +57 -0
  26. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +135 -0
  27. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.d.ts +40 -0
  28. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +754 -0
  29. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.d.ts +10 -0
  30. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +112 -0
  31. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.d.ts +17 -0
  32. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +59 -0
  33. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.d.ts +38 -0
  34. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +319 -0
  35. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStorageKeys.d.ts +12 -0
  36. package/vscode/src/vs/workbench/contrib/terminal/common/terminalStorageKeys.js +17 -0
  37. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +58 -0
  38. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +69 -0
  39. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/media/stickyScroll.css +49 -0
  40. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.d.ts +2 -0
  41. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +25 -0
  42. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.d.ts +35 -0
  43. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.js +117 -0
  44. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.d.ts +56 -0
  45. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +428 -0
@@ -0,0 +1,19 @@
1
+ import { ActionRunner, IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
2
+ import { SingleOrMany } from "@codingame/monaco-vscode-api/vscode/vs/base/common/types";
3
+ import { IMenu } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
4
+ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
5
+ import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
6
+ import { ISerializedTerminalInstanceContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal";
7
+ /**
8
+ * A context that is passed to actions as arguments to represent the terminal instance(s) being
9
+ * acted upon.
10
+ */
11
+ export declare class InstanceContext {
12
+ readonly instanceId: number;
13
+ constructor(instance: ITerminalInstance);
14
+ toJSON(): ISerializedTerminalInstanceContext;
15
+ }
16
+ export declare class TerminalContextActionRunner extends ActionRunner {
17
+ protected runAction(action: IAction, context?: SingleOrMany<InstanceContext>): Promise<void>;
18
+ }
19
+ export declare function openContextMenu(targetWindow: Window, event: MouseEvent, contextInstances: SingleOrMany<ITerminalInstance> | undefined, menu: IMenu, contextMenuService: IContextMenuService, extraActions?: IAction[]): void;
@@ -0,0 +1,45 @@
1
+
2
+ import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
3
+ import { ActionRunner } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
4
+ import { asArray } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
5
+ import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
6
+ import { getFlatContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
7
+
8
+ class InstanceContext {
9
+ constructor(instance) {
10
+ this.instanceId = instance.instanceId;
11
+ }
12
+ toJSON() {
13
+ return {
14
+ $mid: MarshalledId.TerminalContext,
15
+ instanceId: this.instanceId
16
+ };
17
+ }
18
+ }
19
+ class TerminalContextActionRunner extends ActionRunner {
20
+ async runAction(action, context) {
21
+ if (Array.isArray(context) && context.every(e => e instanceof InstanceContext)) {
22
+ await action.run(context?.[0], context);
23
+ return;
24
+ }
25
+ return super.runAction(action, context);
26
+ }
27
+ }
28
+ function openContextMenu(targetWindow, event, contextInstances, menu, contextMenuService, extraActions) {
29
+ const standardEvent = ( new StandardMouseEvent(targetWindow, event));
30
+ const actions = getFlatContextMenuActions(menu.getActions({ shouldForwardArgs: true }));
31
+ if (extraActions) {
32
+ actions.push(...extraActions);
33
+ }
34
+ const context = contextInstances ? ( asArray(contextInstances).map(e => ( new InstanceContext(e)))) : [];
35
+ const actionRunner = ( new TerminalContextActionRunner());
36
+ contextMenuService.showContextMenu({
37
+ actionRunner,
38
+ getAnchor: () => standardEvent,
39
+ getActions: () => actions,
40
+ getActionsContext: () => context,
41
+ onHide: () => actionRunner.dispose()
42
+ });
43
+ }
44
+
45
+ export { InstanceContext, TerminalContextActionRunner, openContextMenu };
@@ -0,0 +1,12 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
3
+ import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
4
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
5
+ import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";
6
+ export declare class TerminalIconPicker extends Disposable {
7
+ private readonly _hoverService;
8
+ private readonly _layoutService;
9
+ private readonly _iconSelectBox;
10
+ constructor(instantiationService: IInstantiationService, _hoverService: IHoverService, _layoutService: ILayoutService);
11
+ pickIcons(): Promise<ThemeIcon | undefined>;
12
+ }
@@ -0,0 +1,82 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { Dimension, getActiveDocument } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { HoverPosition } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverWidget';
5
+ import { codiconsLibrary } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codiconsLibrary';
6
+ import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
7
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
9
+ import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
10
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
11
+ import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
12
+ import { defaultInputBoxStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
13
+ import { getIconRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
14
+ import { WorkbenchIconSelectBox } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/browser/iconSelectBox';
15
+
16
+ const icons = ( new Lazy(() => {
17
+ const iconDefinitions = getIconRegistry().getIcons();
18
+ const includedChars = ( new Set());
19
+ const dedupedIcons = iconDefinitions.filter(e => {
20
+ if (e.id === codiconsLibrary.blank.id) {
21
+ return false;
22
+ }
23
+ if (ThemeIcon.isThemeIcon(e.defaults)) {
24
+ return false;
25
+ }
26
+ if (( includedChars.has(e.defaults.fontCharacter))) {
27
+ return false;
28
+ }
29
+ includedChars.add(e.defaults.fontCharacter);
30
+ return true;
31
+ });
32
+ return dedupedIcons;
33
+ }));
34
+ let TerminalIconPicker = class TerminalIconPicker extends Disposable {
35
+ constructor(instantiationService, _hoverService, _layoutService) {
36
+ super();
37
+ this._hoverService = _hoverService;
38
+ this._layoutService = _layoutService;
39
+ this._iconSelectBox = instantiationService.createInstance(WorkbenchIconSelectBox, {
40
+ icons: icons.value,
41
+ inputBoxStyles: defaultInputBoxStyles
42
+ });
43
+ }
44
+ async pickIcons() {
45
+ const dimension = ( new Dimension(486, 260));
46
+ return ( new Promise(resolve => {
47
+ this._register(this._iconSelectBox.onDidSelect(e => {
48
+ resolve(e);
49
+ this._iconSelectBox.dispose();
50
+ }));
51
+ this._iconSelectBox.clearInput();
52
+ const body = getActiveDocument().body;
53
+ const bodyRect = body.getBoundingClientRect();
54
+ const hoverWidget = this._hoverService.showInstantHover({
55
+ content: this._iconSelectBox.domNode,
56
+ target: {
57
+ targetElements: [body],
58
+ x: bodyRect.left + (bodyRect.width - dimension.width) / 2,
59
+ y: bodyRect.top + this._layoutService.activeContainerOffset.quickPickTop - 2
60
+ },
61
+ position: {
62
+ hoverPosition: HoverPosition.BELOW,
63
+ },
64
+ persistence: {
65
+ sticky: true,
66
+ },
67
+ }, true);
68
+ if (hoverWidget) {
69
+ this._register(hoverWidget);
70
+ }
71
+ this._iconSelectBox.layout(dimension);
72
+ this._iconSelectBox.focus();
73
+ }));
74
+ }
75
+ };
76
+ TerminalIconPicker = ( __decorate([
77
+ ( __param(0, IInstantiationService)),
78
+ ( __param(1, IHoverService)),
79
+ ( __param(2, ILayoutService))
80
+ ], TerminalIconPicker));
81
+
82
+ export { TerminalIconPicker };
@@ -0,0 +1,408 @@
1
+ import * as dom from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
2
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
+ import { Disposable, DisposableStore, type IReference } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
+ import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
5
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
6
+ import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
7
+ import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
8
+ import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
9
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
10
+ import { IContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
11
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
12
+ import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
13
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
14
+ import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
15
+ import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
16
+ import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
17
+ import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
18
+ import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
19
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
20
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
21
+ import { IMarkProperties } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities";
22
+ import { TerminalCapabilityStoreMultiplexer } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore";
23
+ import { IMergedEnvironmentVariableCollection } from "../../../../platform/terminal/common/environmentVariable.js";
24
+ import { IReconnectionProperties, IShellLaunchConfig, ITerminalDimensionsOverride, ITerminalLaunchError, TerminalExitReason, TerminalIcon, TerminalLocation, TerminalShellType, TitleEventSource, type ShellIntegrationInjectionFailureReason } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
25
+ import { ITerminalLogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service";
26
+ import { IColorTheme } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService";
27
+ import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
28
+ import { IWorkspaceFolder } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
29
+ import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
30
+ import { IWorkspaceTrustRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service";
31
+ import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
32
+ import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
33
+ import { IRequestAddInstanceToGroupEvent, ITerminalContribution, ITerminalInstance, IXtermColorProvider } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
34
+ import { ITerminalConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
35
+ import { TerminalProcessManager } from "./terminalProcessManager.js";
36
+ import { ITerminalStatusList } from "./terminalStatusList.js";
37
+ import { XtermTerminal } from "@codingame/monaco-vscode-xterm-addons-common/vscode/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal";
38
+ import { ProcessState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal";
39
+ import { ITerminalProfileResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal.service";
40
+ import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
41
+ import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
42
+ import { IHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service";
43
+ import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
44
+ import { IPreferencesService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/preferences/common/preferences.service";
45
+ import type { IMarker, Terminal as XTermTerminal } from "@xterm/xterm";
46
+ import type { IMenu } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
47
+ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
48
+ import type { IProgressState } from "@xterm/addon-progress";
49
+ export declare class TerminalInstance extends Disposable implements ITerminalInstance {
50
+ private readonly _terminalShellTypeContextKey;
51
+ private _shellLaunchConfig;
52
+ private readonly _contextKeyService;
53
+ private readonly _contextMenuService;
54
+ private readonly _terminalConfigurationService;
55
+ private readonly _terminalProfileResolverService;
56
+ private readonly _pathService;
57
+ private readonly _fileService;
58
+ private readonly _keybindingService;
59
+ private readonly _notificationService;
60
+ private readonly _preferencesService;
61
+ private readonly _viewsService;
62
+ private readonly _themeService;
63
+ private readonly _configurationService;
64
+ private readonly _logService;
65
+ private readonly _storageService;
66
+ private readonly _accessibilityService;
67
+ private readonly _productService;
68
+ private readonly _quickInputService;
69
+ private readonly _workbenchEnvironmentService;
70
+ private readonly _workspaceContextService;
71
+ private readonly _editorService;
72
+ private readonly _workspaceTrustRequestService;
73
+ private readonly _historyService;
74
+ private readonly _telemetryService;
75
+ private readonly _openerService;
76
+ private readonly _commandService;
77
+ private readonly _accessibilitySignalService;
78
+ private readonly _viewDescriptorService;
79
+ private static _lastKnownCanvasDimensions;
80
+ private static _lastKnownGridDimensions;
81
+ private static _instanceIdCounter;
82
+ private readonly _scopedInstantiationService;
83
+ private readonly _processManager;
84
+ private readonly _contributions;
85
+ private readonly _resource;
86
+ /**
87
+ * Resolves when xterm.js is ready, this will be undefined if the terminal instance is disposed
88
+ * before xterm.js could be created.
89
+ */
90
+ private _xtermReadyPromise;
91
+ get xtermReadyPromise(): Promise<XtermTerminal | undefined>;
92
+ private _pressAnyKeyToCloseListener;
93
+ private _instanceId;
94
+ private _latestXtermWriteData;
95
+ private _latestXtermParseData;
96
+ private _isExiting;
97
+ private _hadFocusOnExit;
98
+ private _isVisible;
99
+ private _exitCode;
100
+ private _exitReason;
101
+ private _skipTerminalCommands;
102
+ private _shellType;
103
+ private _title;
104
+ private _titleSource;
105
+ private _container;
106
+ private _wrapperElement;
107
+ get domElement(): HTMLElement;
108
+ private _horizontalScrollbar;
109
+ private _terminalFocusContextKey;
110
+ private _terminalHasFixedWidth;
111
+ private _terminalHasTextContextKey;
112
+ private _terminalAltBufferActiveContextKey;
113
+ private _terminalShellIntegrationEnabledContextKey;
114
+ private _cols;
115
+ private _rows;
116
+ private _fixedCols;
117
+ private _fixedRows;
118
+ private _cwd;
119
+ private _initialCwd;
120
+ private _injectedArgs;
121
+ private _layoutSettingsChanged;
122
+ private _dimensionsOverride;
123
+ private _areLinksReady;
124
+ private readonly _initialDataEventsListener;
125
+ private _initialDataEvents;
126
+ private _containerReadyBarrier;
127
+ private _attachBarrier;
128
+ private _icon;
129
+ private readonly _messageTitleDisposable;
130
+ private _widgetManager;
131
+ private readonly _dndObserver;
132
+ private _lastLayoutDimensions;
133
+ private _hasHadInput;
134
+ private _description?;
135
+ private _processName;
136
+ private _sequence?;
137
+ private _staticTitle?;
138
+ private _workspaceFolder?;
139
+ private _labelComputer?;
140
+ private _userHome?;
141
+ private _hasScrollBar?;
142
+ private _usedShellIntegrationInjection;
143
+ get usedShellIntegrationInjection(): boolean;
144
+ private _shellIntegrationInjectionInfo;
145
+ get shellIntegrationInjectionFailureReason(): ShellIntegrationInjectionFailureReason | undefined;
146
+ private _lineDataEventAddon;
147
+ private readonly _scopedContextKeyService;
148
+ private _resizeDebouncer?;
149
+ readonly capabilities: TerminalCapabilityStoreMultiplexer;
150
+ readonly statusList: ITerminalStatusList;
151
+ get store(): DisposableStore;
152
+ get extEnvironmentVariableCollection(): IMergedEnvironmentVariableCollection | undefined;
153
+ xterm?: XtermTerminal;
154
+ disableLayout: boolean;
155
+ get waitOnExit(): ITerminalInstance["waitOnExit"];
156
+ set waitOnExit(value: ITerminalInstance["waitOnExit"]);
157
+ private _targetRef;
158
+ get targetRef(): IReference<TerminalLocation | undefined>;
159
+ get target(): TerminalLocation | undefined;
160
+ set target(value: TerminalLocation | undefined);
161
+ get instanceId(): number;
162
+ get resource(): URI;
163
+ get cols(): number;
164
+ get rows(): number;
165
+ get isDisposed(): boolean;
166
+ get fixedCols(): number | undefined;
167
+ get fixedRows(): number | undefined;
168
+ get maxCols(): number;
169
+ get maxRows(): number;
170
+ get processId(): number | undefined;
171
+ get processReady(): Promise<void>;
172
+ get hasChildProcesses(): boolean;
173
+ get reconnectionProperties(): IReconnectionProperties | undefined;
174
+ get areLinksReady(): boolean;
175
+ get initialDataEvents(): string[] | undefined;
176
+ get exitCode(): number | undefined;
177
+ get exitReason(): TerminalExitReason | undefined;
178
+ get hadFocusOnExit(): boolean;
179
+ get isTitleSetByProcess(): boolean;
180
+ get shellLaunchConfig(): IShellLaunchConfig;
181
+ get shellType(): TerminalShellType | undefined;
182
+ get os(): OperatingSystem | undefined;
183
+ get hasRemoteAuthority(): boolean;
184
+ get remoteAuthority(): string | undefined;
185
+ get hasFocus(): boolean;
186
+ get title(): string;
187
+ get titleSource(): TitleEventSource;
188
+ get icon(): TerminalIcon | undefined;
189
+ get color(): string | undefined;
190
+ get processName(): string;
191
+ get sequence(): string | undefined;
192
+ get staticTitle(): string | undefined;
193
+ get progressState(): IProgressState | undefined;
194
+ get workspaceFolder(): IWorkspaceFolder | undefined;
195
+ get cwd(): string | undefined;
196
+ get initialCwd(): string | undefined;
197
+ get description(): string | undefined;
198
+ get userHome(): string | undefined;
199
+ get shellIntegrationNonce(): string;
200
+ get injectedArgs(): string[] | undefined;
201
+ private readonly _onExit;
202
+ readonly onExit: Event<number | ITerminalLaunchError | undefined>;
203
+ private readonly _onDisposed;
204
+ readonly onDisposed: Event<ITerminalInstance>;
205
+ private readonly _onProcessIdReady;
206
+ readonly onProcessIdReady: Event<ITerminalInstance>;
207
+ private readonly _onProcessReplayComplete;
208
+ readonly onProcessReplayComplete: Event<void>;
209
+ private readonly _onTitleChanged;
210
+ readonly onTitleChanged: Event<ITerminalInstance>;
211
+ private readonly _onIconChanged;
212
+ readonly onIconChanged: Event<{
213
+ instance: ITerminalInstance;
214
+ userInitiated: boolean;
215
+ }>;
216
+ private readonly _onWillData;
217
+ readonly onWillData: Event<string>;
218
+ private readonly _onData;
219
+ readonly onData: Event<string>;
220
+ private readonly _onBinary;
221
+ readonly onBinary: Event<string>;
222
+ private readonly _onRequestExtHostProcess;
223
+ readonly onRequestExtHostProcess: Event<ITerminalInstance>;
224
+ private readonly _onDimensionsChanged;
225
+ readonly onDimensionsChanged: Event<void>;
226
+ private readonly _onMaximumDimensionsChanged;
227
+ readonly onMaximumDimensionsChanged: Event<void>;
228
+ private readonly _onDidFocus;
229
+ readonly onDidFocus: Event<ITerminalInstance>;
230
+ private readonly _onDidRequestFocus;
231
+ readonly onDidRequestFocus: Event<void>;
232
+ private readonly _onDidBlur;
233
+ readonly onDidBlur: Event<ITerminalInstance>;
234
+ private readonly _onDidInputData;
235
+ readonly onDidInputData: Event<string>;
236
+ private readonly _onDidChangeSelection;
237
+ readonly onDidChangeSelection: Event<ITerminalInstance>;
238
+ private readonly _onRequestAddInstanceToGroup;
239
+ readonly onRequestAddInstanceToGroup: Event<IRequestAddInstanceToGroupEvent>;
240
+ private readonly _onDidChangeHasChildProcesses;
241
+ readonly onDidChangeHasChildProcesses: Event<boolean>;
242
+ private readonly _onDidExecuteText;
243
+ readonly onDidExecuteText: Event<void>;
244
+ private readonly _onDidChangeTarget;
245
+ readonly onDidChangeTarget: Event<TerminalLocation | undefined>;
246
+ private readonly _onDidSendText;
247
+ readonly onDidSendText: Event<string>;
248
+ private readonly _onDidChangeShellType;
249
+ readonly onDidChangeShellType: Event<TerminalShellType>;
250
+ private readonly _onDidChangeVisibility;
251
+ readonly onDidChangeVisibility: Event<boolean>;
252
+ private readonly _onLineData;
253
+ readonly onLineData: Event<string>;
254
+ readonly sessionId: string;
255
+ constructor(_terminalShellTypeContextKey: IContextKey<string>, _shellLaunchConfig: IShellLaunchConfig, _contextKeyService: IContextKeyService, _contextMenuService: IContextMenuService, instantiationService: IInstantiationService, _terminalConfigurationService: ITerminalConfigurationService, _terminalProfileResolverService: ITerminalProfileResolverService, _pathService: IPathService, _fileService: IFileService, _keybindingService: IKeybindingService, _notificationService: INotificationService, _preferencesService: IPreferencesService, _viewsService: IViewsService, _themeService: IThemeService, _configurationService: IConfigurationService, _logService: ITerminalLogService, _storageService: IStorageService, _accessibilityService: IAccessibilityService, _productService: IProductService, _quickInputService: IQuickInputService, _workbenchEnvironmentService: IWorkbenchEnvironmentService, _workspaceContextService: IWorkspaceContextService, _editorService: IEditorService, _workspaceTrustRequestService: IWorkspaceTrustRequestService, _historyService: IHistoryService, _telemetryService: ITelemetryService, _openerService: IOpenerService, _commandService: ICommandService, _accessibilitySignalService: IAccessibilitySignalService, _viewDescriptorService: IViewDescriptorService);
256
+ getContribution<T extends ITerminalContribution>(id: string): T | null;
257
+ private _handleOnData;
258
+ private _getIcon;
259
+ private _getColor;
260
+ private _initDimensions;
261
+ /**
262
+ * Evaluates and sets the cols and rows of the terminal if possible.
263
+ * @param width The width of the container.
264
+ * @param height The height of the container.
265
+ * @return The terminal's width if it requires a layout.
266
+ */
267
+ private _evaluateColsAndRows;
268
+ private _setLastKnownColsAndRows;
269
+ private _fireMaximumDimensionsChanged;
270
+ private _getDimension;
271
+ get persistentProcessId(): number | undefined;
272
+ get shouldPersist(): boolean;
273
+ static getXtermConstructor(keybindingService: IKeybindingService, contextKeyService: IContextKeyService): Promise<typeof XTermTerminal>;
274
+ /**
275
+ * Create xterm.js instance and attach data listeners.
276
+ */
277
+ protected _createXterm(): Promise<XtermTerminal | undefined>;
278
+ runCommand(commandLine: string, shouldExecute: boolean, commandId?: string): Promise<void>;
279
+ detachFromElement(): void;
280
+ attachToElement(container: HTMLElement): void;
281
+ /**
282
+ * Opens the terminal instance inside the parent DOM element previously set with
283
+ * `attachToElement`, you must ensure the parent DOM element is explicitly visible before
284
+ * invoking this function as it performs some DOM calculations internally
285
+ */
286
+ private _open;
287
+ private _setFocus;
288
+ private _setShellIntegrationContextKey;
289
+ resetFocusContextKey(): void;
290
+ private _initDragAndDrop;
291
+ hasSelection(): boolean;
292
+ get selection(): string | undefined;
293
+ clearSelection(): void;
294
+ private _refreshAltBufferContextKey;
295
+ dispose(reason?: TerminalExitReason): void;
296
+ detachProcessAndDispose(reason: TerminalExitReason): Promise<void>;
297
+ focus(force?: boolean): void;
298
+ focusWhenReady(force?: boolean): Promise<void>;
299
+ sendText(text: string, shouldExecute: boolean, bracketedPasteMode?: boolean): Promise<void>;
300
+ sendSignal(signal: string): Promise<void>;
301
+ sendPath(originalPath: string | URI, shouldExecute: boolean): Promise<void>;
302
+ preparePathForShell(originalPath: string | URI): Promise<string>;
303
+ getUriLabelForShell(uri: URI): Promise<string>;
304
+ setVisible(visible: boolean): void;
305
+ scrollDownLine(): void;
306
+ scrollDownPage(): void;
307
+ scrollToBottom(): void;
308
+ scrollUpLine(): void;
309
+ scrollUpPage(): void;
310
+ scrollToTop(): void;
311
+ clearBuffer(): void;
312
+ private _refreshSelectionContextKey;
313
+ protected _createProcessManager(): TerminalProcessManager;
314
+ private _createProcess;
315
+ registerMarker(offset?: number): IMarker | undefined;
316
+ addBufferMarker(properties: IMarkProperties): void;
317
+ scrollToMark(startMarkId: string, endMarkId?: string, highlight?: boolean): void;
318
+ freePortKillProcess(port: string, command: string): Promise<void>;
319
+ private _onProcessData;
320
+ private _writeProcessData;
321
+ /**
322
+ * Called when either a process tied to a terminal has exited or when a terminal renderer
323
+ * simulates a process exiting (e.g. custom execution task).
324
+ * @param exitCode The exit code of the process, this is undefined when the terminal was exited
325
+ * through user action.
326
+ */
327
+ private _onProcessExit;
328
+ private _relaunchWithShellIntegrationDisabled;
329
+ /**
330
+ * Ensure write calls to xterm.js have finished before resolving.
331
+ */
332
+ private _flushXtermData;
333
+ private _attachPressAnyKeyToCloseListener;
334
+ private _writeInitialText;
335
+ reuseTerminal(shell: IShellLaunchConfig, reset?: boolean): Promise<void>;
336
+ relaunch(): void;
337
+ private _onTitleChange;
338
+ private _trust;
339
+ private _updateProcessCwd;
340
+ updateConfig(): void;
341
+ private _updateUnicodeVersion;
342
+ updateAccessibilitySupport(): void;
343
+ private _setCommandsToSkipShell;
344
+ layout(dimension: dom.Dimension): void;
345
+ private _resize;
346
+ private _updatePtyDimensions;
347
+ setShellType(shellType: TerminalShellType | undefined): void;
348
+ private _setAriaLabel;
349
+ private _updateTitleProperties;
350
+ setOverrideDimensions(dimensions: ITerminalDimensionsOverride | undefined, immediate?: boolean): void;
351
+ setFixedDimensions(): Promise<void>;
352
+ private _parseFixedDimension;
353
+ toggleSizeToContentWidth(): Promise<void>;
354
+ private _refreshScrollbar;
355
+ private _addScrollbar;
356
+ private _removeScrollbar;
357
+ private _setResolvedShellLaunchConfig;
358
+ private _onEnvironmentVariableInfoChanged;
359
+ private _refreshEnvironmentVariableInfoWidgetState;
360
+ getInitialCwd(): Promise<string>;
361
+ getSpeculativeCwd(): Promise<string>;
362
+ getCwdResource(): Promise<URI | undefined>;
363
+ private _refreshProperty;
364
+ private _updateProperty;
365
+ rename(title?: string, source?: TitleEventSource): Promise<void>;
366
+ private _setTitle;
367
+ changeIcon(icon?: TerminalIcon): Promise<TerminalIcon | undefined>;
368
+ changeColor(color?: string, skipQuickPick?: boolean): Promise<string | undefined>;
369
+ forceScrollbarVisibility(): void;
370
+ resetScrollbarVisibility(): void;
371
+ setParentContextKeyService(parentContextKeyService: IContextKeyService): void;
372
+ handleMouseEvent(event: MouseEvent, contextMenu: IMenu): Promise<{
373
+ cancelContextMenu: boolean;
374
+ } | void>;
375
+ }
376
+ declare enum TerminalLabelType {
377
+ Title = "title",
378
+ Description = "description"
379
+ }
380
+ export declare class TerminalLabelComputer extends Disposable {
381
+ private readonly _fileService;
382
+ private readonly _terminalConfigurationService;
383
+ private readonly _workspaceContextService;
384
+ private _title;
385
+ private _description;
386
+ get title(): string | undefined;
387
+ get description(): string;
388
+ private readonly _onDidChangeLabel;
389
+ readonly onDidChangeLabel: Event<{
390
+ title: string;
391
+ description: string;
392
+ }>;
393
+ constructor(_fileService: IFileService, _terminalConfigurationService: ITerminalConfigurationService, _workspaceContextService: IWorkspaceContextService);
394
+ refreshLabel(instance: Pick<ITerminalInstance, "shellLaunchConfig" | "shellType" | "cwd" | "fixedCols" | "fixedRows" | "initialCwd" | "processName" | "sequence" | "userHome" | "workspaceFolder" | "staticTitle" | "capabilities" | "title" | "description">, reset?: boolean): void;
395
+ computeLabel(instance: Pick<ITerminalInstance, "shellLaunchConfig" | "shellType" | "cwd" | "fixedCols" | "fixedRows" | "initialCwd" | "processName" | "sequence" | "userHome" | "workspaceFolder" | "staticTitle" | "capabilities" | "title" | "description" | "progressState">, labelTemplate: string, labelType: TerminalLabelType, reset?: boolean): string;
396
+ private _getProgressStateString;
397
+ }
398
+ export declare function parseExitResult(exitCodeOrError: ITerminalLaunchError | number | undefined, shellLaunchConfig: IShellLaunchConfig, processState: ProcessState, initialCwd: string | undefined): {
399
+ code: number | undefined;
400
+ message: string | undefined;
401
+ } | undefined;
402
+ export declare class TerminalInstanceColorProvider implements IXtermColorProvider {
403
+ private readonly _target;
404
+ private readonly _viewDescriptorService;
405
+ constructor(_target: IReference<TerminalLocation | undefined>, _viewDescriptorService: IViewDescriptorService);
406
+ getBackgroundColor(theme: IColorTheme): import("@codingame/monaco-vscode-api/vscode/vs/base/common/color").Color | undefined;
407
+ }
408
+ export {};