{#if showTokenModal} (showTokenModal = false)} on:submit={handleTokenSubmit} /> {/if} system { for (const conversation of session.conversations) { conversation.systemMessage.content = e.currentTarget.value; } session = session; }} class="absolute inset-x-0 bottom-0 h-full resize-none bg-transparent px-3 pt-10 text-sm outline-none" > {#each session.conversations as conversation, conversationIdx} {#if compareActive} removeCompareModal(conversationIdx)} /> {/if} addMessage(conversationIdx)} on:deleteMessage={e => deleteMessage(conversationIdx, e.detail)} on:closeCode={() => (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:outline-none focus:ring-4 focus:ring-gray-100 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 Settings"} {/if} {#each generationStats as { latency, generatedTokensCount }} {generatedTokensCount} tokens · Latency {latency}ms {/each} (viewCode = !viewCode)} class="flex h-[39px] items-center gap-2 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:outline-none focus:ring-4 focus:ring-gray-100 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" > {!viewCode ? "View Code" : "Hide Code"} { viewCode = false; loading ? abort() : submit(); }} type="button" class="flex h-[39px] w-24 items-center justify-center gap-2 rounded-lg px-5 py-2.5 text-sm font-medium text-white focus:outline-none focus:ring-4 focus:ring-gray-300 dark:border-gray-700 dark:focus:ring-gray-700 {loading ? 'bg-red-900 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700' : 'bg-black hover:bg-gray-900 dark:bg-blue-600 dark:hover:bg-blue-700'}" > {#if loading} {#if session.conversations[0].streaming || session.conversations[1]?.streaming} Stop {:else} Cancel {/if} {:else} Run ⌘↵ {/if} {#if !compareActive} (selectCompareModelOpen = true)} > Compare Model page {#if hfToken} Reset token {/if} API Quota Free 76% {/if} View Docs · Give feedback {#if selectCompareModelOpen} addCompareModel(e.detail)} on:close={() => (selectCompareModelOpen = false)} /> {/if}