microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.64k stars 8.18k forks source link

Scenario: Add support for 3rd-party extensions #4000

Open zadjii-msft opened 4 years ago

zadjii-msft commented 4 years ago

Updated thread from #555

Now that we have a better understanding of what work will be needed to support 3rd party extensions ("plugins"), this thread is the megathread to track all the work that's needed to support them.

Before any real work can begin here, we're waiting on some support from the Windows operating system that will be coming SoonTM. Fundamentally, third-party code extensions for packaged applications (like us) isn't supported currently.

This is not work slated for 1.0. It may not even land in 2.0. This work will likely span multiple releases. Whenever this work does end up starting formally, we'll likely have a number of minor versions with prototypes of the extensibility model, with breaking changes up until the major version release of the Terminal. So if extensions are scheduled for 3.0, then 2.4 might introduce bts of the extensibility model that are later broken in 2.5, 2.6, etc.

What should extensions be able to do?

Work needed to support extensions

Some of this work is more directly related to extensions, while others on the list are simply adding features to the terminal to provide points for extensibility in the future.

Mega-list of extension ideas

Dynamic Profiles / settings

Additional Connection types

Buffer Parsing/Manipulation

Suggestions

UI Elements

App elements

Control Elements

Other Elements

Custom Rendering

Advanced Settings

Miscellaneous


@ future me, 10/14/2021

I tried this in dev/migrie/fhl/adaptive-card-extension, but ran into a number of unfixable build issues that made me hate the world. I couldn't get another package built to be able to load that into the terminal at all. Maybe next month I'll try again. For now, it's on to honks.

WSLUser commented 4 years ago

You should add https://github.com/microsoft/terminal/pull/3468 that needs to be brought into an extension instead of living in the main code base.

ntindle commented 3 years ago

I would also appreciate being able to install these plugins from something like winget

gbritton1 commented 2 years ago

Why on earth would you need support from the WIndows team? That doesn't apply to VS code, e.g. in any environment. Can't we just do it the same way?

DHowett commented 2 years ago

@gbritton1 Terminal is (for better or for worse) deployed as a "MSIX" package using the new Windows packaging/installer infrastructure; VSCode is not. That infrastructure is missing some features that would allow for:

Had we chosen to install using MSI, traditionally, into C:\Program Files... yeah, we wouldn't need anything else from the package subsystem. We'd also lose(1) support for easy, atomic updates for the entire Terminal. 🀷🏻

We've since learned that there's a way forward where we don't need in-process extensions, but we do want to make sure that it will perform adequately for things that impact the rendering engine or the text buffer.

(1): "Lose" insofar as it is easy. We could always write a bunch of code to support it, but on the balance we decided to invest most of our effort in making the Terminal and Console Host itself better. :)

gbritton1 commented 2 years ago

Would it be simpler to change the packaging?

ntindle commented 2 years ago

I'm glad you put this out there. I honestly had the same opinion on why it required updates on the windows side. Thanks for clarifying that.

zadjii-msft commented 1 year ago

Notes comment:

See https://github.com/microsoft/terminal/tree/dev/migrie/fhl/dyndep.

https://github.com/microsoft/WindowsAppSDK/issues/66

Todo


Notes circa May 2023 Hackathon


Now, the questions are:

jonwis commented 1 year ago

@zadjii-msft before you merge this we should chat. See my comment here - https://github.com/microsoft/WindowsAppSDK/issues/66#issuecomment-1547015667

zadjii-msft commented 1 year ago

@jonwis haha don't worry - that was firmly FHL code, not real shipping code. I use FHL to push the boundaries of what the platform will let me do. But I'm absolutely going to make sure there's proper boundaries set up here before doing anything like this in real Terminal code πŸ˜†

jonwis commented 1 year ago

(Also, don't get me wrong - I love it when we figure out the power latent in the platform. We've done sooo much here over the years that compiles together well but we don't have enough time or hands to document all the possible combinations. :) )