microsoft / live-share-sdk

A framework for building collaborative Microsoft Teams and M365 experiences.
Other
95 stars 31 forks source link

[Feature Request]: Access optimized `getClientInfo()` API without using `LivePresence` #713

Closed ryanbliss closed 1 year ago

ryanbliss commented 1 year ago

Describe your user scenario

Our host decorators that include optimized caching for getClientInfo() is currently hidden inside of LiveShareClient. If a developer wants to lookup client info from an incoming signal, they currently have to use LivePresence, or misuse the teams-js LiveShareHost which does not include optimized caching. This makes it hard for developers to correlate actions with client information, such as the name of the user who emitted the signal.

Describe the solution you'd like

We should provide a more accessible, officially supported API to make this information more accessible to developers. Some ideas for where this could be exposed:

This design should be carefully considered, since right now we don't have a "hub" for session-level APIs. LiveShareRuntime is the closest thing we have, though that isn't publicly exposed.