-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Add support for timestamp timezones for chat message #5961
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5961 +/- ##
==========================================
- Coverage 84.65% 82.58% -2.07%
==========================================
Files 291 291
Lines 43458 43479 +21
==========================================
- Hits 36788 35909 -879
- Misses 6670 7570 +900
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Does this implement the actual request to display the time in the browser timezone?
|
Indeed would be nice to automatically grab the timezone if |
Okay implemented zoneinfo + pn.state.browser_info.timezone |
Using Jupyter notebooks with VS Code causes it to error out when using the ChatInterface layout due to pn.state.browser_info not being available. import panel as pn
from panel.chat import ChatMessage, ChatInterface, ChatFeed
pn.extension() def guided_get_num(contents, user, instance):
if isinstance(contents, str):
num = len(contents)
instance.active = 1 # change to IntSlider tab
else:
num = contents
instance.active = 0 # Change to TextAreaInput tab
return f"Got {num}."
pn.chat.ChatInterface(
callback=guided_get_num,
widgets=[
pn.widgets.TextAreaInput(placeholder="Enter some text to get a count!"),
pn.widgets.IntSlider(name="Number Input", end=10)
],
) |
Thanks! Fix is in #6122 which I think can go into 1.3.7 release next week. |
Closes #5699