@codingame/monaco-vscode-xterm-addons-common 25.1.2 → 26.0.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 +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +58 -114
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +42 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +209 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/attachInstructionsAction.js +18 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/newPromptFileActions.js +151 -70
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptName.js +27 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/askForPromptSourceFolder.js +67 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.js +188 -116
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatPasteProviders.js +106 -71
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalUri.js +6 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +204 -140
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +77 -82
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermAddonImporter.js +24 -24
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +262 -162
|
@@ -12,12 +12,12 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
12
12
|
import { TerminalContribSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/terminalContribExports';
|
|
13
13
|
|
|
14
14
|
var Boundary;
|
|
15
|
-
(function
|
|
15
|
+
(function(Boundary) {
|
|
16
16
|
Boundary[Boundary["Top"] = 0] = "Top";
|
|
17
17
|
Boundary[Boundary["Bottom"] = 1] = "Bottom";
|
|
18
18
|
})(Boundary || (Boundary = {}));
|
|
19
19
|
var ScrollPosition;
|
|
20
|
-
(function
|
|
20
|
+
(function(ScrollPosition) {
|
|
21
21
|
ScrollPosition[ScrollPosition["Top"] = 0] = "Top";
|
|
22
22
|
ScrollPosition[ScrollPosition["Middle"] = 1] = "Middle";
|
|
23
23
|
})(ScrollPosition || (ScrollPosition = {}));
|
|
@@ -48,8 +48,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
48
48
|
if (commandCapability.currentCommand?.promptStartMarker && commandCapability.currentCommand.commandExecutedMarker) {
|
|
49
49
|
markers.push(commandCapability.currentCommand?.promptStartMarker);
|
|
50
50
|
}
|
|
51
|
-
}
|
|
52
|
-
else if (partialCommandCapability) {
|
|
51
|
+
} else if (partialCommandCapability) {
|
|
53
52
|
markers.push(...partialCommandCapability.commands);
|
|
54
53
|
}
|
|
55
54
|
if (markCapability && !skipEmptyCommands) {
|
|
@@ -66,7 +65,9 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
66
65
|
_findCommand(marker) {
|
|
67
66
|
const commandCapability = this._capabilities.get(TerminalCapability.CommandDetection);
|
|
68
67
|
if (commandCapability) {
|
|
69
|
-
const command = commandCapability.commands.find(
|
|
68
|
+
const command = commandCapability.commands.find(
|
|
69
|
+
e => e.marker?.line === marker.line || e.promptStartMarker?.line === marker.line
|
|
70
|
+
);
|
|
70
71
|
if (command) {
|
|
71
72
|
return command;
|
|
72
73
|
}
|
|
@@ -96,7 +97,11 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
96
97
|
}
|
|
97
98
|
return !this._getMarkers(true).includes(marker);
|
|
98
99
|
}
|
|
99
|
-
scrollToPreviousMark(
|
|
100
|
+
scrollToPreviousMark(
|
|
101
|
+
scrollPosition = ScrollPosition.Middle,
|
|
102
|
+
retainSelection = false,
|
|
103
|
+
skipEmptyCommands = true
|
|
104
|
+
) {
|
|
100
105
|
if (!this._terminal) {
|
|
101
106
|
return;
|
|
102
107
|
}
|
|
@@ -104,30 +109,26 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
104
109
|
this._selectionStart = null;
|
|
105
110
|
}
|
|
106
111
|
let markerIndex;
|
|
107
|
-
const currentLineY = typeof this._currentMarker ===
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
const currentLineY = typeof this._currentMarker === "object" ? this.getTargetScrollLine(this._currentMarker.line, scrollPosition) : Math.min(
|
|
113
|
+
getLine(this._terminal, this._currentMarker),
|
|
114
|
+
this._terminal.buffer.active.baseY
|
|
115
|
+
);
|
|
110
116
|
const viewportY = this._terminal.buffer.active.viewportY;
|
|
111
|
-
if (typeof this._currentMarker ===
|
|
117
|
+
if (typeof this._currentMarker === "object" ? !this._isMarkerInViewport(this._terminal, this._currentMarker) : currentLineY !== viewportY) {
|
|
112
118
|
const markersBelowViewport = this._getMarkers(skipEmptyCommands).filter(e => e.line >= viewportY).length;
|
|
113
119
|
markerIndex = this._getMarkers(skipEmptyCommands).length - markersBelowViewport - 1;
|
|
114
|
-
}
|
|
115
|
-
else if (this._currentMarker === Boundary.Bottom) {
|
|
120
|
+
} else if (this._currentMarker === Boundary.Bottom) {
|
|
116
121
|
markerIndex = this._getMarkers(skipEmptyCommands).length - 1;
|
|
117
|
-
}
|
|
118
|
-
else if (this._currentMarker === Boundary.Top) {
|
|
122
|
+
} else if (this._currentMarker === Boundary.Top) {
|
|
119
123
|
markerIndex = -1;
|
|
120
|
-
}
|
|
121
|
-
else if (this._isDisposable) {
|
|
124
|
+
} else if (this._isDisposable) {
|
|
122
125
|
markerIndex = this._findPreviousMarker(skipEmptyCommands);
|
|
123
126
|
this._currentMarker.dispose();
|
|
124
127
|
this._isDisposable = false;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
128
|
+
} else {
|
|
127
129
|
if (skipEmptyCommands && this._isEmptyCommand(this._currentMarker)) {
|
|
128
130
|
markerIndex = this._findPreviousMarker(true);
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
+
} else {
|
|
131
132
|
markerIndex = this._getMarkers(skipEmptyCommands).indexOf(this._currentMarker) - 1;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
@@ -140,7 +141,11 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
140
141
|
this._currentMarker = this._getMarkers(skipEmptyCommands)[markerIndex];
|
|
141
142
|
this._scrollToCommand(this._currentMarker, scrollPosition);
|
|
142
143
|
}
|
|
143
|
-
scrollToNextMark(
|
|
144
|
+
scrollToNextMark(
|
|
145
|
+
scrollPosition = ScrollPosition.Middle,
|
|
146
|
+
retainSelection = false,
|
|
147
|
+
skipEmptyCommands = true
|
|
148
|
+
) {
|
|
144
149
|
if (!this._terminal) {
|
|
145
150
|
return;
|
|
146
151
|
}
|
|
@@ -148,30 +153,26 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
148
153
|
this._selectionStart = null;
|
|
149
154
|
}
|
|
150
155
|
let markerIndex;
|
|
151
|
-
const currentLineY = typeof this._currentMarker ===
|
|
152
|
-
|
|
153
|
-
|
|
156
|
+
const currentLineY = typeof this._currentMarker === "object" ? this.getTargetScrollLine(this._currentMarker.line, scrollPosition) : Math.min(
|
|
157
|
+
getLine(this._terminal, this._currentMarker),
|
|
158
|
+
this._terminal.buffer.active.baseY
|
|
159
|
+
);
|
|
154
160
|
const viewportY = this._terminal.buffer.active.viewportY;
|
|
155
|
-
if (typeof this._currentMarker ===
|
|
161
|
+
if (typeof this._currentMarker === "object" ? !this._isMarkerInViewport(this._terminal, this._currentMarker) : currentLineY !== viewportY) {
|
|
156
162
|
const markersAboveViewport = this._getMarkers(skipEmptyCommands).filter(e => e.line <= viewportY).length;
|
|
157
163
|
markerIndex = markersAboveViewport;
|
|
158
|
-
}
|
|
159
|
-
else if (this._currentMarker === Boundary.Bottom) {
|
|
164
|
+
} else if (this._currentMarker === Boundary.Bottom) {
|
|
160
165
|
markerIndex = this._getMarkers(skipEmptyCommands).length;
|
|
161
|
-
}
|
|
162
|
-
else if (this._currentMarker === Boundary.Top) {
|
|
166
|
+
} else if (this._currentMarker === Boundary.Top) {
|
|
163
167
|
markerIndex = 0;
|
|
164
|
-
}
|
|
165
|
-
else if (this._isDisposable) {
|
|
168
|
+
} else if (this._isDisposable) {
|
|
166
169
|
markerIndex = this._findNextMarker(skipEmptyCommands);
|
|
167
170
|
this._currentMarker.dispose();
|
|
168
171
|
this._isDisposable = false;
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
172
|
+
} else {
|
|
171
173
|
if (skipEmptyCommands && this._isEmptyCommand(this._currentMarker)) {
|
|
172
174
|
markerIndex = this._findNextMarker(true);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
+
} else {
|
|
175
176
|
markerIndex = this._getMarkers(skipEmptyCommands).indexOf(this._currentMarker) + 1;
|
|
176
177
|
}
|
|
177
178
|
}
|
|
@@ -188,8 +189,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
188
189
|
const command = this._findCommand(marker);
|
|
189
190
|
if (command) {
|
|
190
191
|
this.revealCommand(command, position);
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
192
|
+
} else {
|
|
193
193
|
this._scrollToMarker(marker, position);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
@@ -204,8 +204,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
204
204
|
if (!options?.hideDecoration) {
|
|
205
205
|
if (options?.bufferRange) {
|
|
206
206
|
this._highlightBufferRange(options.bufferRange);
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
207
|
+
} else {
|
|
209
208
|
this.registerTemporaryDecoration(start, end, true);
|
|
210
209
|
}
|
|
211
210
|
}
|
|
@@ -213,13 +212,13 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
213
212
|
_createMarkerForOffset(marker, offset) {
|
|
214
213
|
if (offset === 0 && isMarker(marker)) {
|
|
215
214
|
return marker;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
} else {
|
|
216
|
+
const offsetMarker = this._terminal?.registerMarker(
|
|
217
|
+
-this._terminal.buffer.active.cursorY + toLineIndex(marker) - this._terminal.buffer.active.baseY + offset
|
|
218
|
+
);
|
|
219
219
|
if (offsetMarker) {
|
|
220
220
|
return offsetMarker;
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
221
|
+
} else {
|
|
223
222
|
throw ( new Error(`Could not register marker with offset ${toLineIndex(marker)}, ${offset}`));
|
|
224
223
|
}
|
|
225
224
|
}
|
|
@@ -273,12 +272,12 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
273
272
|
store.add(decoration.onRender(element => {
|
|
274
273
|
if (!renderedElement) {
|
|
275
274
|
renderedElement = element;
|
|
276
|
-
element.classList.add(
|
|
275
|
+
element.classList.add("terminal-command-guide");
|
|
277
276
|
if (i === 0) {
|
|
278
|
-
element.classList.add(
|
|
277
|
+
element.classList.add("top");
|
|
279
278
|
}
|
|
280
279
|
if (i === decorationCount - 1) {
|
|
281
|
-
element.classList.add(
|
|
280
|
+
element.classList.add("bottom");
|
|
282
281
|
}
|
|
283
282
|
}
|
|
284
283
|
}));
|
|
@@ -287,7 +286,9 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
287
286
|
}
|
|
288
287
|
}
|
|
289
288
|
saveScrollState() {
|
|
290
|
-
this._scrollState = {
|
|
289
|
+
this._scrollState = {
|
|
290
|
+
viewportY: this._terminal?.buffer.active.viewportY ?? 0
|
|
291
|
+
};
|
|
291
292
|
}
|
|
292
293
|
restoreScrollState() {
|
|
293
294
|
if (this._scrollState && this._terminal) {
|
|
@@ -315,10 +316,12 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
315
316
|
decoration.onRender(element => {
|
|
316
317
|
if (!renderedElement) {
|
|
317
318
|
renderedElement = element;
|
|
318
|
-
element.classList.add(
|
|
319
|
+
element.classList.add("terminal-range-highlight");
|
|
319
320
|
}
|
|
320
321
|
});
|
|
321
|
-
decoration.onDispose(() => {
|
|
322
|
+
decoration.onDispose(() => {
|
|
323
|
+
this._navigationDecorations = this._navigationDecorations?.filter(d => d !== decoration);
|
|
324
|
+
});
|
|
322
325
|
}
|
|
323
326
|
}
|
|
324
327
|
}
|
|
@@ -335,7 +338,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
335
338
|
marker: this._createMarkerForOffset(marker, i),
|
|
336
339
|
width: this._terminal.cols,
|
|
337
340
|
overviewRulerOptions: i === 0 ? {
|
|
338
|
-
color: color?.toString() ||
|
|
341
|
+
color: color?.toString() || "#a0a0a0cc"
|
|
339
342
|
} : undefined
|
|
340
343
|
});
|
|
341
344
|
if (decoration) {
|
|
@@ -344,29 +347,30 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
344
347
|
decoration.onRender(element => {
|
|
345
348
|
if (!renderedElement) {
|
|
346
349
|
renderedElement = element;
|
|
347
|
-
element.classList.add(
|
|
350
|
+
element.classList.add("terminal-scroll-highlight");
|
|
348
351
|
if (showOutline) {
|
|
349
|
-
element.classList.add(
|
|
352
|
+
element.classList.add("terminal-scroll-highlight-outline");
|
|
350
353
|
}
|
|
351
354
|
if (i === 0) {
|
|
352
|
-
element.classList.add(
|
|
355
|
+
element.classList.add("top");
|
|
353
356
|
}
|
|
354
357
|
if (i === decorationCount - 1) {
|
|
355
|
-
element.classList.add(
|
|
358
|
+
element.classList.add("bottom");
|
|
356
359
|
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
element.classList.add('terminal-scroll-highlight');
|
|
360
|
+
} else {
|
|
361
|
+
element.classList.add("terminal-scroll-highlight");
|
|
360
362
|
}
|
|
361
363
|
if (this._terminal?.element) {
|
|
362
364
|
element.style.marginLeft = `-${getWindow(this._terminal.element).getComputedStyle(this._terminal.element).paddingLeft}`;
|
|
363
365
|
}
|
|
364
366
|
});
|
|
365
|
-
decoration.onDispose(() => {
|
|
367
|
+
decoration.onDispose(() => {
|
|
368
|
+
this._navigationDecorations = this._navigationDecorations?.filter(d => d !== decoration);
|
|
369
|
+
});
|
|
366
370
|
if (showOutline) {
|
|
367
371
|
timeout(350).then(() => {
|
|
368
372
|
if (renderedElement) {
|
|
369
|
-
renderedElement.classList.remove(
|
|
373
|
+
renderedElement.classList.remove("terminal-scroll-highlight-outline");
|
|
370
374
|
}
|
|
371
375
|
});
|
|
372
376
|
}
|
|
@@ -397,7 +401,9 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
397
401
|
return;
|
|
398
402
|
}
|
|
399
403
|
const endMarker = endMarkerId ? detectionCapability.getMark(endMarkerId) : startMarker;
|
|
400
|
-
this._scrollToMarker(startMarker, ScrollPosition.Top, endMarker, {
|
|
404
|
+
this._scrollToMarker(startMarker, ScrollPosition.Top, endMarker, {
|
|
405
|
+
hideDecoration: !highlight
|
|
406
|
+
});
|
|
401
407
|
}
|
|
402
408
|
selectToPreviousMark() {
|
|
403
409
|
if (!this._terminal) {
|
|
@@ -408,8 +414,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
408
414
|
}
|
|
409
415
|
if (( this._capabilities.has(TerminalCapability.CommandDetection))) {
|
|
410
416
|
this.scrollToPreviousMark(ScrollPosition.Middle, true, true);
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
417
|
+
} else {
|
|
413
418
|
this.scrollToPreviousMark(ScrollPosition.Middle, true, false);
|
|
414
419
|
}
|
|
415
420
|
selectLines(this._terminal, this._currentMarker, this._selectionStart);
|
|
@@ -423,8 +428,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
423
428
|
}
|
|
424
429
|
if (( this._capabilities.has(TerminalCapability.CommandDetection))) {
|
|
425
430
|
this.scrollToNextMark(ScrollPosition.Middle, true, true);
|
|
426
|
-
}
|
|
427
|
-
else {
|
|
431
|
+
} else {
|
|
428
432
|
this.scrollToNextMark(ScrollPosition.Middle, true, false);
|
|
429
433
|
}
|
|
430
434
|
selectLines(this._terminal, this._currentMarker, this._selectionStart);
|
|
@@ -459,8 +463,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
459
463
|
}
|
|
460
464
|
if (this._currentMarker === Boundary.Bottom) {
|
|
461
465
|
this._currentMarker = this._registerMarkerOrThrow(xterm, this._getOffset(xterm) - 1);
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
466
|
+
} else {
|
|
464
467
|
const offset = this._getOffset(xterm);
|
|
465
468
|
if (this._isDisposable) {
|
|
466
469
|
this._currentMarker.dispose();
|
|
@@ -480,8 +483,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
480
483
|
}
|
|
481
484
|
if (this._currentMarker === Boundary.Top) {
|
|
482
485
|
this._currentMarker = this._registerMarkerOrThrow(xterm, this._getOffset(xterm) + 1);
|
|
483
|
-
}
|
|
484
|
-
else {
|
|
486
|
+
} else {
|
|
485
487
|
const offset = this._getOffset(xterm);
|
|
486
488
|
if (this._isDisposable) {
|
|
487
489
|
this._currentMarker.dispose();
|
|
@@ -501,11 +503,9 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
501
503
|
_getOffset(xterm) {
|
|
502
504
|
if (this._currentMarker === Boundary.Bottom) {
|
|
503
505
|
return 0;
|
|
504
|
-
}
|
|
505
|
-
else if (this._currentMarker === Boundary.Top) {
|
|
506
|
+
} else if (this._currentMarker === Boundary.Top) {
|
|
506
507
|
return 0 - (xterm.buffer.active.baseY + xterm.buffer.active.cursorY);
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
508
|
+
} else {
|
|
509
509
|
let offset = getLine(xterm, this._currentMarker);
|
|
510
510
|
offset -= xterm.buffer.active.baseY + xterm.buffer.active.cursorY;
|
|
511
511
|
return offset;
|
|
@@ -514,8 +514,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
514
514
|
_findPreviousMarker(skipEmptyCommands = false) {
|
|
515
515
|
if (this._currentMarker === Boundary.Top) {
|
|
516
516
|
return 0;
|
|
517
|
-
}
|
|
518
|
-
else if (this._currentMarker === Boundary.Bottom) {
|
|
517
|
+
} else if (this._currentMarker === Boundary.Bottom) {
|
|
519
518
|
return this._getMarkers(skipEmptyCommands).length - 1;
|
|
520
519
|
}
|
|
521
520
|
let i;
|
|
@@ -529,8 +528,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
529
528
|
_findNextMarker(skipEmptyCommands = false) {
|
|
530
529
|
if (this._currentMarker === Boundary.Top) {
|
|
531
530
|
return 0;
|
|
532
|
-
}
|
|
533
|
-
else if (this._currentMarker === Boundary.Bottom) {
|
|
531
|
+
} else if (this._currentMarker === Boundary.Bottom) {
|
|
534
532
|
return this._getMarkers(skipEmptyCommands).length - 1;
|
|
535
533
|
}
|
|
536
534
|
let i;
|
|
@@ -542,10 +540,7 @@ let MarkNavigationAddon = class MarkNavigationAddon extends Disposable {
|
|
|
542
540
|
return this._getMarkers(skipEmptyCommands).length;
|
|
543
541
|
}
|
|
544
542
|
};
|
|
545
|
-
MarkNavigationAddon = ( __decorate([
|
|
546
|
-
( __param(1, IConfigurationService)),
|
|
547
|
-
( __param(2, IThemeService))
|
|
548
|
-
], MarkNavigationAddon));
|
|
543
|
+
MarkNavigationAddon = ( __decorate([( __param(1, IConfigurationService)), ( __param(2, IThemeService))], MarkNavigationAddon));
|
|
549
544
|
function getLine(xterm, marker) {
|
|
550
545
|
if (marker === Boundary.Bottom) {
|
|
551
546
|
return xterm.buffer.active.baseY + xterm.rows - 1;
|
|
@@ -570,7 +565,7 @@ function selectLines(xterm, start, end) {
|
|
|
570
565
|
xterm.selectLines(startLine, endLine);
|
|
571
566
|
}
|
|
572
567
|
function isMarker(value) {
|
|
573
|
-
return typeof value !==
|
|
568
|
+
return typeof value !== "number";
|
|
574
569
|
}
|
|
575
570
|
function toLineIndex(line) {
|
|
576
571
|
return isMarker(line) ? line.line : line;
|
|
@@ -6,30 +6,30 @@ class XtermAddonImporter {
|
|
|
6
6
|
let addon = importedAddons.get(name);
|
|
7
7
|
if (!addon) {
|
|
8
8
|
switch (name) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
9
|
+
case "clipboard":
|
|
10
|
+
addon = (await import('@xterm/addon-clipboard')).ClipboardAddon;
|
|
11
|
+
break;
|
|
12
|
+
case "image":
|
|
13
|
+
addon = (await import('@xterm/addon-image')).ImageAddon;
|
|
14
|
+
break;
|
|
15
|
+
case "ligatures":
|
|
16
|
+
addon = (await import('@xterm/addon-ligatures')).LigaturesAddon;
|
|
17
|
+
break;
|
|
18
|
+
case "progress":
|
|
19
|
+
addon = (await import('@xterm/addon-progress')).ProgressAddon;
|
|
20
|
+
break;
|
|
21
|
+
case "search":
|
|
22
|
+
addon = (await import('@xterm/addon-search')).SearchAddon;
|
|
23
|
+
break;
|
|
24
|
+
case "serialize":
|
|
25
|
+
addon = (await import('@xterm/addon-serialize')).SerializeAddon;
|
|
26
|
+
break;
|
|
27
|
+
case "unicode11":
|
|
28
|
+
addon = (await import('@xterm/addon-unicode11')).Unicode11Addon;
|
|
29
|
+
break;
|
|
30
|
+
case "webgl":
|
|
31
|
+
addon = (await import('@xterm/addon-webgl')).WebglAddon;
|
|
32
|
+
break;
|
|
33
33
|
}
|
|
34
34
|
if (!addon) {
|
|
35
35
|
throw ( new Error(`Could not load addon ${name}`));
|
|
@@ -68,6 +68,8 @@ export declare class XtermTerminal extends Disposable implements IXtermTerminal,
|
|
|
68
68
|
get lastInputEvent(): string | undefined;
|
|
69
69
|
private _progressState;
|
|
70
70
|
get progressState(): IProgressState;
|
|
71
|
+
get buffer(): import("@xterm/xterm").IBufferNamespace;
|
|
72
|
+
get cols(): number;
|
|
71
73
|
private _markNavigationAddon;
|
|
72
74
|
private _shellIntegrationAddon;
|
|
73
75
|
private _decorationAddon;
|
|
@@ -164,6 +166,7 @@ export declare class XtermTerminal extends Disposable implements IXtermTerminal,
|
|
|
164
166
|
scrollToTop(): void;
|
|
165
167
|
scrollToLine(line: number, position?: ScrollPosition): void;
|
|
166
168
|
clearBuffer(): void;
|
|
169
|
+
reset(): void;
|
|
167
170
|
hasSelection(): boolean;
|
|
168
171
|
clearSelection(): void;
|
|
169
172
|
selectMarkedRange(fromMarkerId: string, toMarkerId: string, scrollIntoView?: boolean): void;
|
|
@@ -178,7 +181,7 @@ export declare class XtermTerminal extends Disposable implements IXtermTerminal,
|
|
|
178
181
|
private _refreshLigaturesAddon;
|
|
179
182
|
private _refreshImageAddon;
|
|
180
183
|
private _disposeOfWebglRenderer;
|
|
181
|
-
getRangeAsVT(startMarker
|
|
184
|
+
getRangeAsVT(startMarker?: IXtermMarker, endMarker?: IXtermMarker, skipLastLine?: boolean): Promise<string>;
|
|
182
185
|
getXtermTheme(theme?: IColorTheme): ITheme;
|
|
183
186
|
private _updateTheme;
|
|
184
187
|
refresh(): void;
|