mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-18 23:11:12 +02:00
feat: enhance Google Calendar event update functionality
- Introduced helper functions `_is_date_only` and `_build_time_body` to streamline the construction of event start and end times for all-day and timed events. - Refactored the `create_update_calendar_event_tool` to utilize the new helper functions, improving code readability and maintainability. - Updated the Google Calendar sync service to ensure proper handling of calendar IDs with a default fallback to "primary". - Modified the ApprovalCard component to simplify the construction of event update arguments, enhancing clarity and reducing redundancy.
This commit is contained in:
parent
c3d5c865fd
commit
bbd5ee8a19
4 changed files with 55 additions and 31 deletions
|
|
@ -209,8 +209,8 @@ class GoogleCalendarKBSyncService:
|
|||
)
|
||||
|
||||
calendar_id = (document.document_metadata or {}).get(
|
||||
"calendar_id", "primary"
|
||||
)
|
||||
"calendar_id"
|
||||
) or "primary"
|
||||
live_event = await loop.run_in_executor(
|
||||
None,
|
||||
lambda: (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue