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 a "Copy to Clipboard" button in st.chat() elements #6921

Open
CharlyWargnier opened this issue Jun 29, 2023 · 5 comments
Open

Add a "Copy to Clipboard" button in st.chat() elements #6921

CharlyWargnier opened this issue Jun 29, 2023 · 5 comments
Labels
feature:st.chat_message feature:st.markdown type:enhancement Requests for feature enhancements or new features

Comments

@CharlyWargnier
Copy link
Collaborator

Feature suggestion:

Could we add a "Copy to Clipboard" button in st.chat() elements for easily copying content, like in the ChatGPT UI?

ssstwitter.com_1688032446603.1.mp4
@CharlyWargnier CharlyWargnier added the type:enhancement Requests for feature enhancements or new features label Jun 29, 2023
@CharlyWargnier CharlyWargnier changed the title Copy to Clipboard" button in st.chat() elements Add a "Copy to Clipboard" button in st.chat() elements Jun 29, 2023
@ekelund
Copy link

ekelund commented Jul 7, 2023

That would be great!

@TomTom101
Copy link

While at it, please offer this feature optionally to all fields!

@CristiOlariu
Copy link

CristiOlariu commented Aug 30, 2023

Realized that if one would put:

st.write(f"```\n{some_text}")

it would render it in a container that has that "copy to clipboard" on hover already.

The only downside is that it's not rendered nicely as the text will be on a single line ...

When this is implemented, would the thumbs up/down be implemented too?

@carolinedlu
Copy link
Collaborator

@cjayb
Copy link

cjayb commented Dec 14, 2023

As mentioned in #6726, it would be really nice to know how we might go about helping implement this feature? Any updates @carolinedlu (or others)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.chat_message feature:st.markdown type:enhancement Requests for feature enhancements or new features
Projects
None yet
Development

No branches or pull requests

7 participants