{ stopTerminalChoice?.(true); stopTerminalChoice = null; }} on:cancel={() => { stopTerminalChoice?.(false); stopTerminalChoice = null; }} /> {activeTab?.kind === 'page' || activeTab?.kind === 'side' ? `${activeTab.label} / ${$WEBUI_NAME}` : $settings.showChatTitleInTab !== false && chatId && title ? `${title.length > 30 ? `${title.slice(0, 30)}...` : title} / ${$WEBUI_NAME}` : $WEBUI_NAME} { if (event.target instanceof Element && event.target.closest('#sidebar')) dragged = true; }} on:dragend|capture={() => { dragged = false; clearChatDropPreview(); }} on:drop|capture={clearChatDropPreview} on:blur={clearChatDropPreview} /> {#if chatDropPreview}
{$i18n.t('Open in side panel')}
{/if} {#if voiceNoteTarget} {@const target = voiceNoteTarget} { voiceNoteTarget = null; }} onsaved={(path) => openFile(path, target.connection.selector)} /> {/if} {#if showQuickOpen && terminalFilesAvailable && selectedConnection} {#key `${selectedConnection.selector}:${chatId}`} { showQuickOpen = false; }} onselect={(path) => openFile(path, selectedConnection!.selector)} /> {/key} {/if}

{$i18n.t('Overview')}

{ const { node } = e; history.messages[node.data.message.id].favorite = node.data.message.favorite ? true : null; showOverview.set(false); showMessage(node.data.message, true); }} />
{#snippet tabBar(group: PanelGroup)}
{ const strip = event.currentTarget; if ( event.ctrlKey || event.shiftKey || Math.abs(event.deltaY) <= Math.abs(event.deltaX) || strip.scrollWidth <= strip.clientWidth ) return; const unit = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? strip.clientWidth : 1; event.preventDefault(); strip.scrollLeft += event.deltaY * unit; }} > {#each group.tabIds.map((id) => tabs.tabs.find((tab) => tab.id === id)!) as tab (tab.id)}
selectTab(tab.id)} class="panel-tab flex cursor-pointer items-center gap-1.5 ps-2.5 pe-2 h-7 rounded-lg text-sm font-normal whitespace-nowrap shrink-0 transition {group.activeId === tab.id ? 'bg-gray-100/40 dark:bg-gray-800/25 text-gray-700 dark:text-gray-200' : 'text-gray-500 dark:text-gray-400 hover:bg-gray-100/30 dark:hover:bg-gray-800/20 hover:text-gray-600 dark:hover:text-gray-300'}" > {#if tab.untitled || dirtyFiles[tab.id]}{/if} {#if tab.kind === 'chat'} {@render tabTitleEditor?.()} {@render tabActions?.()} {:else}{/if}
{/each}
{#if canOpenNewTab && viewReady && !chatLoading}
{#if showFilesTab} {/if} {#if terminalFilesAvailable}{/if} {#if terminalEnabled}{/if} {#if browserEnabled}{/if} {#if desktopEnabled}{/if} {#if canVoiceNote} {/if} {#each newTabViews as view} {/each}
{/if}
{#if group.activeId === mainChatTabId}
{@render tabBarActions?.()}
{/if} {#if !fullWidth && (!largeScreen || group.id === tabs.groups[0].id)} {/if}
{/snippet} {#if !largeScreen} showTabs.set(open)} let:visible let:panelStyle let:backdropStyle > {#if visible} showTabs.set(false)} onRequestClose={() => showTabs.set(false)} panelStyle={$mobile ? panelStyle : ''} backdropStyle={$mobile ? backdropStyle : ''} swipeSide={$mobile ? 'right' : undefined} className="min-h-[100dvh] !bg-white dark:!bg-gray-900" >
{/if}
{:else if fullWidth}
{/if}