@codingame/monaco-vscode-xterm-common 25.1.2 → 26.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.
- package/package.json +4 -4
- package/vscode/src/vs/platform/terminal/common/capabilities/naiveCwdDetectionCapability.js +2 -2
- package/vscode/src/vs/platform/terminal/common/environmentVariableCollection.js +20 -16
- package/vscode/src/vs/platform/terminal/common/terminalRecorder.js +20 -11
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +15 -21
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +386 -301
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalContextMenu.js +11 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIconPicker.js +4 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +792 -548
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +225 -128
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +14 -5
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalStatusList.js +23 -19
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +174 -126
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +29 -22
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/lineDataEventAddon.js +3 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +112 -114
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +16 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollContribution.js +33 -23
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +115 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-xterm-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - common package depending on xterm",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-xterm-addons-common": "
|
|
20
|
-
"@xterm/xterm": "6.1.0-beta.
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-xterm-addons-common": "26.0.1",
|
|
20
|
+
"@xterm/xterm": "6.1.0-beta.147"
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
@@ -6,13 +6,13 @@ class NaiveCwdDetectionCapability {
|
|
|
6
6
|
constructor(_process) {
|
|
7
7
|
this._process = _process;
|
|
8
8
|
this.type = TerminalCapability.NaiveCwdDetection;
|
|
9
|
-
this._cwd =
|
|
9
|
+
this._cwd = "";
|
|
10
10
|
this._onDidChangeCwd = ( new Emitter());
|
|
11
11
|
this.onDidChangeCwd = this._onDidChangeCwd.event;
|
|
12
12
|
}
|
|
13
13
|
async getCwd() {
|
|
14
14
|
if (!this._process) {
|
|
15
|
-
return Promise.resolve(
|
|
15
|
+
return Promise.resolve("");
|
|
16
16
|
}
|
|
17
17
|
const newCwd = await this._process.getCwd();
|
|
18
18
|
if (newCwd !== this._cwd) {
|
|
@@ -3,12 +3,12 @@ import { isWindows } from '@codingame/monaco-vscode-api/vscode/vs/base/common/pl
|
|
|
3
3
|
import { EnvironmentVariableMutatorType } from './environmentVariable.js';
|
|
4
4
|
|
|
5
5
|
const mutatorTypeToLabelMap = ( new Map([
|
|
6
|
-
[EnvironmentVariableMutatorType.Append,
|
|
7
|
-
[EnvironmentVariableMutatorType.Prepend,
|
|
8
|
-
[EnvironmentVariableMutatorType.Replace,
|
|
6
|
+
[EnvironmentVariableMutatorType.Append, "APPEND"],
|
|
7
|
+
[EnvironmentVariableMutatorType.Prepend, "PREPEND"],
|
|
8
|
+
[EnvironmentVariableMutatorType.Replace, "REPLACE"]
|
|
9
9
|
]));
|
|
10
10
|
const PYTHON_ACTIVATION_VARS_PATTERN = /^VSCODE_PYTHON_(PWSH|ZSH|BASH|FISH)_ACTIVATE/;
|
|
11
|
-
const PYTHON_ENV_EXTENSION_ID =
|
|
11
|
+
const PYTHON_ENV_EXTENSION_ID = "ms-python.vscode-python-envs";
|
|
12
12
|
class MergedEnvironmentVariableCollection {
|
|
13
13
|
constructor(collections) {
|
|
14
14
|
this.collections = collections;
|
|
@@ -65,26 +65,26 @@ class MergedEnvironmentVariableCollection {
|
|
|
65
65
|
}
|
|
66
66
|
if (mutator.options?.applyAtProcessCreation ?? true) {
|
|
67
67
|
switch (mutator.type) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
case EnvironmentVariableMutatorType.Append:
|
|
69
|
+
env[actualVariable] = (env[actualVariable] || "") + value;
|
|
70
|
+
break;
|
|
71
|
+
case EnvironmentVariableMutatorType.Prepend:
|
|
72
|
+
env[actualVariable] = value + (env[actualVariable] || "");
|
|
73
|
+
break;
|
|
74
|
+
case EnvironmentVariableMutatorType.Replace:
|
|
75
|
+
env[actualVariable] = value;
|
|
76
|
+
break;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
if (mutator.options?.applyAtShellIntegration ?? false) {
|
|
80
80
|
const key = `VSCODE_ENV_${mutatorTypeToLabelMap.get(mutator.type)}`;
|
|
81
|
-
env[key] = (env[key] ? env[key] +
|
|
81
|
+
env[key] = (env[key] ? env[key] + ":" : "") + variable + "=" + this._encodeColons(value);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
_encodeColons(value) {
|
|
87
|
-
return value.replaceAll(
|
|
87
|
+
return value.replaceAll(":", "\\x3a");
|
|
88
88
|
}
|
|
89
89
|
blockPythonActivationVar(variable, extensionIdentifier) {
|
|
90
90
|
if (PYTHON_ACTIVATION_VARS_PATTERN.test(variable) && PYTHON_ENV_EXTENSION_ID !== extensionIdentifier) {
|
|
@@ -120,7 +120,11 @@ class MergedEnvironmentVariableCollection {
|
|
|
120
120
|
if (added.size === 0 && changed.size === 0 && removed.size === 0) {
|
|
121
121
|
return undefined;
|
|
122
122
|
}
|
|
123
|
-
return {
|
|
123
|
+
return {
|
|
124
|
+
added,
|
|
125
|
+
changed,
|
|
126
|
+
removed
|
|
127
|
+
};
|
|
124
128
|
}
|
|
125
129
|
getVariableMap(scope) {
|
|
126
130
|
const result = ( new Map());
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
var Constants;
|
|
4
|
-
(function
|
|
4
|
+
(function(Constants) {
|
|
5
5
|
Constants[Constants["MaxRecorderDataSize"] = 10485760] = "MaxRecorderDataSize";
|
|
6
6
|
})(Constants || (Constants = {}));
|
|
7
7
|
class TerminalRecorder {
|
|
8
8
|
constructor(cols, rows) {
|
|
9
9
|
this._totalDataLength = 0;
|
|
10
|
-
this._entries = [{
|
|
10
|
+
this._entries = [{
|
|
11
|
+
cols,
|
|
12
|
+
rows,
|
|
13
|
+
data: []
|
|
14
|
+
}];
|
|
11
15
|
}
|
|
12
16
|
handleResize(cols, rows) {
|
|
13
17
|
if (this._entries.length > 0) {
|
|
@@ -27,7 +31,11 @@ class TerminalRecorder {
|
|
|
27
31
|
return;
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
|
-
this._entries.push({
|
|
34
|
+
this._entries.push({
|
|
35
|
+
cols,
|
|
36
|
+
rows,
|
|
37
|
+
data: []
|
|
38
|
+
});
|
|
31
39
|
}
|
|
32
40
|
handleData(data) {
|
|
33
41
|
const lastEntry = this._entries[this._entries.length - 1];
|
|
@@ -42,28 +50,29 @@ class TerminalRecorder {
|
|
|
42
50
|
if (firstEntry.data.length === 0) {
|
|
43
51
|
this._entries.shift();
|
|
44
52
|
}
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
53
|
+
} else {
|
|
47
54
|
firstEntry.data[0] = firstEntry.data[0].substr(remainingToDelete);
|
|
48
55
|
this._totalDataLength -= remainingToDelete;
|
|
49
56
|
}
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
59
|
generateReplayEventSync() {
|
|
53
|
-
this._entries.forEach(
|
|
60
|
+
this._entries.forEach(entry => {
|
|
54
61
|
if (entry.data.length > 0) {
|
|
55
|
-
entry.data = [entry.data.join(
|
|
62
|
+
entry.data = [entry.data.join("")];
|
|
56
63
|
}
|
|
57
64
|
});
|
|
58
65
|
return {
|
|
59
|
-
events: ( this._entries.map(
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
events: ( this._entries.map(entry => ({
|
|
67
|
+
cols: entry.cols,
|
|
68
|
+
rows: entry.rows,
|
|
69
|
+
data: entry.data[0] ?? ""
|
|
70
|
+
}))),
|
|
62
71
|
commands: {
|
|
63
72
|
isWindowsPty: false,
|
|
64
73
|
hasRichCommandDetection: false,
|
|
65
74
|
commands: [],
|
|
66
|
-
promptInputModel: undefined
|
|
75
|
+
promptInputModel: undefined
|
|
67
76
|
}
|
|
68
77
|
};
|
|
69
78
|
}
|
|
@@ -24,7 +24,7 @@ let EnvironmentVariableInfoStale = class EnvironmentVariableInfoStale {
|
|
|
24
24
|
addExtensionIdentifiers(extSet, ( this._diff.removed.values()));
|
|
25
25
|
addExtensionIdentifiers(extSet, ( this._diff.changed.values()));
|
|
26
26
|
let message = ( localize(
|
|
27
|
-
|
|
27
|
+
11820,
|
|
28
28
|
"The following extensions want to relaunch the terminal to contribute to its environment:"
|
|
29
29
|
));
|
|
30
30
|
message += getMergedDescription(this._collection, scope, this._extensionService, extSet);
|
|
@@ -32,10 +32,10 @@ let EnvironmentVariableInfoStale = class EnvironmentVariableInfoStale {
|
|
|
32
32
|
}
|
|
33
33
|
_getActions() {
|
|
34
34
|
return [{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
label: ( localize(11821, "Relaunch Terminal")),
|
|
36
|
+
run: () => this._terminalService.getInstanceFromId(this._terminalId)?.relaunch(),
|
|
37
|
+
commandId: TerminalCommandId.Relaunch
|
|
38
|
+
}];
|
|
39
39
|
}
|
|
40
40
|
getStatus(scope) {
|
|
41
41
|
return {
|
|
@@ -47,10 +47,7 @@ let EnvironmentVariableInfoStale = class EnvironmentVariableInfoStale {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
EnvironmentVariableInfoStale = ( __decorate([
|
|
51
|
-
( __param(3, ITerminalService)),
|
|
52
|
-
( __param(4, IExtensionService))
|
|
53
|
-
], EnvironmentVariableInfoStale));
|
|
50
|
+
EnvironmentVariableInfoStale = ( __decorate([( __param(3, ITerminalService)), ( __param(4, IExtensionService))], EnvironmentVariableInfoStale));
|
|
54
51
|
let EnvironmentVariableInfoChangesActive = class EnvironmentVariableInfoChangesActive {
|
|
55
52
|
constructor(_collection, _commandService, _extensionService) {
|
|
56
53
|
this._collection = _collection;
|
|
@@ -62,7 +59,7 @@ let EnvironmentVariableInfoChangesActive = class EnvironmentVariableInfoChangesA
|
|
|
62
59
|
const extSet = ( new Set());
|
|
63
60
|
addExtensionIdentifiers(extSet, ( this._collection.getVariableMap(scope).values()));
|
|
64
61
|
let message = ( localize(
|
|
65
|
-
|
|
62
|
+
11822,
|
|
66
63
|
"The following extensions have contributed to this terminal's environment:"
|
|
67
64
|
));
|
|
68
65
|
message += getMergedDescription(this._collection, scope, this._extensionService, extSet);
|
|
@@ -70,10 +67,10 @@ let EnvironmentVariableInfoChangesActive = class EnvironmentVariableInfoChangesA
|
|
|
70
67
|
}
|
|
71
68
|
_getActions(scope) {
|
|
72
69
|
return [{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
label: ( localize(11823, "Show Environment Contributions")),
|
|
71
|
+
run: () => this._commandService.executeCommand(TerminalCommandId.ShowEnvironmentContributions, scope),
|
|
72
|
+
commandId: TerminalCommandId.ShowEnvironmentContributions
|
|
73
|
+
}];
|
|
77
74
|
}
|
|
78
75
|
getStatus(scope) {
|
|
79
76
|
return {
|
|
@@ -85,12 +82,9 @@ let EnvironmentVariableInfoChangesActive = class EnvironmentVariableInfoChangesA
|
|
|
85
82
|
};
|
|
86
83
|
}
|
|
87
84
|
};
|
|
88
|
-
EnvironmentVariableInfoChangesActive = ( __decorate([
|
|
89
|
-
( __param(1, ICommandService)),
|
|
90
|
-
( __param(2, IExtensionService))
|
|
91
|
-
], EnvironmentVariableInfoChangesActive));
|
|
85
|
+
EnvironmentVariableInfoChangesActive = ( __decorate([( __param(1, ICommandService)), ( __param(2, IExtensionService))], EnvironmentVariableInfoChangesActive));
|
|
92
86
|
function getMergedDescription(collection, scope, extensionService, extSet) {
|
|
93
|
-
const message = [
|
|
87
|
+
const message = ["\n"];
|
|
94
88
|
const globalDescriptions = collection.getDescriptionMap(undefined);
|
|
95
89
|
const workspaceDescriptions = collection.getDescriptionMap(scope);
|
|
96
90
|
for (const ext of extSet) {
|
|
@@ -101,7 +95,7 @@ function getMergedDescription(collection, scope, extensionService, extSet) {
|
|
|
101
95
|
}
|
|
102
96
|
const workspaceDescription = workspaceDescriptions.get(ext);
|
|
103
97
|
if (workspaceDescription) {
|
|
104
|
-
const workspaceSuffix = globalDescription ? ` (${( localize(
|
|
98
|
+
const workspaceSuffix = globalDescription ? ` (${( localize(11824, "workspace"))})` : "";
|
|
105
99
|
message.push(`\n- \`${getExtensionName(ext, extensionService)}${workspaceSuffix}\``);
|
|
106
100
|
message.push(`: ${workspaceDescription}`);
|
|
107
101
|
}
|
|
@@ -109,7 +103,7 @@ function getMergedDescription(collection, scope, extensionService, extSet) {
|
|
|
109
103
|
message.push(`\n- \`${getExtensionName(ext, extensionService)}\``);
|
|
110
104
|
}
|
|
111
105
|
}
|
|
112
|
-
return message.join(
|
|
106
|
+
return message.join("");
|
|
113
107
|
}
|
|
114
108
|
function addExtensionIdentifiers(extSet, diff) {
|
|
115
109
|
for (const mutators of diff) {
|