mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +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}
|
||||
|
|
|
|||
|
|
@ -873,6 +873,12 @@ async def _stream_agent_events(
|
|||
"delete_linear_issue",
|
||||
"create_google_drive_file",
|
||||
"delete_google_drive_file",
|
||||
"create_gmail_draft",
|
||||
"send_gmail_email",
|
||||
"trash_gmail_email",
|
||||
"create_google_calendar_event",
|
||||
"update_google_calendar_event",
|
||||
"delete_google_calendar_event",
|
||||
):
|
||||
yield streaming_service.format_tool_output_available(
|
||||
tool_call_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue