{$i18n.t("System Instructions")}
{#if !showSystem && system.trim()}
{system}
{/if}
{#if showSystem}
{:else}
{/if}
{ resizeSystemTextarea(); }} rows="4" />
{$i18n.t("Download")}
{ exportToJson(); }} >
{$i18n.t("Export chat (.json)")}
{ downloadTxt(); }} >
{$i18n.t("Plain text (.txt)")}
{ e.target.style.height = ""; e.target.style.height = Math.min(e.target.scrollHeight, 150) + "px"; }} on:focus={(e) => { e.target.style.height = ""; e.target.style.height = Math.min(e.target.scrollHeight, 150) + "px"; }} rows="2" />
{ role = role === "user" ? "assistant" : "user"; }} > {#if role === "user"} {$i18n.t("User")} {:else} {$i18n.t("Assistant")} {/if}
{#each $models as model}
{model.name}
{/each}
{ showControls = !showControls; }} >
{#if !loading}
{ addHandler(); role = role === "user" ? "assistant" : "user"; }} > {$i18n.t("Add")}
{ submitHandler(); }} > {$i18n.t("Run")}
{:else}
{ stopResponse(); }} > {$i18n.t("Cancel")}
{/if}