-
Notifications
You must be signed in to change notification settings - Fork 115
feat(Chat): Add input suggestion links #1845
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the approach in this PR as a light-weight and simple way to get suggestions into the chat. That said, I think we absolutely need inline suggestions to be accessible.
I would like to see us offer chat suggestions as buttons separate from the chat and closer to the chat input. That said, I think we could start with the approach in this PR and add separate chat suggestion buttons (and I'd be interested in working on that).
|
Hmmmm, I really like both of your ideas for the css. I started with a version of @gadenbuie's button idea, but then realized the suggestion might be wrapped text, which is a bummer for buttons. What if it was more of a background color button than an outline button? (Kind of a modified version of With wrapping text in mind, the underline makes a lot of sense to me. Maybe make it link text, with a dotted border-bottom... But then solid on hover: |
Totally agree. I'll have a look and see if it's worth adding before we merge. I also like the dotted underline look. The emoji/icon idea is cool, and looks awesome in the right context, but I also feel like it could get busy/redundant fairly quickly (e.g., in a bulleted list of suggestions) |
|
8bf4a6c to
50112ce
Compare
I really like that direction. I should say I like the AI sparkles as well... But something like the carriage return icon feels like a step closer to what we want this link to communicate. Piggybacking on what @gadenbuie mentioned earlier, about how this kind of inline suggestion isn't settled science.... I could see the world heading this direction OR heading in a direction of "text in buttons" below a paragraph... Prompting someone to click the one they prefer. |
@gregswinehart That's pretty close to what I had in mind, but I was thinking of smaller buttons that wouldn't try to to include a full sentence. I do like the idea of having explicit buttons, but because the inline suggestions are created (in general) from the markdown that's written directly by the LLM, we don't have much control over what part of the text it will decide to put inside the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 😉
|
Do we like overlapping squares over stars (c7625bc)?
|
js/chat/chat.scss
Outdated
|
|
||
| &::after { | ||
| content: "\2726"; // diamond/star | ||
| content: "\29C9"; // two overlapping squares |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like diamond/star. I think general chat-bot UI community has unified around ❇️ or ✨ as a universal signal that you'll be interacting with an AI. It's literally everywhere, in fact I just noticed that Google just added Gemini into my email (not that I totally want that) and is using the diamond star image all over the place.










This PR adds the ability to have input suggestion links inside of
Chat()messages. This can be done in 2 main ways:Add a
.suggestionCSS class to an HTML element (e.g.,<span class="suggestion">A suggestion</span>).Add a
data-suggestionattribute to an HTML element, which is helpful if:<span data-suggestion='The actual suggestion'>A suggestion</span>).<img data-suggestion='A suggestion' src='...' />In addition, add a
.submitCSS class (or adata-suggestion-submitattribute) to have the suggestion automatically submitted. Alternatively, the user can holdCmd/Ctrlto submit any suggestion orOpt/Altto prevent submission.Here's a minimal example:
chat-input-suggestions.mp4
This PR also adds
submitandfocusarguments to.update_user_input().Follow up