Skip to content

Commit

Permalink
Small tweak to how thoughts are shown in gr.Chatbot (#9359)
Browse files Browse the repository at this point in the history
* thiknk chat

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
abidlabs and gradio-pr-bot authored Sep 16, 2024
1 parent d47dd1f commit 50c3a7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/breezy-olives-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/chatbot": minor
"gradio": minor
---

feat:Small tweak to how thoughts are shown in `gr.Chatbot`
5 changes: 4 additions & 1 deletion js/chatbot/shared/ChatBot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@
>
{#if message.type === "text"}
{#if message.metadata.title}
<MessageBox title={message.metadata.title}>
<MessageBox
title={message.metadata.title}
expanded={is_last_bot_message(messages, value)}
>
<Markdown
message={message.content}
{latex_delimiters}
Expand Down
2 changes: 1 addition & 1 deletion js/chatbot/shared/MessageBox.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
let expanded = false;
export let expanded = false;
export let title: string;
function toggleExpanded(): void {
Expand Down

0 comments on commit 50c3a7f

Please sign in to comment.