{#if item}
{/if}
{ const filesystemPath = item?.type === 'filesystem' ? (item.path ?? item.url ?? item.id) : null; if (filesystemPath) { showFileNavPath.set(filesystemPath); } else if (item?.file?.data?.content || item?.type === 'file' || item?.content || modal) { showModal = !showModal; } else { if (url) { if (type === 'file') { if (url.startsWith('http')) { window.open(`${url}/content`, '_blank').focus(); } else { window.open(`${WEBUI_API_BASE_URL}/files/${url}/content`, '_blank').focus(); } } else if (safeLinkUrl(url)) { window.open(`${url}`, '_blank').focus(); } } } dispatch('click'); }} > {#if !small}
{#if !loading}
{:else}
{/if}
{:else}
{#if !loading}
{#if type === 'collection'}
{:else if type === 'note'}
{:else if type === 'chat'}
{:else if type === 'folder'}
{:else}
{/if}
{:else}
{/if}
{/if} {#if !small}
{decodeString(name)}
{#if type === 'file' || type === 'filesystem'} {$i18n.t('File')} {:else if type === 'note'} {$i18n.t('Note')} {:else if type === 'doc'} {$i18n.t('Document')} {:else if type === 'collection'} {$i18n.t('Collection')} {:else}
{type}
{/if} {#if size}
{formatFileSize(size)}
{/if}
{:else}
{decodeString(name)}
{#if size}
{formatFileSize(size)}
{:else}
{type}
{/if}
{/if}
{#if dismissible}
{ dispatch('dismiss'); }} >
{/if}