feat: enhance Gmail account handling and expand chat tool capabilities

- Updated the GmailAccount class to extract email from the connector name when formatted with " - ".
- Added new tool actions for Gmail and Google Calendar, including creating drafts, sending emails, and managing calendar events, improving integration and user functionality.
This commit is contained in:
Anish Sarkar 2026-03-20 20:18:03 +05:30
parent f938c4018e
commit bd2d633546
2 changed files with 10 additions and 1 deletions

View file

@ -29,7 +29,10 @@ class GmailAccount:
@classmethod
def from_connector(cls, connector: SearchSourceConnector) -> "GmailAccount":
return cls(id=connector.id, name=connector.name, email="")
email = ""
if connector.name and " - " in connector.name:
email = connector.name.split(" - ", 1)[1]
return cls(id=connector.id, name=connector.name, email=email)
def to_dict(self) -> dict:
return {"id": self.id, "name": self.name, "email": self.email}