Upload folder using huggingface_hub
Browse files
6.4.0/chatbot/shared/ButtonPanel.svelte
CHANGED
|
@@ -50,13 +50,13 @@
|
|
| 50 |
<IconButton
|
| 51 |
label={i18n("chatbot.submit")}
|
| 52 |
Icon={Check}
|
| 53 |
-
|
| 54 |
disabled={generating}
|
| 55 |
/>
|
| 56 |
<IconButton
|
| 57 |
label={i18n("chatbot.cancel")}
|
| 58 |
Icon={Clear}
|
| 59 |
-
|
| 60 |
disabled={generating}
|
| 61 |
/>
|
| 62 |
{:else}
|
|
@@ -103,7 +103,7 @@
|
|
| 103 |
<IconButton
|
| 104 |
Icon={Retry}
|
| 105 |
label={i18n("chatbot.retry")}
|
| 106 |
-
|
| 107 |
disabled={generating}
|
| 108 |
/>
|
| 109 |
{/if}
|
|
@@ -111,7 +111,7 @@
|
|
| 111 |
<IconButton
|
| 112 |
label={i18n("chatbot.undo")}
|
| 113 |
Icon={Undo}
|
| 114 |
-
|
| 115 |
disabled={generating}
|
| 116 |
/>
|
| 117 |
{/if}
|
|
@@ -119,7 +119,7 @@
|
|
| 119 |
<IconButton
|
| 120 |
label={i18n("chatbot.edit")}
|
| 121 |
Icon={Edit}
|
| 122 |
-
|
| 123 |
disabled={generating}
|
| 124 |
/>
|
| 125 |
{/if}
|
|
|
|
| 50 |
<IconButton
|
| 51 |
label={i18n("chatbot.submit")}
|
| 52 |
Icon={Check}
|
| 53 |
+
onclick={() => handle_action("edit_submit")}
|
| 54 |
disabled={generating}
|
| 55 |
/>
|
| 56 |
<IconButton
|
| 57 |
label={i18n("chatbot.cancel")}
|
| 58 |
Icon={Clear}
|
| 59 |
+
onclick={() => handle_action("edit_cancel")}
|
| 60 |
disabled={generating}
|
| 61 |
/>
|
| 62 |
{:else}
|
|
|
|
| 103 |
<IconButton
|
| 104 |
Icon={Retry}
|
| 105 |
label={i18n("chatbot.retry")}
|
| 106 |
+
onclick={() => handle_action("retry")}
|
| 107 |
disabled={generating}
|
| 108 |
/>
|
| 109 |
{/if}
|
|
|
|
| 111 |
<IconButton
|
| 112 |
label={i18n("chatbot.undo")}
|
| 113 |
Icon={Undo}
|
| 114 |
+
onclick={() => handle_action("undo")}
|
| 115 |
disabled={generating}
|
| 116 |
/>
|
| 117 |
{/if}
|
|
|
|
| 119 |
<IconButton
|
| 120 |
label={i18n("chatbot.edit")}
|
| 121 |
Icon={Edit}
|
| 122 |
+
onclick={() => handle_action("edit")}
|
| 123 |
disabled={generating}
|
| 124 |
/>
|
| 125 |
{/if}
|
6.4.0/chatbot/shared/ChatBot.svelte
CHANGED
|
@@ -250,7 +250,7 @@
|
|
| 250 |
{#if show_share_button}
|
| 251 |
<IconButton
|
| 252 |
Icon={Community}
|
| 253 |
-
|
| 254 |
try {
|
| 255 |
// @ts-ignore
|
| 256 |
const formatted = await format_chat_for_sharing(value);
|
|
@@ -267,9 +267,9 @@
|
|
| 267 |
{/if}
|
| 268 |
<IconButton
|
| 269 |
Icon={Trash}
|
| 270 |
-
|
| 271 |
label={i18n("chatbot.clear")}
|
| 272 |
-
|
| 273 |
{#if show_copy_all_button}
|
| 274 |
<CopyAll {value} {watermark} />
|
| 275 |
{/if}
|
|
@@ -389,7 +389,7 @@
|
|
| 389 |
Icon={ScrollDownArrow}
|
| 390 |
label="Scroll down"
|
| 391 |
size="large"
|
| 392 |
-
|
| 393 |
/>
|
| 394 |
</div>
|
| 395 |
{/if}
|
|
|
|
| 250 |
{#if show_share_button}
|
| 251 |
<IconButton
|
| 252 |
Icon={Community}
|
| 253 |
+
onclick={async () => {
|
| 254 |
try {
|
| 255 |
// @ts-ignore
|
| 256 |
const formatted = await format_chat_for_sharing(value);
|
|
|
|
| 267 |
{/if}
|
| 268 |
<IconButton
|
| 269 |
Icon={Trash}
|
| 270 |
+
onclick={() => dispatch("clear")}
|
| 271 |
label={i18n("chatbot.clear")}
|
| 272 |
+
/>
|
| 273 |
{#if show_copy_all_button}
|
| 274 |
<CopyAll {value} {watermark} />
|
| 275 |
{/if}
|
|
|
|
| 389 |
Icon={ScrollDownArrow}
|
| 390 |
label="Scroll down"
|
| 391 |
size="large"
|
| 392 |
+
onclick={scroll_to_bottom}
|
| 393 |
/>
|
| 394 |
</div>
|
| 395 |
{/if}
|
6.4.0/chatbot/shared/Copy.svelte
CHANGED
|
@@ -58,7 +58,7 @@
|
|
| 58 |
</script>
|
| 59 |
|
| 60 |
<IconButton
|
| 61 |
-
|
| 62 |
label={copied ? i18n("chatbot.copied_message") : i18n("chatbot.copy_message")}
|
| 63 |
Icon={copied ? Check : Copy}
|
| 64 |
/>
|
|
|
|
| 58 |
</script>
|
| 59 |
|
| 60 |
<IconButton
|
| 61 |
+
onclick={handle_copy}
|
| 62 |
label={copied ? i18n("chatbot.copied_message") : i18n("chatbot.copy_message")}
|
| 63 |
Icon={copied ? Check : Copy}
|
| 64 |
/>
|
6.4.0/chatbot/shared/CopyAll.svelte
CHANGED
|
@@ -53,6 +53,6 @@
|
|
| 53 |
|
| 54 |
<IconButton
|
| 55 |
Icon={copied ? Check : Copy}
|
| 56 |
-
|
| 57 |
label={copied ? "Copied conversation" : "Copy conversation"}
|
| 58 |
-
|
|
|
|
| 53 |
|
| 54 |
<IconButton
|
| 55 |
Icon={copied ? Check : Copy}
|
| 56 |
+
onclick={handle_copy}
|
| 57 |
label={copied ? "Copied conversation" : "Copy conversation"}
|
| 58 |
+
/>
|
6.4.0/chatbot/shared/LikeDislike.svelte
CHANGED
|
@@ -30,7 +30,7 @@
|
|
| 30 |
color={selected === "Dislike"
|
| 31 |
? "var(--color-accent)"
|
| 32 |
: "var(--block-label-text-color)"}
|
| 33 |
-
|
| 34 |
/>
|
| 35 |
{/if}
|
| 36 |
{#if feedback_options.includes("Like")}
|
|
@@ -40,7 +40,7 @@
|
|
| 40 |
color={selected === "Like"
|
| 41 |
? "var(--color-accent)"
|
| 42 |
: "var(--block-label-text-color)"}
|
| 43 |
-
|
| 44 |
/>
|
| 45 |
{/if}
|
| 46 |
{/if}
|
|
|
|
| 30 |
color={selected === "Dislike"
|
| 31 |
? "var(--color-accent)"
|
| 32 |
: "var(--block-label-text-color)"}
|
| 33 |
+
onclick={() => toggleSelection("Dislike")}
|
| 34 |
/>
|
| 35 |
{/if}
|
| 36 |
{#if feedback_options.includes("Like")}
|
|
|
|
| 40 |
color={selected === "Like"
|
| 41 |
? "var(--color-accent)"
|
| 42 |
: "var(--block-label-text-color)"}
|
| 43 |
+
onclick={() => toggleSelection("Like")}
|
| 44 |
/>
|
| 45 |
{/if}
|
| 46 |
{/if}
|