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 support for terminal handoff #716

Closed
wants to merge 1 commit into from
Closed

Conversation

ysc3839
Copy link

@ysc3839 ysc3839 commented Sep 19, 2024

TODO:

Issues?
Looks like COM requires a proxy dll to do marshaling. In Windows Terminal this dll is OpenConsoleProxy.dll. We have to ship the proxy dll with this project.

ref: microsoft/terminal#7414, microsoft/terminal#9462

@Tyriar
Copy link
Member

Tyriar commented Sep 19, 2024

It might be convenient to put this here but I think it's is out of scope for node-pty. I also don't really want to merge and accept ownership over something we don't use and therefore cannot properly maintain.

@ysc3839
Copy link
Author

ysc3839 commented Sep 19, 2024

node-pty does not support passing a HPCON and get an ITerminal in js.
So in order to make terminal handoff works, I still have to modify node-pty to add such interface.
And terminal handoff requires OpenConsole.exe and conpty.dll, which are both available in node-pty package.
So I think the best solution is to add terminal handoff support in node-pty.

something we don't use

I think third-party electron-based terminals do need such feature. They are waiting for Microsoft to provide docs, libs and examples.

cannot properly maintain

Both Windows Terminal and node-pty are Microsoft's project. I don't think it's hard to maintain.

@Tyriar
Copy link
Member

Tyriar commented Sep 20, 2024

Both Windows Terminal and node-pty are Microsoft's project. I don't think it's hard to maintain.

I maintain this, another team in another department maintains microsoft/terminal. It's not a question of whether someone at Microsoft could maintain it effectively, it's a question of whether I can. I only say this because I've run into exactly this problem before where we merged things we didn't use/understand into xterm.js and they eventually degraded and broke and caused problems when trying to make changes down the road.

node-pty does not support passing a HPCON and get an ITerminal in js.
So in order to make terminal handoff works, I still have to modify node-pty to add such interface.
And terminal handoff requires OpenConsole.exe and conpty.dll, which are both available in node-pty package.

If we need to expose some more things in the API to achieve this we can do that. Then we have a simple contract that we just need to make sure works across releases.

I think third-party electron-based terminals do need such feature. They are waiting for Microsoft to provide docs, libs and examples.

Maybe some day (after microsoft/vscode#34442), but in its current state we wouldn't want to have VS Code as a possible default.

@ysc3839
Copy link
Author

ysc3839 commented Sep 20, 2024

Thank you. I will make this a standalone project. And I will modify this PR to include only API to construct ITerminal from in/out pipes.

@Tyriar Tyriar closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants