Skip to content

Commit

Permalink
Merge pull request #209548 from microsoft/tyriar/api_todos
Browse files Browse the repository at this point in the history
Add todos for shellIntegration API from API sync
  • Loading branch information
Tyriar authored Apr 4, 2024
2 parents 8cf1fbe + e16e41e commit cb6942b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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;

/**
Expand All @@ -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<string>;
}

Expand All @@ -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.
Expand Down Expand Up @@ -186,6 +193,7 @@ declare module 'vscode' {
/**
* The exit code reported by the shell.
*/
// TODO: Explain what undefined means
readonly exitCode: number | undefined;
}

Expand Down

0 comments on commit cb6942b

Please sign in to comment.