mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 03:57:41 -05:00
Merge pull request #76736 from microsoft/alexr00/terminalVPChanges
Changes to terminal to enable Tasks use of TerminalVirtualProcess
This commit is contained in:
@@ -268,8 +268,13 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
|
||||
}
|
||||
|
||||
private _onTerminalRequestVirtualProcess(proxy: ITerminalProcessExtHostProxy): void {
|
||||
this._terminalProcessesReady[proxy.terminalId](proxy);
|
||||
delete this._terminalProcessesReady[proxy.terminalId];
|
||||
const ready = this._terminalProcessesReady[proxy.terminalId];
|
||||
if (!ready) {
|
||||
this._terminalProcesses[proxy.terminalId] = Promise.resolve(proxy);
|
||||
} else {
|
||||
ready(proxy);
|
||||
delete this._terminalProcessesReady[proxy.terminalId];
|
||||
}
|
||||
|
||||
// Note that onReisze is not being listened to here as it needs to fire when max dimensions
|
||||
// change, excluding the dimension override
|
||||
|
||||
@@ -337,7 +337,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
return terminal;
|
||||
}
|
||||
|
||||
public async attachVirtualProcessToTerminal(id: number, virtualProcess: vscode.TerminalVirtualProcess): Promise<void> {
|
||||
public attachVirtualProcessToTerminal(id: number, virtualProcess: vscode.TerminalVirtualProcess) {
|
||||
const terminal = this._getTerminalById(id);
|
||||
if (!terminal) {
|
||||
throw new Error(`Cannot resolve terminal with id ${id} for virtual process`);
|
||||
@@ -411,7 +411,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
}
|
||||
return;
|
||||
}
|
||||
this._performTerminalIdAction(id, terminal => {
|
||||
this.performTerminalIdAction(id, terminal => {
|
||||
if (terminal) {
|
||||
this._activeTerminal = terminal;
|
||||
if (original !== this._activeTerminal) {
|
||||
@@ -496,10 +496,10 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
}
|
||||
|
||||
public $acceptTerminalProcessId(id: number, processId: number): void {
|
||||
this._performTerminalIdAction(id, terminal => terminal._setProcessId(processId));
|
||||
this.performTerminalIdAction(id, terminal => terminal._setProcessId(processId));
|
||||
}
|
||||
|
||||
private _performTerminalIdAction(id: number, callback: (terminal: ExtHostTerminal) => void): void {
|
||||
public performTerminalIdAction(id: number, callback: (terminal: ExtHostTerminal) => void): void {
|
||||
let terminal = this._getTerminalById(id);
|
||||
if (terminal) {
|
||||
callback(terminal);
|
||||
|
||||
Reference in New Issue
Block a user