Skip to content

Commit

Permalink
Add todos for shellIntegration API from API sync
Browse files Browse the repository at this point in the history
Part of #145234
  • Loading branch information
Tyriar committed Apr 4, 2024
1 parent 5c00163 commit e16e41e
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 e16e41e

Please sign in to comment.