{#if showFullMessages}
{}} continueResponse={() => {}} regenerateResponse={() => {}} messagesCount={null} editCodeBlock={false} />
{/if}
{ if (e.detail === false) { onClose(); } }} >
{#if $mobile && ($user?.role === 'admin' || ($user?.permissions.chat?.controls ?? true))}
{ await showControls.set(true); await showOverview.set(false); await showArtifacts.set(false); await showEmbeds.set(false); }} >
{$i18n.t('Controls')}
{/if}
{ await showControls.set(true); await showOverview.set(true); await showArtifacts.set(false); await showEmbeds.set(false); }} >
{$i18n.t('Overview')}
{#if ($artifactContents ?? []).length > 0}
{ await showControls.set(true); await showArtifacts.set(true); await showOverview.set(false); await showEmbeds.set(false); }} >
{$i18n.t('Artifacts')}
{/if}
{#if !$temporaryChatEnabled && ($user?.role === 'admin' || ($user.permissions?.chat?.share ?? true))}
{ shareHandler(); }} >
{$i18n.t('Share')}
{/if}
{$i18n.t('Download')}
{#if $user?.role === 'admin' || ($user.permissions?.chat?.export ?? true)}
{ downloadJSONExport(); }} >
{$i18n.t('Export chat (.json)')}
{/if}
{ downloadTxt(); }} >
{$i18n.t('Plain text (.txt)')}
{ downloadPdf(); }} >
{$i18n.t('PDF document (.pdf)')}
{ const res = await copyToClipboard(await getChatAsText()).catch((e) => { console.error(e); }); if (res) { toast.success($i18n.t('Copied to clipboard')); } }} >
{$i18n.t('Copy')}
{#if !$temporaryChatEnabled && chat?.id}
{#if $folders.length > 0}
{$i18n.t('Move')}
{#each $folders.sort((a, b) => b.updated_at - a.updated_at) as folder} {#if folder?.id}
{ moveChatHandler(chat.id, folder.id); }} >
{folder.name ?? 'Folder'}
{/if} {/each}
{/if}
{ archiveChatHandler(); }} >
{$i18n.t('Archive')}
{/if}