{$i18n.t('Knowledge')}
{$i18n.t('To attach knowledge base here, add them to the "Knowledge" workspace first.')}
{#if selectedKnowledge?.length > 0}
{#each selectedKnowledge as file, fileIdx} { selectedKnowledge = selectedKnowledge.filter((_, idx) => idx !== fileIdx); }} /> {/each}
{/if}
{ const item = e.detail; if (!selectedKnowledge.find((k) => k.id === item.id)) { selectedKnowledge = [ ...selectedKnowledge, { ...item } ]; } }} >