-
Notifications
You must be signed in to change notification settings - Fork 481
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
Gen AI: format markdown, bot icon to top of message #58449
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.
🎉 🎉
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.
Nice!
@@ -43,6 +44,7 @@ | |||
.assistantMessage { | |||
background-color: $light_gray_50; | |||
border-radius: 0 16px 16px 16px; | |||
margin-top: 14px; // a quarter of height of bot icon |
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.
Nit: icon seems a bit high when bot responses are single line.
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.
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.
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.
@fisher-alice want to give this another spin and see what you think? i think the main culprit of things being spaced out is a wide margin-bottom we had on bot and user messages, which I tightened up.
I also noticed that long single lines of code in an ordered list were overflowing the container (and were unscrollable), so I allowed scroll in the x direction for assistant messages. I cannot for the life of me get the bot to return it any more, but can simulate by modifying the dom directly:
Something like this in a response should repro the issue -- I don't see any other issues with content scrolling rather than just flowing onto the next line as I introduced overflow-x: scroll
, but not totally sure):
<ol><li><code class="language-python">def add_numbers(num1, num2):
sum = num1 + num2
return sum
</code></li></ol>
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.
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 think the main culprit of things being spaced out is a wide margin-bottom we had on bot and user messages, which I tightened up.
LGTM!
Two unrelated changes to the chat experience in gen AI:
Links
Testing story
Tested manually in responses containing markdown, responses containing normal text, and errored responses.