{#if item?.type === "collection"} {#if item?.type}
{item.type}
• {/if} {#if item?.description}
{item.description}
• {/if} {#if item?.created_at}
{dayjs(item.created_at * 1000).format("LL")}
{/if} {/if} {#if item.size}
{formatFileSize(item.size)}
• {/if} {#if item?.file?.data?.content}
{#if isExcel && rowCount > 0 && selectedTab === "preview"} {$i18n.t("{{COUNT}} Rows", { COUNT: rowCount, })} {:else} {$i18n.t("{{COUNT}} extracted lines", { COUNT: getLineCount( item?.file?.data?.content ?? "", ), })} {/if}
• {$i18n.t( "Formatting may be inconsistent from source.", )}
{/if} {#if item?.knowledge}
{$i18n.t("Knowledge Base")}
{/if}
{#if edit}
{#if enableFullContent} {$i18n.t("Using Entire Document")} {:else} {$i18n.t("Using Focused Retrieval")} {/if} { item.context = e.detail ? "full" : undefined; }} />
{/if}
{#if !loading} {#if item?.type === "collection"}
{#each item?.files as file}
{file?.meta?.name}
{/each}
{/if} {#if isAudio || isPDF || isExcel || isCode || isMarkdown || isDocx || isPptx}
{/if} {#if isImage}
{item?.name
{:else if selectedTab === ""} {#if item?.file?.data} {@const rawContent = (item?.file?.data?.content ?? "").trim() || "No content"} {@const isTruncated = ($settings?.renderMarkdownInPreviews ?? true) && rawContent.length > CONTENT_PREVIEW_LIMIT && !expandedContent} {#if $settings?.renderMarkdownInPreviews ?? true}
{#if isTruncated} {/if} {:else}
{rawContent}
{/if} {:else if item?.content} {@const rawContent = (item?.content ?? "").trim() || "No content"} {@const isTruncated = ($settings?.renderMarkdownInPreviews ?? true) && rawContent.length > CONTENT_PREVIEW_LIMIT && !expandedContent} {#if $settings?.renderMarkdownInPreviews ?? true}
{#if isTruncated} {/if} {:else}
{rawContent}
{/if} {/if} {:else if selectedTab === "preview"} {#if isAudio}