mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 17:26:23 +02:00
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:
parent
f938c4018e
commit
bd2d633546
2 changed files with 10 additions and 1 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue