Allow 3p suggestion sources #17344
Labels
Area-Extensibility
A feature that would ideally be fulfilled by us having an extension model.
Issue-Scenario
Product-Terminal
The new Windows Terminal.
Milestone
from my whiteboard notes
Right now, Terminal supports a couple built-in suggestion sources.
What if we allowed even more? What if we wanted arbitrary apps to be able to generate suggestions? Possible use cases:
bash_history
How would we actually support this?
We could pretty easy use AppServiceConnections with apps that list themselves as Terminal extensions. Kinda like how we have apps that can say they're fragment extensions. We'd open an app service connection, pass them some state, then get a list of suggestions back. Yes, yes, ASC aren't great, but this kind of scenario is like, literally what they were made for.
We'd also need to make a couple changes to how the suggestions UI displays suggestions. Right now it's all done with actions, all at once. Then, we hand those actions over to the palette, and let it filter them. I've got a mind to do something else.
IAsyncAction<>
s? We hand those asyncs to the suggestions control, then await them. When they're done handing back their actions, we put them into the suggestions list.foo --param frob.txt
"Lastly, permissions.
Similar to what I wrote in https://github.com/microsoft/terminal/blob/dev/migrie/s/ai-providers/doc/specs/drafts/LLM/Terminal-AI-Extensions.md
and we (terminal) need to store which things the user allowed in a separate, secure location. If the user disables permissions to a particular piece of data, then we need to either give the extension null (to explicitly indicate that it was rejected) or garbage data (the "ron swanson" option, don't even let the extension know that the permission was rejected)
Overall, it's a lot of work, and needs a long spec.
xlinks:
Footnotes
RIP ↩
sure this is contrived, because you can just do https://github.com/microsoft/terminal/blob/dev/migrie/s/snippets/doc/specs/%231595%20-%20Suggestions%20UI/dump-workflows.py, but the point stands ↩
this was specifically called out in a mail thread "Windows Terminal extensions?" from 5/13/2024 ↩
The text was updated successfully, but these errors were encountered: