Fixes#1248
handleAddTag had tags in its useCallback dependency array only so the
closure-level duplicate check could read it, which forced the callback
to re-create on every tag mutation and compared new additions against
a potentially-stale closure value.
Collapse the duplicate check into the functional setTags updater so
the check always runs against the latest state, and drop tags from
the dependency array - the callback is stable for the component's
lifetime and downstream memoization won't get invalidated on every
keystroke.
- 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.
- Added a DateTimePickerField component to allow users to select date and time in the HITL edit panel.
- Updated the EmailsTagField to use a ref for onChange to improve performance.
- Modified the ExtraField type to support "datetime-local" for better event management in Google Calendar tools.
- Updated the HITL edit panel to support multiple email inputs using a tag input component.
- Modified the ExtraField type to include "emails" as a valid type.
- Enhanced the Gmail draft creation process to utilize the new email input format for "To", "CC", and "BCC" fields.
- Introduced showCloseButton prop to control the visibility of the close button in the HITL edit panel.
- Updated the component to conditionally render the close button based on the new prop.
- Introduced HITL edit panel atom for managing state.
- Implemented HITL edit panel component for both desktop and mobile views.
- Updated right panel to include HITL edit tab and handle its visibility.
- Enhanced NewChatPage to incorporate the HITL edit panel for improved user interaction.