{#if value !== null && value.length > 0} {#if show_share_button} { try { // @ts-ignore const formatted = await format_chat_for_sharing(value); dispatch("share", { description: formatted }); } catch (e) { console.error(e); let message = e instanceof ShareError ? e.message : "Share failed."; dispatch("error", message); } }} > {/if} dispatch("clear")} label={"Clear"} > {#if show_copy_all_button} {/if} {/if}