@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.
- package/package.json +4 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/notifications.d.ts +51 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/common/notifications.js +9 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.js +14 -13
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.js +8 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +61 -61
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +42 -31
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +9 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +7 -16
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +321 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +83 -0
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +3 -3
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +0 -179
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.js +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-xterm-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "34.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": "34.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-xterm-addons-common": "34.0.1",
|
|
20
|
+
"@xterm/xterm": "6.1.0-beta.285"
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { URI } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/state";
|
|
2
|
+
/**
|
|
3
|
+
* Reason why authentication is required.
|
|
4
|
+
*
|
|
5
|
+
* @category Protocol Notifications
|
|
6
|
+
*/
|
|
7
|
+
export declare enum AuthRequiredReason {
|
|
8
|
+
/** The client has not yet authenticated for the resource */
|
|
9
|
+
Required = "required",
|
|
10
|
+
/** A previously valid token has expired or been revoked */
|
|
11
|
+
Expired = "expired"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Sent by the server when a protected resource requires (re-)authentication.
|
|
15
|
+
*
|
|
16
|
+
* This notification MAY be associated with any channel — for example, an
|
|
17
|
+
* agent advertised on the root channel, or a per-session resource. The
|
|
18
|
+
* `channel` field identifies the subscription the auth requirement belongs
|
|
19
|
+
* to; the `resource` field carries the OAuth-protected resource identifier
|
|
20
|
+
* (per RFC 9728).
|
|
21
|
+
*
|
|
22
|
+
* Clients should obtain a fresh token and push it via the `authenticate`
|
|
23
|
+
* command.
|
|
24
|
+
*
|
|
25
|
+
* @category Protocol Notifications
|
|
26
|
+
* @method auth/required
|
|
27
|
+
* @direction Server → Client
|
|
28
|
+
* @messageType Notification
|
|
29
|
+
* @version 1
|
|
30
|
+
* @see {@link /specification/authentication | Authentication}
|
|
31
|
+
* @example
|
|
32
|
+
* ```json
|
|
33
|
+
* {
|
|
34
|
+
* "jsonrpc": "2.0",
|
|
35
|
+
* "method": "auth/required",
|
|
36
|
+
* "params": {
|
|
37
|
+
* "channel": "ahp-root://",
|
|
38
|
+
* "resource": "https://api.github.com",
|
|
39
|
+
* "reason": "expired"
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export interface AuthRequiredParams {
|
|
45
|
+
/** Channel URI this notification belongs to */
|
|
46
|
+
channel: URI;
|
|
47
|
+
/** The protected resource identifier that requires authentication */
|
|
48
|
+
resource: string;
|
|
49
|
+
/** Why authentication is required */
|
|
50
|
+
reason?: AuthRequiredReason;
|
|
51
|
+
}
|
|
@@ -4,9 +4,13 @@ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/even
|
|
|
4
4
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { ProcessPropertyType } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
|
|
6
6
|
import { AGENT_HOST_SCHEME, fromAgentHostUri } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/agentHostUri';
|
|
7
|
-
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/actions';
|
|
8
|
-
import '../../../../platform/agentHost/common/state/protocol/notifications.js';
|
|
9
|
-
import
|
|
7
|
+
import { ActionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/common/actions';
|
|
8
|
+
import '../../../../platform/agentHost/common/state/protocol/common/notifications.js';
|
|
9
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-root/state';
|
|
10
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-session/state';
|
|
11
|
+
import { TerminalClaimKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-terminal/state';
|
|
12
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-changeset/state';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/channels-resource-watch/state';
|
|
10
14
|
import { StateComponents } from '@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/sessionState';
|
|
11
15
|
import { BasePty } from '../common/basePty.js';
|
|
12
16
|
|
|
@@ -50,7 +54,7 @@ class AgentHostPty extends BasePty {
|
|
|
50
54
|
try {
|
|
51
55
|
if (!this._options?.attachOnly) {
|
|
52
56
|
await this._connection.createTerminal({
|
|
53
|
-
|
|
57
|
+
channel: ( this._terminalUri.toString()),
|
|
54
58
|
claim: {
|
|
55
59
|
kind: TerminalClaimKind.Client,
|
|
56
60
|
clientId: this._connection.clientId
|
|
@@ -61,7 +65,7 @@ class AgentHostPty extends BasePty {
|
|
|
61
65
|
rows: this._lastDimensions.rows > 0 ? this._lastDimensions.rows : undefined
|
|
62
66
|
});
|
|
63
67
|
}
|
|
64
|
-
this._subscriptionRef = this._connection.getSubscription(StateComponents.Terminal, this._terminalUri);
|
|
68
|
+
this._subscriptionRef = this._connection.getSubscription(StateComponents.Terminal, this._terminalUri, "AgentHostPty");
|
|
65
69
|
const subscription = this._subscriptionRef.object;
|
|
66
70
|
if (subscription.value === undefined) {
|
|
67
71
|
await ( new Promise(resolve => {
|
|
@@ -211,9 +215,8 @@ class AgentHostPty extends BasePty {
|
|
|
211
215
|
return;
|
|
212
216
|
}
|
|
213
217
|
this._startBarrier.wait().then(() => {
|
|
214
|
-
this._connection.dispatch({
|
|
218
|
+
this._connection.dispatch(( this._terminalUri.toString()), {
|
|
215
219
|
type: ActionType.TerminalInput,
|
|
216
|
-
terminal: ( this._terminalUri.toString()),
|
|
217
220
|
data
|
|
218
221
|
});
|
|
219
222
|
});
|
|
@@ -225,9 +228,8 @@ class AgentHostPty extends BasePty {
|
|
|
225
228
|
this._lastDimensions.cols = cols;
|
|
226
229
|
this._lastDimensions.rows = rows;
|
|
227
230
|
this._startBarrier.wait().then(() => {
|
|
228
|
-
this._connection.dispatch({
|
|
231
|
+
this._connection.dispatch(( this._terminalUri.toString()), {
|
|
229
232
|
type: ActionType.TerminalResized,
|
|
230
|
-
terminal: ( this._terminalUri.toString()),
|
|
231
233
|
cols,
|
|
232
234
|
rows
|
|
233
235
|
});
|
|
@@ -251,9 +253,8 @@ class AgentHostPty extends BasePty {
|
|
|
251
253
|
return this._properties.cwd || this._initialCwd;
|
|
252
254
|
}
|
|
253
255
|
async clearBuffer() {
|
|
254
|
-
this._connection.dispatch({
|
|
255
|
-
type: ActionType.TerminalCleared
|
|
256
|
-
terminal: ( this._terminalUri.toString())
|
|
256
|
+
this._connection.dispatch(( this._terminalUri.toString()), {
|
|
257
|
+
type: ActionType.TerminalCleared
|
|
257
258
|
});
|
|
258
259
|
}
|
|
259
260
|
acknowledgeDataEvent(_charCount) {}
|
|
@@ -272,7 +273,7 @@ class AgentHostPty extends BasePty {
|
|
|
272
273
|
this._subscriptionRef = undefined;
|
|
273
274
|
this._connection = newConnection;
|
|
274
275
|
try {
|
|
275
|
-
this._subscriptionRef = this._connection.getSubscription(StateComponents.Terminal, this._terminalUri);
|
|
276
|
+
this._subscriptionRef = this._connection.getSubscription(StateComponents.Terminal, this._terminalUri, "AgentHostPty");
|
|
276
277
|
const subscription = this._subscriptionRef.object;
|
|
277
278
|
if (subscription.value === undefined) {
|
|
278
279
|
const RECONNECT_HYDRATE_TIMEOUT_MS = 10_000;
|
|
@@ -83,7 +83,7 @@ let AgentHostTerminalService = class AgentHostTerminalService extends Disposable
|
|
|
83
83
|
}
|
|
84
84
|
} else if (displaying < entries.length) {
|
|
85
85
|
desiredProfiles.set("__quickpick__", {
|
|
86
|
-
name: ( localize(
|
|
86
|
+
name: ( localize(14096, "Agent Host…")),
|
|
87
87
|
address: "__quickpick__",
|
|
88
88
|
getConnection: () => undefined
|
|
89
89
|
});
|
|
@@ -104,7 +104,7 @@ let AgentHostTerminalService = class AgentHostTerminalService extends Disposable
|
|
|
104
104
|
infos.push({
|
|
105
105
|
extensionIdentifier: AGENT_HOST_PROFILE_EXT_ID,
|
|
106
106
|
profileId: key,
|
|
107
|
-
title: key === "__quickpick__" ? ( localize(
|
|
107
|
+
title: key === "__quickpick__" ? ( localize(14096, "Agent Host…")) : ( localize(14097, "Agent Host ({0})", desiredProfiles.get(key).name)),
|
|
108
108
|
address: key
|
|
109
109
|
});
|
|
110
110
|
}
|
|
@@ -119,12 +119,12 @@ let AgentHostTerminalService = class AgentHostTerminalService extends Disposable
|
|
|
119
119
|
let displayName = entry.name;
|
|
120
120
|
if (key === "__quickpick__") {
|
|
121
121
|
const picks = ( allEntries.map(e => ({
|
|
122
|
-
label: ( localize(
|
|
122
|
+
label: ( localize(14097, "Agent Host ({0})", e.name)),
|
|
123
123
|
address: e.address,
|
|
124
124
|
hostName: e.name
|
|
125
125
|
})));
|
|
126
126
|
const pick = await this._quickInputService.pick(picks, {
|
|
127
|
-
placeHolder: ( localize(
|
|
127
|
+
placeHolder: ( localize(14098, "Select an agent host to open a terminal on"))
|
|
128
128
|
});
|
|
129
129
|
if (!pick) {
|
|
130
130
|
return;
|
|
@@ -140,13 +140,13 @@ let AgentHostTerminalService = class AgentHostTerminalService extends Disposable
|
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
await this.createTerminal(connection, {
|
|
143
|
-
name: ( localize(
|
|
143
|
+
name: ( localize(14097, "Agent Host ({0})", displayName)),
|
|
144
144
|
cwd: options.cwd ? (typeof options.cwd === "string" ? URI.file(options.cwd) : options.cwd) : this._defaultCwd,
|
|
145
145
|
location: options.location
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
const title = key === "__quickpick__" ? ( localize(
|
|
149
|
+
const title = key === "__quickpick__" ? ( localize(14096, "Agent Host…")) : ( localize(14097, "Agent Host ({0})", entry.name));
|
|
150
150
|
const store = ( new DisposableStore());
|
|
151
151
|
store.add(
|
|
152
152
|
this._terminalProfileService.registerTerminalProfileProvider(AGENT_HOST_PROFILE_EXT_ID, key, provider)
|
|
@@ -175,7 +175,7 @@ let AgentHostTerminalService = class AgentHostTerminalService extends Disposable
|
|
|
175
175
|
scheme: "agenthost-terminal",
|
|
176
176
|
path: `/${generateUuid()}`
|
|
177
177
|
}));
|
|
178
|
-
const name = options?.name ?? ( localize(
|
|
178
|
+
const name = options?.name ?? ( localize(14099, "Agent Host Terminal"));
|
|
179
179
|
const key = ( terminalUri.toString());
|
|
180
180
|
const instance = await this._terminalService.createTerminal({
|
|
181
181
|
config: {
|
|
@@ -241,7 +241,7 @@ let AgentHostTerminalService = class AgentHostTerminalService extends Disposable
|
|
|
241
241
|
});
|
|
242
242
|
return pty;
|
|
243
243
|
},
|
|
244
|
-
name: ( localize(
|
|
244
|
+
name: ( localize(14100, "Agent Host Terminal")),
|
|
245
245
|
isFeatureTerminal: true,
|
|
246
246
|
hideFromUser: true
|
|
247
247
|
}
|
|
@@ -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
|
+
14105,
|
|
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,7 +32,7 @@ let EnvironmentVariableInfoStale = class EnvironmentVariableInfoStale {
|
|
|
32
32
|
}
|
|
33
33
|
_getActions() {
|
|
34
34
|
return [{
|
|
35
|
-
label: ( localize(
|
|
35
|
+
label: ( localize(14106, "Relaunch Terminal")),
|
|
36
36
|
run: () => this._terminalService.getInstanceFromId(this._terminalId)?.relaunch(),
|
|
37
37
|
commandId: TerminalCommandId.Relaunch
|
|
38
38
|
}];
|
|
@@ -59,7 +59,7 @@ let EnvironmentVariableInfoChangesActive = class EnvironmentVariableInfoChangesA
|
|
|
59
59
|
const extSet = ( new Set());
|
|
60
60
|
addExtensionIdentifiers(extSet, ( this._collection.getVariableMap(scope).values()));
|
|
61
61
|
let message = ( localize(
|
|
62
|
-
|
|
62
|
+
14107,
|
|
63
63
|
"The following extensions have contributed to this terminal's environment:"
|
|
64
64
|
));
|
|
65
65
|
message += getMergedDescription(this._collection, scope, this._extensionService, extSet);
|
|
@@ -67,7 +67,7 @@ let EnvironmentVariableInfoChangesActive = class EnvironmentVariableInfoChangesA
|
|
|
67
67
|
}
|
|
68
68
|
_getActions(scope) {
|
|
69
69
|
return [{
|
|
70
|
-
label: ( localize(
|
|
70
|
+
label: ( localize(14108, "Show Environment Contributions")),
|
|
71
71
|
run: () => this._commandService.executeCommand(TerminalCommandId.ShowEnvironmentContributions, scope),
|
|
72
72
|
commandId: TerminalCommandId.ShowEnvironmentContributions
|
|
73
73
|
}];
|
|
@@ -95,7 +95,7 @@ function getMergedDescription(collection, scope, extensionService, extSet) {
|
|
|
95
95
|
}
|
|
96
96
|
const workspaceDescription = workspaceDescriptions.get(ext);
|
|
97
97
|
if (workspaceDescription) {
|
|
98
|
-
const workspaceSuffix = globalDescription ? ` (${( localize(
|
|
98
|
+
const workspaceSuffix = globalDescription ? ` (${( localize(14109, "workspace"))})` : "";
|
|
99
99
|
message.push(`\n- \`${getExtensionName(ext, extensionService)}${workspaceSuffix}\``);
|
|
100
100
|
message.push(`: ${workspaceDescription}`);
|
|
101
101
|
}
|