8000 Don't pop ChatInterface variables by hoxbro · Pull Request #6290 · holoviz/panel · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@hoxbro
Copy link
Member
@hoxbro hoxbro commented Jan 31, 2024

Without these changes, ChatInterface will not use the new username.

import panel as pn
pn.extension()

pn.chat.ChatInterface(callback=lambda _0, user, _2: user, user="NEW USERNAME")

image

@codecov
Copy link
codecov bot commented Jan 31, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (811ccd1) 40.72% compared to head (ad3c846) 84.19%.
Report is 3 commits behind head on main.

Files Patch % Lines
panel/chat/interface.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6290       +/-   ##
===========================================
+ Coverage   40.72%   84.19%   +43.47%     
===========================================
  Files         301      301               
  Lines       45219    45247       +28     
===========================================
+ Hits        18414    38095    +19681     
+ Misses      26805     7152    -19653     
Flag Coverage Δ
ui-tests 40.71% <18.75%> (-0.01%) ⬇️
unitexamples-tests 71.84% <93.75%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

8000

@hoxbro hoxbro marked this pull request as ready for review January 31, 2024 16:15
Copy link
Member
@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

@ahuang11 please review.

Copy link
Contributor
@ahuang11 ahuang11 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!

Co-authored-by: Andrew <15331990+ahuang11@users.noreply.github.com>
@hoxbro
Copy link
Member Author
hoxbro commented Jan 31, 2024

Looking at the failing test and a bit at the code. I think there are some possibilities:

  1. We promote the parameters user and avatar from Interface to Feed.
  2. Inherit send and stream (I think) in Interface and check if they are not set as a keyword argument, set them to the parameter if they haven't been set, and then call super.
  3. Update the if statement so we both have them as parameters and in the message kwargs.
  4. Maybe another way forward.

I think I like 2 the most.

@ahuang11
Copy link
Contributor

I like 2 too.

@hoxbro hoxbro force-pushed the chatinterface_user branch from 7b31ba5 to ad3c846 Compare January 31, 2024 20:17
@hoxbro hoxbro merged commit 355a38b into main Feb 1, 2024
@hoxbro hoxbro deleted the chatinterface_user branch February 1, 2024 08:00
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0