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:
Anish Sarkar 2026-03-25 20:35:23 +05:30
parent c3d5c865fd
commit bbd5ee8a19
4 changed files with 55 additions and 31 deletions

View file

@ -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: (