{ await initChatList(); }} /> { const res = await createNewChannel(localStorage.token, { name: name, access_control: access_control }).catch((error) => { toast.error(`${error}`); return null; }); if (res) { $socket.emit('join-channels', { auth: { token: $user?.token } }); await initChannels(); showCreateChannel = false; } }} /> { await createFolder(folder); showCreateFolderModal = false; }} /> {#if $showSidebar}
{ showSidebar.set(!$showSidebar); }} /> {/if} { if ($mobile) { showSidebar.set(false); } }} />
{ e.stopImmediatePropagation(); e.preventDefault(); goto('/'); newChatHandler(); }} aria-label={$i18n.t('New Chat')} >
{#if ($config?.features?.enable_notes ?? false) && ($user?.role === 'admin' || ($user?.permissions?.features?.notes ?? true))}
{ e.stopImmediatePropagation(); e.preventDefault(); goto('/notes'); itemClickHandler(); }} draggable="false" aria-label={$i18n.t('Notes')} >
{/if} {#if $user?.role === 'admin' || $user?.permissions?.workspace?.models || $user?.permissions?.workspace?.knowledge || $user?.permissions?.workspace?.prompts || $user?.permissions?.workspace?.tools}
{ e.stopImmediatePropagation(); e.preventDefault(); goto('/workspace'); itemClickHandler(); }} aria-label={$i18n.t('Workspace')} draggable="false" >
{/if}
{#if $user !== undefined && $user !== null} { if (e.detail === 'archived-chat') { showArchivedChats.set(true); } }} >
{$i18n.t('Open
{/if}
{/if} {#if $showSidebar} {/if}