mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
Fix retry
and undo
reactivity in gr.Chatbot (#9614)
* fix reactive params * add changeset * fix type check * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
f57b9850d4
commit
5d985509b4
7
.changeset/puny-lines-do.md
Normal file
7
.changeset/puny-lines-do.md
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
"@gradio/chatbot": minor
|
||||
"@gradio/dataframe": minor
|
||||
"gradio": minor
|
||||
---
|
||||
|
||||
feat:Fix `retry` and `undo` reactivity in gr.Chatbot
|
@ -17,7 +17,7 @@
|
||||
export let message: NormalisedMessage | NormalisedMessage[];
|
||||
export let position: "right" | "left";
|
||||
export let avatar: FileData | null;
|
||||
export let disable: boolean;
|
||||
export let generating: boolean;
|
||||
|
||||
export let handle_action: (selected: string | null) => void;
|
||||
export let layout: "bubble" | "panel";
|
||||
@ -69,14 +69,14 @@
|
||||
<IconButton
|
||||
Icon={Retry}
|
||||
on:click={() => handle_action("retry")}
|
||||
disabled={disable}
|
||||
disabled={generating}
|
||||
/>
|
||||
{/if}
|
||||
{#if show_undo}
|
||||
<IconButton
|
||||
Icon={Undo}
|
||||
on:click={() => handle_action("undo")}
|
||||
disabled={disable}
|
||||
disabled={generating}
|
||||
/>
|
||||
{/if}
|
||||
{#if likeable}
|
||||
|
@ -76,7 +76,7 @@
|
||||
likeable: boolean;
|
||||
show_retry: boolean;
|
||||
show_undo: boolean;
|
||||
disable: boolean;
|
||||
generating: boolean;
|
||||
show_copy_button: boolean;
|
||||
message: NormalisedMessage[] | NormalisedMessage;
|
||||
position: "left" | "right";
|
||||
@ -91,7 +91,7 @@
|
||||
likeable: show_like,
|
||||
show_retry,
|
||||
show_undo,
|
||||
disable: generating,
|
||||
generating,
|
||||
show_copy_button,
|
||||
message: msg_format === "tuples" ? messages[0] : messages,
|
||||
position: role === "user" ? "right" : "left",
|
||||
|
@ -991,7 +991,6 @@
|
||||
{i18n}
|
||||
x={active_cell_menu.x}
|
||||
y={active_cell_menu.y}
|
||||
col={active_cell_menu.col}
|
||||
row={active_cell_menu?.row ?? -1}
|
||||
on_add_row_above={() => add_row_at(active_cell_menu?.row ?? -1, "above")}
|
||||
on_add_row_below={() => add_row_at(active_cell_menu?.row ?? -1, "below")}
|
||||
@ -1005,7 +1004,6 @@
|
||||
{i18n}
|
||||
x={active_header_menu.x}
|
||||
y={active_header_menu.y}
|
||||
col={active_header_menu.col}
|
||||
row={-1}
|
||||
on_add_column_left={() => add_col_at(active_header_menu?.col ?? -1, "left")}
|
||||
on_add_column_right={() =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user