Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes chat messages to use absolute timestamps #159

Merged
merged 4 commits into from May 18, 2023

Conversation

JasonWeill
Copy link
Collaborator

Fixes #87.

Instead of relative time (X minutes ago), displays messages using 12-hour or 24-hour time, based on the user's locale. Message timestamps are only computed once, not repeatedly every 5 seconds.

Screen Shot 2023-05-10 at 4 12 30 PM

Copy link
Collaborator

@andrii-i andrii-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change works well, times and formats are updated based on user's locale. Please see a small suggestion on how to improve ChatMessages logic below.

packages/jupyter-ai/src/components/chat-messages.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@andrii-i andrii-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@andrii-i
Copy link
Collaborator

Let's fix CI or understand why it is failing before merging

@JasonWeill
Copy link
Collaborator Author

Updated per @dlqqq's feedback

Copy link
Collaborator

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! 👍

@JasonWeill JasonWeill merged commit 3b6b1a0 into jupyterlab:main May 18, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/chatui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change chat message timestamps to 12-hour or 24-hour time
3 participants