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

Prevent TextAreaInput from auto sending messages in ChatInterface unless specified #5762

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Oct 27, 2023

I don't think TextAreaInput should auto send by default because users need to usually gather info from other browser tabs.

At the moment, if the user copies text from another browser tab, it sends the existing, unfinished message which can be irritating.

The prior logic uses isinstance() which makes TextAreaInput always auto send since TextAreaInput is a subclass of TextInput

A workaround is to have auto_send_types set to some arbitrary value.

@ahuang11 ahuang11 changed the title Fix auto_send_types in ChatInterface Remove TextAreaInput from auto sending messages in ChatInterface Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #5762 (db0c85a) into main (0aa4b18) will decrease coverage by 8.80%.
Report is 13 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5762      +/-   ##
==========================================
- Coverage   82.47%   73.68%   -8.80%     
==========================================
  Files         288      289       +1     
  Lines       42072    42122      +50     
==========================================
- Hits        34700    31038    -3662     
- Misses       7372    11084    +3712     
Flag Coverage Δ
ui-tests ?
unitexamples-tests 73.68% <100.00%> (-0.07%) ⬇️

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

Files Coverage Δ
panel/chat/interface.py 95.48% <100.00%> (ø)
panel/tests/chat/test_interface.py 100.00% <100.00%> (ø)

... and 72 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ahuang11 ahuang11 changed the title Remove TextAreaInput from auto sending messages in ChatInterface Prevent TextAreaInput from auto sending messages in ChatInterface unless specified Oct 27, 2023
@philippjfr philippjfr merged commit cf28514 into main Oct 30, 2023
9 of 13 checks passed
@philippjfr philippjfr deleted the fix_auto_send branch October 30, 2023 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants