Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56522afba1 | ||
|
|
6c526773b0 | ||
|
|
136d8f86f2 |
@@ -324,7 +324,6 @@ export async function checkCompiled() {
|
||||
export async function checkDTS() {
|
||||
let failing = false;
|
||||
failing = !await assertAnyFile('vscode.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.d.ts is missing.`)) || failing;
|
||||
failing = !await assertAnyFile('vscode.proposed.terminalDataWriteEvent.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.proposed.terminalDataWriteEvent.d.ts is missing.`)) || failing;
|
||||
failing = !await assertAnyFile('vscode.proposed.lmTools.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.proposed.lmTools.d.ts is missing.`)) || failing;
|
||||
|
||||
if (!failing) {
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"Snippets"
|
||||
],
|
||||
"enabledApiProposals": [
|
||||
"terminalDataWriteEvent",
|
||||
"chatParticipantAdditions"
|
||||
],
|
||||
"capabilities": {
|
||||
|
||||
@@ -372,11 +372,11 @@ export class ComposedInteractor implements IInteractor {
|
||||
export interface ISystemInteractor {
|
||||
createTerminal(options: vscode.TerminalOptions): vscode.Terminal;
|
||||
onDidCloseTerminal: typeof vscode.window.onDidCloseTerminal;
|
||||
onDidWriteTerminalData: typeof vscode.window.onDidWriteTerminalData;
|
||||
onDidStartTerminalShellExecution: typeof vscode.window.onDidStartTerminalShellExecution;
|
||||
}
|
||||
|
||||
export const defaultSystemInteractor: ISystemInteractor = {
|
||||
createTerminal: vscode.window.createTerminal,
|
||||
onDidCloseTerminal: vscode.window.onDidCloseTerminal,
|
||||
onDidWriteTerminalData: vscode.window.onDidWriteTerminalData
|
||||
onDidStartTerminalShellExecution: vscode.window.onDidStartTerminalShellExecution
|
||||
};
|
||||
|
||||
@@ -343,9 +343,9 @@ export function runInteractiveSshTerminalCommand(args: ITerminalCommandArgs): Pr
|
||||
}
|
||||
};
|
||||
|
||||
const handleTerminalOutput = async (dataWrite: vscode.TerminalDataWriteEvent): Promise<void> => {
|
||||
const handleTerminalOutput = async (data: string): Promise<void> => {
|
||||
if (loggingLevel > 0) {
|
||||
handleOutputLogging(dataWrite.data);
|
||||
handleOutputLogging(data);
|
||||
}
|
||||
|
||||
if (continueWithoutExiting) {
|
||||
@@ -353,7 +353,7 @@ export function runInteractiveSshTerminalCommand(args: ITerminalCommandArgs): Pr
|
||||
return;
|
||||
}
|
||||
|
||||
stdout += dataWrite.data;
|
||||
stdout += data;
|
||||
|
||||
if (interactors) {
|
||||
for (const interactor of interactors) {
|
||||
@@ -436,13 +436,14 @@ export function runInteractiveSshTerminalCommand(args: ITerminalCommandArgs): Pr
|
||||
hideFromUser: true
|
||||
};
|
||||
|
||||
let terminalDataHandlingQueue: Promise<void> = Promise.resolve();
|
||||
terminalListener = systemInteractor.onDidWriteTerminalData(async e => {
|
||||
terminalListener = systemInteractor.onDidStartTerminalShellExecution(async (e) => {
|
||||
if (e.terminal !== terminal) {
|
||||
return;
|
||||
}
|
||||
|
||||
terminalDataHandlingQueue = terminalDataHandlingQueue.finally(() => void handleTerminalOutput(e));
|
||||
for await (const data of e.execution.read()) {
|
||||
void handleTerminalOutput(data);
|
||||
}
|
||||
});
|
||||
terminal = systemInteractor.createTerminal(options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user