{#if loaded} { deleteHandler(selectedItem); }} /> {$i18n.t("Knowledge")} {total} {$i18n.t("New Knowledge")} {#if query} { query = ""; }} > {/if} { if (e.deltaY !== 0) { e.preventDefault(); e.currentTarget.scrollLeft += e.deltaY; } }} > { localStorage.workspaceViewOption = value; await tick(); }} /> {#if items !== null && total !== null} {#if (items ?? []).length !== 0} {#each items as item} { if (item?.meta?.document) { toast.error( $i18n.t( "Only collections can be edited, create a new knowledge base to edit/add documents.", ), ); } else { goto(`/workspace/knowledge/${item.id}`); } }} > {#if !item?.write_access} {/if} {#if item?.write_access || $user?.role === "admin"} { exportHandler( item, ); } : null} on:delete={() => { selectedItem = item; showDeleteConfirm = true; }} /> {/if} {item.name} {$i18n.t("Updated")} {dayjs( item.updated_at * 1000, ).fromNow()} {$i18n.t("By {{name}}", { name: capitalizeFirstLetter( item?.user?.name ?? item?.user ?.email ?? $i18n.t( "Deleted User", ), ), })} {/each} {#if !allItemsLoaded} { if (!itemsLoading) { loadMoreItems(); } }} > {$i18n.t("Loading...")} {/if} {:else} {$i18n.t("No knowledge found")} {$i18n.t( "Try adjusting your search or filter to find what you are looking for.", )} {/if} {:else} {/if} ⓘ {$i18n.t( "Use '#' in the prompt input to load and include your knowledge.", )} {:else} {/if}