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

server : (web UI) add copy button for code block, fix api key #10242

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented Nov 9, 2024

Added Copy button for code blocks:

image

It also follow the window as user scroll up (position sticky):

image

This PR also fixes a problem with API key set, as reported via this comment: #10175 (comment)

image

Copy link
Owner

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

There is a subtle bug with the scrolling:

  • Scroll to the bottom of the generated session (or to the top)
  • Using a mouse with scroll wheel, first start scrolling down and then up - nothing happens
  • If you first scroll up and the down - it works

Edit: please ignore - everything is OK

@ngxson
Copy link
Collaborator Author

ngxson commented Nov 11, 2024

@ggerganov I'm not sure if I understand it correctly, but I suspect that it may have something to do with the "show-on-hover" that I have on the button.

I removed that in the last commit, so the copy button now always show on code snippet (no need to hover). Please let me know if that fixes the issue. Thanks.

@ggerganov
Copy link
Owner

Ah, apologies for the distraction - this seems to be a browser behaviour that somehow I haven't noticed before. All scrolls on other pages also work like that, so it's not specific to this UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants