From e16e41ea3cdd7a4b5174fb0c4800abcf508574cc Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:42:17 -0700 Subject: [PATCH] Add todos for shellIntegration API from API sync Part of #145234 --- .../vscode.proposed.terminalShellIntegration.d.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts index c2cb186395330..01eaef5220aba 100644 --- a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +++ b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts @@ -7,8 +7,10 @@ declare module 'vscode' { // https://github.com/microsoft/vscode/issues/145234 + // TODO: Add missing docs + // TODO: Review and polish up all docs export interface TerminalShellExecution { - // TODO: This is circular, is that fine? Should we add a `TerminalShellExecutionEvent`? + // TODO: Create a a `TerminalShellExecutionStartEvent` for future proofing and consistency with other events /** * The {@link Terminal} the command was executed in. */ @@ -25,7 +27,12 @@ declare module 'vscode' { * - It may contain line continuation characters and/or parts of the right prompt. * - It may be inaccurate if the shell integration does not support command line reporting. */ - // TODO@API undefined makes using this hard? + // TODO: Remove | undefined - this will be the empty string if the command start and end is the same position + // TODO: Implement command line fetching via buffer markers + // TODO: Quality/confidence 3x: + // - Top: shell integration reporting + // - Middle: Not multi-line, command start is not on the left-most column + // - Bottom: Multi-line or command start is on the left-most column readonly commandLine: string | undefined; /** @@ -50,6 +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; } @@ -68,7 +76,6 @@ declare module 'vscode' { } export interface TerminalShellIntegration { - // TODO: Should this share TerminalShellIntegrationChangeEvent or have it's own TerminalShellIntegrationCwdChangeEvent? /** * The current working directory of the terminal. This will be a {@link Uri} if the path * reported by the shell can reliably be mapped to the connected machine. @@ -186,6 +193,7 @@ declare module 'vscode' { /** * The exit code reported by the shell. */ + // TODO: Explain what undefined means readonly exitCode: number | undefined; }