Gandi-IDE / gandi-plugins

Gandi Plugins is a component library containing a suite of feature-enhancing plugins for Gandi-IDE.
GNU Lesser General Public License v3.0
10 stars 12 forks source link

Expose cooperation data to plugins #67

Closed sparrowhe closed 4 months ago

sparrowhe commented 4 months ago

Background

The backend team is planning to implement a "Voice Cooperation" function in the Gandi IDE as a plugin. This function will allow users to chat with their team within the Gandi IDE.

Requirements

An API Interface to access cooperation informations, including:

For more details, contact me or make a comment below.

Best Regards.

fath11 commented 4 months ago

oh shit we've unlocked Gandi IDE's Backend team characters pack 😱😱😱

zxq142857 commented 4 months ago

I'm planning to add a teamworkManager object to PluginContext. Here's its type definition. Let me know if there's anything else you need

zxq142857 commented 4 months ago

You can get the latest onlineUsers like this:

  function onOnlineUsersUpdate (onlineUsers) {
      console.log('onlineUsers', onlineUsers);
  }
  // Subscribe
  teamworkManager.on('online_users_update',  onOnlineUsersUpdate);
  // Unsubscribe
  teamworkManager.off('online_users_update',  onOnlineUsersUpdate);
sparrowhe commented 4 months ago

I'm planning to add a teamworkManager object to PluginContext. Here's its type definition. Let me know if there's anything else you need

Can I get if a project is a teamwork project or not? I would like to add some logic to let users know they can only use voice cooperation function when they under a teamwork and login as a user.

zxq142857 commented 4 months ago

I'm planning to add a teamworkManager object to PluginContext. Here's its type definition. Let me know if there's anything else you need

Can I get if a project is a teamwork project or not? I would like to add some logic to let users know they can only use voice cooperation function when they under a teamwork and login as a user.

teamworkManager is only available in collaboration mode; otherwise, it will be null. Users must be logged in to enter collaboration mode