Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add todos for shellIntegration API from API sync #209548

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading