{#if token.showModal} (token.showModal = false)} on:submit={handleTokenSubmit} /> {/if} system { for (const c of conversations.active) { c.update({ ...c.data, systemMessage: { ...c.data.systemMessage, content: e.currentTarget.value } }); } }} class="absolute inset-x-0 bottom-0 h-full resize-none bg-transparent px-3 pt-10 text-sm outline-hidden" > {#each conversations.active as conversation, conversationIdx (conversation)} {#if compareActive} conversations.delete(conversation.data)} /> {/if} (viewCode = false)} /> {/each} {#if !compareActive} (viewSettings = !viewSettings)} class="flex h-[39px] items-center gap-1 rounded-lg border border-gray-200 bg-white px-3 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 focus:outline-hidden md:hidden dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700" > {!viewSettings ? "Settings" : "Hide"} {/if} {#snippet trigger(tooltip)} {/snippet} Clear conversation {#each iterate(conversations.generationStats) as [{ latency, tokens }, isLast]} {@const baLeft = observed["bottom-actions"].rect.left} {@const tceRight = observed["token-count-end"].offset.right} {tokens} tokens · Latency {latency}ms {/each} (viewCode = !viewCode)} class="btn" {@attach observe({ name: ObservedElements.BottomActions, useRaf: true })} > {!viewCode ? "View Code" : "Hide Code"} { viewCode = false; conversations.genOrStop(); }} type="button" class={[ "flex h-[39px] items-center justify-center gap-2 rounded-l-lg px-3.5 py-2.5 text-sm font-medium text-white focus:ring-4 focus:ring-gray-300 focus:outline-hidden dark:focus:ring-gray-700", multiple ? "rounded-l-lg" : "rounded-lg", loading && "bg-red-900 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700", !loading && "bg-black hover:bg-gray-900 dark:bg-blue-600 dark:hover:bg-blue-700", ]} > {#if loading} {#if conversations.active.some(c => c.data.streaming)} Stop {:else} Cancel {/if} {#each { length: 3 } as _, i} {/each} {:else} {multiple ? "Run all" : "Run"} {cmdOrCtrl}↵ {/if} {#if multiple} {#snippet children(popover)} { viewCode = false; conversations.genOrStop("left"); popover.open = false; }} > Only run left conversation {cmdOrCtrl} {optOrAlt} L { viewCode = false; conversations.genOrStop("right"); popover.open = false; }} > Only run right conversation {cmdOrCtrl} {optOrAlt} R {/snippet} {/if} {#if !compareActive} (selectCompareModelOpen = true)} > Compare {#if isHFModel(conversations.active[0]?.model)} Model page {/if} projects.current && showShareModal(projects.current)} class="flex items-center gap-1 text-sm text-gray-500 underline decoration-gray-300 hover:text-gray-800 dark:text-gray-400 dark:decoration-gray-600 dark:hover:text-gray-200" > Share Metrics {#if token.value} Reset token {/if} API Quota Free 76% {/if} View Docs · Give feedback {#if selectCompareModelOpen} { const data = { ...conversations.active[0]?.data, projectId: projects.activeId, modelId: m, }; delete data.id; conversations.create(data); }} onClose={() => (selectCompareModelOpen = false)} /> {/if}