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
9 stars 11 forks source link

Expose cooperation data to plugins #67

Closed sparrowhe closed 1 month ago

sparrowhe commented 1 month 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 1 month ago

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

zxq142857 commented 1 month 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 1 month 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 1 month 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 1 month 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