EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

feat: New Timestamp component on the Chat Input Toolbar and Support for Displaying it

Open dhairyashiil opened this issue 10 months ago • 2 comments

As an EmbeddedChat developer: We want to allow timestamps to be displayed in different formats within the chat content. This will give users the ability to see dates and times in various styles, such as relative time (e.g., "5 minutes ago") or full date/time formats. also Add 1 new Timestamp component in the Chat Input Toolbar which will help users to create these timestamps in certain format.

I need to: Integrate a chat input component for timestamp along with feature that renders timestamps with different formats (e.g., relative time, specific date/time formats)

So That: Users can create timestamps om chat input box and see timestamps displayed in the appropriate format depending on the context (e.g., "5 minutes ago" for recent timestamps or a full date and time like "February 14, 2025, 3:00 PM GMT+02:00" for older ones).

Acceptance Criteria

  • [ ] Add support for rendering timestamps in various formats like relative time ("5 minutes ago") or full date and time.
  • [ ] The timestamp format should be flexible, supporting options like short time, full date, and long-form date with time.
  • [ ] Ensure that the TimestampElement correctly handles and displays the timestamp based on the provided format in the content data.
  • [ ] Create a new chat input component that will create these timestamps in the required format

Refer RC: (RC doesn't have a component to add timestamps in the chat input yet but it supports displaying of timestamps)

Image

dhairyashiil avatar Feb 13 '25 22:02 dhairyashiil

Hello, I'm working on this issue, attached a PR as well. Currently, it is in DRAFT state but I will complete it soon. Thanks!

dhairyashiil avatar Feb 13 '25 23:02 dhairyashiil

Completed the functionality.

dhairyashiil avatar Feb 14 '25 15:02 dhairyashiil