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

Add chat area input and integrate #6379

Merged
merged 14 commits into from
Mar 2, 2024
Merged

Add chat area input and integrate #6379

merged 14 commits into from
Mar 2, 2024

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Feb 23, 2024

Closes #6284
Upon clicking shift enter, triggers value. (Actually I should probably remove the shift to be consistent with ChatGPT).

Something seems fishy about handling both value_input & value. Need to double check logic it doesn't trigger something twice, but other than that pretty exciting!

Screen.Recording.2024-02-22.at.10.36.28.PM.mov
  • ensure text area is focused first
  • docs
  • tests

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.

My immediate feeling here is that we should reserve ChatAreaInput until we have a more complete and polished component with an inline send button rather than adding it simply for shift-Enter support. Also I don't think we should reset value/value_input on the Python side, I'd rather create a ChatMessageEvent that contains the value of the message and syncs the value with the value parameter on submit, while JS resets value and value_input.

doraaki and others added 6 commits February 23, 2024 11:40
Conda wasn't finding bokeh==3.4.0.dev8 which is in the dependency reqiurements. For me needs this other channel.
Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.2 to 42.0.4.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@42.0.2...42.0.4)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@ahuang11
Copy link
Contributor Author

Discussed with Philipp; we agreed that we can enhance ChatAreaInput over time since drop files is supported in text area (I think)
https://stackoverflow.com/questions/62093212/is-possible-drag-drop-files-into-standard-html-textarea

panel/chat/__init__.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 91.86047% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 83.66%. Comparing base (39379c8) to head (c97300e).
Report is 12 commits behind head on main.

Files Patch % Lines
panel/chat/input.py 81.48% 5 Missing ⚠️
panel/models/chatarea_input.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6379      +/-   ##
==========================================
+ Coverage   83.63%   83.66%   +0.03%     
==========================================
  Files         305      309       +4     
  Lines       45594    45745     +151     
==========================================
+ Hits        38132    38274     +142     
- Misses       7462     7471       +9     
Flag Coverage Δ
ui-tests 39.68% <74.41%> (+0.01%) ⬆️
unitexamples-tests 71.62% <54.65%> (+<0.01%) ⬆️

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.

@philippjfr philippjfr merged commit d99099f into main Mar 2, 2024
15 checks passed
@philippjfr philippjfr deleted the add_chatarea_input branch March 2, 2024 22:47
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.

TextAreaInput. Make it possible to "commit" with ENTER and "add newline" with SHIFT+ENTER
4 participants