From f3b7aa650d0a79b160df018e89b6d54fb75cc987 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 9 Apr 2024 08:25:17 -0700 Subject: [PATCH 1/2] Rename shellIntegration API readData -> read Part of #145234 --- src/vs/workbench/api/common/extHostTerminalShellIntegration.ts | 2 +- src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts b/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts index f6ad67996129..2d5c88e971f2 100644 --- a/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts +++ b/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts @@ -238,7 +238,7 @@ class InternalTerminalShellExecution { get cwd(): URI | undefined { return that.cwd; }, - readData(): AsyncIterable { + read(): AsyncIterable { return that._createDataStream(); } }; diff --git a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts index dec8bd7370ba..0b9693bb4fd6 100644 --- a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +++ b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts @@ -57,8 +57,7 @@ declare module 'vscode' { * console.log(data); * } */ - // TODO: read? "data" typically means Uint8Array. What's the encoding of the string? Usage here will typically be checking for substrings - readData(): AsyncIterable; + read(): AsyncIterable; } export interface Terminal { From 4046b5f688c3f18b09b5667a01c61a38d188f549 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 9 Apr 2024 08:26:30 -0700 Subject: [PATCH 2/2] Update read docs --- src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts index ec3db0a9027c..7e58c746cad8 100644 --- a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +++ b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts @@ -35,7 +35,7 @@ declare module 'vscode' { * @example * // Log all data written to the terminal for a command * const command = term.shellIntegration.executeCommand({ commandLine: 'echo "Hello world"' }); - * const stream = command.readData(); + * const stream = command.read(); * for await (const data of stream) { * console.log(data); * }