@codingame/monaco-vscode-xterm-common 37.1.0 → 37.3.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.
- package/package.json +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +39 -39
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.js +3 -3
- package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.d.ts +0 -11
- package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +0 -26
- package/vscode/src/vs/platform/terminal/common/environmentVariable.d.ts +0 -86
- package/vscode/src/vs/platform/terminal/common/environmentVariable.js +0 -10
- package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.d.ts +0 -17
- package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +0 -218
- package/vscode/src/vs/platform/terminal/common/terminalRecorder.d.ts +0 -14
- package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +0 -84
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostOutputChannel.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostOutputChannel.js +0 -48
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.d.ts +0 -129
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.js +0 -439
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.js +0 -345
- package/vscode/src/vs/workbench/contrib/terminal/browser/ahpTerminalCommandSource.d.ts +0 -111
- package/vscode/src/vs/workbench/contrib/terminal/browser/ahpTerminalCommandSource.js +0 -138
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +0 -119
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.d.ts +0 -104
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +0 -1643
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +0 -54
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.js +0 -78
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.d.ts +0 -144
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +0 -806
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +0 -83
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +0 -139
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.d.ts +0 -45
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +0 -804
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +0 -75
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +0 -61
- package/vscode/src/vs/workbench/contrib/terminal/common/basePty.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/terminal/common/basePty.js +0 -127
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +0 -321
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStorageKeys.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalStorageKeys.js +0 -17
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/media/stickyScroll.css +0 -49
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +0 -25
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.d.ts +0 -58
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +0 -462
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IHoverAction } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hover";
|
|
2
|
-
import { MarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
3
|
-
import { type IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
4
|
-
import { ITerminalInstance } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal";
|
|
5
|
-
export declare function getInstanceHoverInfo(instance: ITerminalInstance, storageService: IStorageService): {
|
|
6
|
-
content: MarkdownString;
|
|
7
|
-
actions: IHoverAction[];
|
|
8
|
-
};
|
|
9
|
-
export declare function getShellProcessTooltip(instance: ITerminalInstance, showDetailed: boolean): string;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { asArray } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
3
|
-
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
4
|
-
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
5
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
-
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
7
|
-
import { TerminalStorageKeys } from '../common/terminalStorageKeys.js';
|
|
8
|
-
|
|
9
|
-
function getInstanceHoverInfo(instance, storageService) {
|
|
10
|
-
const showDetailed = parseInt(
|
|
11
|
-
storageService.get(TerminalStorageKeys.TabsShowDetailed, StorageScope.APPLICATION) ?? "0"
|
|
12
|
-
);
|
|
13
|
-
let statusString = "";
|
|
14
|
-
const statuses = instance.statusList.statuses;
|
|
15
|
-
const actions = [];
|
|
16
|
-
for (const status of statuses) {
|
|
17
|
-
if (showDetailed) {
|
|
18
|
-
if (status.detailedTooltip ?? status.tooltip) {
|
|
19
|
-
statusString += `\n\n---\n\n${status.icon ? `$(${status.icon?.id}) ` : ""}` + (status.detailedTooltip ?? status.tooltip ?? "");
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
if (status.tooltip) {
|
|
23
|
-
statusString += `\n\n---\n\n${status.icon ? `$(${status.icon?.id}) ` : ""}` + (status.tooltip ?? "");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (status.hoverActions) {
|
|
27
|
-
actions.push(...status.hoverActions);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
actions.push({
|
|
31
|
-
commandId: "toggleDetailedInfo",
|
|
32
|
-
label: showDetailed ? ( localize(16989, "Hide Details")) : ( localize(16990, "Show Details")),
|
|
33
|
-
run() {
|
|
34
|
-
storageService.store(
|
|
35
|
-
TerminalStorageKeys.TabsShowDetailed,
|
|
36
|
-
(showDetailed + 1) % 2,
|
|
37
|
-
StorageScope.APPLICATION,
|
|
38
|
-
StorageTarget.USER
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
const shellProcessString = getShellProcessTooltip(instance, !!showDetailed);
|
|
43
|
-
const content = ( new MarkdownString(instance.title + shellProcessString + statusString, {
|
|
44
|
-
supportThemeIcons: true
|
|
45
|
-
}));
|
|
46
|
-
return {
|
|
47
|
-
content,
|
|
48
|
-
actions
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function getShellProcessTooltip(instance, showDetailed) {
|
|
52
|
-
const lines = [];
|
|
53
|
-
if (instance.processId && instance.processId > 0) {
|
|
54
|
-
lines.push(( localize(16991, "Process ID ({0}): {1}", "PID", instance.processId)) + "\n");
|
|
55
|
-
}
|
|
56
|
-
if (instance.shellLaunchConfig.executable) {
|
|
57
|
-
let commandLine = "";
|
|
58
|
-
if (!showDetailed && instance.shellLaunchConfig.executable.length > 32) {
|
|
59
|
-
const base = basename(instance.shellLaunchConfig.executable);
|
|
60
|
-
const sepIndex = instance.shellLaunchConfig.executable.length - base.length - 1;
|
|
61
|
-
const sep = instance.shellLaunchConfig.executable.substring(sepIndex, sepIndex + 1);
|
|
62
|
-
commandLine += `…${sep}${base}`;
|
|
63
|
-
} else {
|
|
64
|
-
commandLine += instance.shellLaunchConfig.executable;
|
|
65
|
-
}
|
|
66
|
-
const args = ( asArray(instance.injectedArgs || instance.shellLaunchConfig.args || []).map(x => x.match(/\s/) ? `'${x}'` : x)).join(" ");
|
|
67
|
-
if (args) {
|
|
68
|
-
commandLine += ` ${args}`;
|
|
69
|
-
}
|
|
70
|
-
lines.push(( localize(16992, "Command line: {0}", commandLine)));
|
|
71
|
-
}
|
|
72
|
-
return lines.length ? `\n\n---\n\n${lines.join("\n")}` : "";
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { getInstanceHoverInfo, getShellProcessTooltip };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
|
|
3
|
-
import type { Terminal as XTermTerminal, ITerminalAddon } from "@xterm/xterm";
|
|
4
|
-
/**
|
|
5
|
-
* Provides extensions to the xterm object in a modular, testable way.
|
|
6
|
-
*/
|
|
7
|
-
export declare class LineDataEventAddon extends Disposable implements ITerminalAddon {
|
|
8
|
-
private readonly _initializationPromise?;
|
|
9
|
-
private _xterm?;
|
|
10
|
-
private _isOsSet;
|
|
11
|
-
private readonly _onLineData;
|
|
12
|
-
readonly onLineData: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<string>;
|
|
13
|
-
constructor(_initializationPromise?: Promise<void> | undefined);
|
|
14
|
-
activate(xterm: XTermTerminal): Promise<void>;
|
|
15
|
-
setOperatingSystem(os: OperatingSystem): void;
|
|
16
|
-
private _sendLineData;
|
|
17
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
|
-
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
5
|
-
|
|
6
|
-
class LineDataEventAddon extends Disposable {
|
|
7
|
-
constructor(_initializationPromise) {
|
|
8
|
-
super();
|
|
9
|
-
this._initializationPromise = _initializationPromise;
|
|
10
|
-
this._isOsSet = false;
|
|
11
|
-
this._onLineData = this._register(( new Emitter()));
|
|
12
|
-
this.onLineData = this._onLineData.event;
|
|
13
|
-
}
|
|
14
|
-
async activate(xterm) {
|
|
15
|
-
this._xterm = xterm;
|
|
16
|
-
const buffer = xterm.buffer;
|
|
17
|
-
await this._initializationPromise;
|
|
18
|
-
this._register(xterm.onLineFeed(() => {
|
|
19
|
-
const newLine = buffer.active.getLine(buffer.active.baseY + buffer.active.cursorY);
|
|
20
|
-
if (newLine && !newLine.isWrapped) {
|
|
21
|
-
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY - 1);
|
|
22
|
-
}
|
|
23
|
-
}));
|
|
24
|
-
this._register(toDisposable(() => {
|
|
25
|
-
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY);
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
setOperatingSystem(os) {
|
|
29
|
-
if (this._isOsSet || !this._xterm) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
this._isOsSet = true;
|
|
33
|
-
if (os === OperatingSystem.Windows) {
|
|
34
|
-
const xterm = this._xterm;
|
|
35
|
-
this._register(xterm.parser.registerCsiHandler({
|
|
36
|
-
final: "H"
|
|
37
|
-
}, () => {
|
|
38
|
-
const buffer = xterm.buffer;
|
|
39
|
-
this._sendLineData(buffer.active, buffer.active.baseY + buffer.active.cursorY);
|
|
40
|
-
return false;
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
_sendLineData(buffer, lineIndex) {
|
|
45
|
-
let line = buffer.getLine(lineIndex);
|
|
46
|
-
if (!line) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
let lineData = line.translateToString(true);
|
|
50
|
-
while (lineIndex > 0 && line.isWrapped) {
|
|
51
|
-
line = buffer.getLine(--lineIndex);
|
|
52
|
-
if (!line) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
lineData = line.translateToString(false) + lineData;
|
|
56
|
-
}
|
|
57
|
-
this._onLineData.fire(lineData);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { LineDataEventAddon };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Emitter } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import type { IPtyHostProcessReplayEvent, ISerializedCommandDetectionCapability } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities";
|
|
4
|
-
import { ProcessPropertyType, type IProcessDataEvent, type IProcessProperty, type IProcessPropertyMap, type IProcessReadyEvent, type ITerminalChildProcess } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal";
|
|
5
|
-
/**
|
|
6
|
-
* Responsible for establishing and maintaining a connection with an existing terminal process
|
|
7
|
-
* created on the local pty host.
|
|
8
|
-
*/
|
|
9
|
-
export declare abstract class BasePty extends Disposable implements Partial<ITerminalChildProcess> {
|
|
10
|
-
readonly id: number;
|
|
11
|
-
readonly shouldPersist: boolean;
|
|
12
|
-
protected readonly _properties: IProcessPropertyMap;
|
|
13
|
-
protected readonly _lastDimensions: {
|
|
14
|
-
cols: number;
|
|
15
|
-
rows: number;
|
|
16
|
-
};
|
|
17
|
-
protected _inReplay: boolean;
|
|
18
|
-
protected readonly _onProcessData: Emitter<string | IProcessDataEvent>;
|
|
19
|
-
readonly onProcessData: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<string | IProcessDataEvent>;
|
|
20
|
-
protected readonly _onProcessReplayComplete: Emitter<void>;
|
|
21
|
-
readonly onProcessReplayComplete: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
22
|
-
protected readonly _onProcessReady: Emitter<IProcessReadyEvent>;
|
|
23
|
-
readonly onProcessReady: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<IProcessReadyEvent>;
|
|
24
|
-
protected readonly _onDidChangeProperty: Emitter<IProcessProperty<ProcessPropertyType>>;
|
|
25
|
-
readonly onDidChangeProperty: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<IProcessProperty<ProcessPropertyType>>;
|
|
26
|
-
protected readonly _onProcessExit: Emitter<number | undefined>;
|
|
27
|
-
readonly onProcessExit: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<number | undefined>;
|
|
28
|
-
protected readonly _onRestoreCommands: Emitter<ISerializedCommandDetectionCapability>;
|
|
29
|
-
readonly onRestoreCommands: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<ISerializedCommandDetectionCapability>;
|
|
30
|
-
constructor(id: number, shouldPersist: boolean);
|
|
31
|
-
getInitialCwd(): Promise<string>;
|
|
32
|
-
getCwd(): Promise<string>;
|
|
33
|
-
handleData(e: string | IProcessDataEvent): void;
|
|
34
|
-
handleExit(e: number | undefined): void;
|
|
35
|
-
handleReady(e: IProcessReadyEvent): void;
|
|
36
|
-
handleDidChangeProperty({ type, value }: IProcessProperty): void;
|
|
37
|
-
handleReplay(e: IPtyHostProcessReplayEvent): Promise<void>;
|
|
38
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { mark } from '@codingame/monaco-vscode-api/vscode/vs/base/common/performance';
|
|
5
|
-
import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
6
|
-
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
-
import { ProcessPropertyType } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
8
|
-
|
|
9
|
-
class BasePty extends Disposable {
|
|
10
|
-
constructor(id, shouldPersist) {
|
|
11
|
-
super();
|
|
12
|
-
this.id = id;
|
|
13
|
-
this.shouldPersist = shouldPersist;
|
|
14
|
-
this._properties = {
|
|
15
|
-
cwd: "",
|
|
16
|
-
initialCwd: "",
|
|
17
|
-
fixedDimensions: {
|
|
18
|
-
cols: undefined,
|
|
19
|
-
rows: undefined
|
|
20
|
-
},
|
|
21
|
-
title: "",
|
|
22
|
-
shellType: undefined,
|
|
23
|
-
hasChildProcesses: true,
|
|
24
|
-
resolvedShellLaunchConfig: {},
|
|
25
|
-
overrideDimensions: undefined,
|
|
26
|
-
failedShellIntegrationActivation: false,
|
|
27
|
-
usedShellIntegrationInjection: undefined,
|
|
28
|
-
shellIntegrationInjectionFailureReason: undefined
|
|
29
|
-
};
|
|
30
|
-
this._lastDimensions = {
|
|
31
|
-
cols: -1,
|
|
32
|
-
rows: -1
|
|
33
|
-
};
|
|
34
|
-
this._inReplay = false;
|
|
35
|
-
this._onProcessData = this._register(( new Emitter()));
|
|
36
|
-
this.onProcessData = this._onProcessData.event;
|
|
37
|
-
this._onProcessReplayComplete = this._register(( new Emitter()));
|
|
38
|
-
this.onProcessReplayComplete = this._onProcessReplayComplete.event;
|
|
39
|
-
this._onProcessReady = this._register(( new Emitter()));
|
|
40
|
-
this.onProcessReady = this._onProcessReady.event;
|
|
41
|
-
this._onDidChangeProperty = this._register(( new Emitter()));
|
|
42
|
-
this.onDidChangeProperty = this._onDidChangeProperty.event;
|
|
43
|
-
this._onProcessExit = this._register(( new Emitter()));
|
|
44
|
-
this.onProcessExit = this._onProcessExit.event;
|
|
45
|
-
this._onRestoreCommands = this._register(( new Emitter()));
|
|
46
|
-
this.onRestoreCommands = this._onRestoreCommands.event;
|
|
47
|
-
}
|
|
48
|
-
async getInitialCwd() {
|
|
49
|
-
return this._properties.initialCwd;
|
|
50
|
-
}
|
|
51
|
-
async getCwd() {
|
|
52
|
-
return this._properties.cwd || this._properties.initialCwd;
|
|
53
|
-
}
|
|
54
|
-
handleData(e) {
|
|
55
|
-
this._onProcessData.fire(e);
|
|
56
|
-
}
|
|
57
|
-
handleExit(e) {
|
|
58
|
-
this._onProcessExit.fire(e);
|
|
59
|
-
}
|
|
60
|
-
handleReady(e) {
|
|
61
|
-
this._onProcessReady.fire(e);
|
|
62
|
-
}
|
|
63
|
-
handleDidChangeProperty(
|
|
64
|
-
{
|
|
65
|
-
type,
|
|
66
|
-
value
|
|
67
|
-
}
|
|
68
|
-
) {
|
|
69
|
-
switch (type) {
|
|
70
|
-
case ProcessPropertyType.Cwd:
|
|
71
|
-
this._properties.cwd = value;
|
|
72
|
-
break;
|
|
73
|
-
case ProcessPropertyType.InitialCwd:
|
|
74
|
-
this._properties.initialCwd = value;
|
|
75
|
-
break;
|
|
76
|
-
case ProcessPropertyType.ResolvedShellLaunchConfig:
|
|
77
|
-
{
|
|
78
|
-
const cast = value;
|
|
79
|
-
if (cast.cwd && !isString(cast.cwd)) {
|
|
80
|
-
cast.cwd = URI.revive(cast.cwd);
|
|
81
|
-
}
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
this._onDidChangeProperty.fire({
|
|
86
|
-
type,
|
|
87
|
-
value
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
async handleReplay(e) {
|
|
91
|
-
mark(`code/terminal/willHandleReplay/${this.id}`);
|
|
92
|
-
try {
|
|
93
|
-
this._inReplay = true;
|
|
94
|
-
for (const innerEvent of e.events) {
|
|
95
|
-
if (innerEvent.cols !== 0 || innerEvent.rows !== 0) {
|
|
96
|
-
this._onDidChangeProperty.fire({
|
|
97
|
-
type: ProcessPropertyType.OverrideDimensions,
|
|
98
|
-
value: {
|
|
99
|
-
cols: innerEvent.cols,
|
|
100
|
-
rows: innerEvent.rows,
|
|
101
|
-
forceExactSize: true
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
const e = {
|
|
106
|
-
data: innerEvent.data,
|
|
107
|
-
trackCommit: true
|
|
108
|
-
};
|
|
109
|
-
this._onProcessData.fire(e);
|
|
110
|
-
await e.writePromise;
|
|
111
|
-
}
|
|
112
|
-
} finally {
|
|
113
|
-
this._inReplay = false;
|
|
114
|
-
}
|
|
115
|
-
if (e.commands) {
|
|
116
|
-
this._onRestoreCommands.fire(e.commands);
|
|
117
|
-
}
|
|
118
|
-
this._onDidChangeProperty.fire({
|
|
119
|
-
type: ProcessPropertyType.OverrideDimensions,
|
|
120
|
-
value: undefined
|
|
121
|
-
});
|
|
122
|
-
mark(`code/terminal/didHandleReplay/${this.id}`);
|
|
123
|
-
this._onProcessReplayComplete.fire();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export { BasePty };
|
|
@@ -1,38 +0,0 @@
|
|
|
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;
|