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 terminal location API #131028

Merged
merged 29 commits into from
Aug 20, 2021
Merged

Add terminal location API #131028

merged 29 commits into from
Aug 20, 2021

Conversation

meganrogge
Copy link
Contributor

This PR fixes #45407

@meganrogge meganrogge self-assigned this Aug 17, 2021
@meganrogge meganrogge added this to the August 2021 milestone Aug 17, 2021
@meganrogge meganrogge requested a review from Tyriar August 17, 2021 19:11
@Tyriar Tyriar changed the title Add split terminal API Add terminal location API Aug 17, 2021
src/vs/workbench/api/browser/mainThreadTerminalService.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/browser/mainThreadTerminalService.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/common/extHostTerminalService.ts Outdated Show resolved Hide resolved
src/vs/workbench/contrib/terminal/browser/terminal.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/node/extHostTerminalService.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/browser/mainThreadTerminalService.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/browser/mainThreadTerminalService.ts Outdated Show resolved Hide resolved
src/vs/workbench/api/browser/mainThreadTerminalService.ts Outdated Show resolved Hide resolved
@@ -639,11 +651,27 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
if (!profile || !('options' in profile)) {
throw new Error(`No terminal profile options provided for id "${id}"`);
}

const internalOptions: ITerminalInternalOptions = this._resolveParentTerminal(options);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we convert to/from ExtHostTerminalIdentifier whenever we go between mainThread and extHost, can we avoid this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no because this is the very way we are able to pass between them. perhaps I'm not understanding

Comment on lines 51 to 55
export interface ITerminalInternalOptions {
isFeatureTerminal?: boolean;
useShellEnvironment?: boolean;
isSplitTerminal?: boolean;
target?: TerminalLocation;
resolvedExtHostTerminal?: ExtHostTerminal;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to move location to the actual options instead of internal options?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not possible because the types of location differ between MainThread and extHostTerminalService, but they share the TerminalLaunchConfig interface

@meganrogge meganrogge merged commit d3db2d1 into main Aug 20, 2021
@meganrogge meganrogge deleted the merogge/split-api branch August 20, 2021 02:08
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an API for specifying terminal location
2 participants