{#if filteredItems.length > 0 || prompt.split(' ')?.at(0)?.substring(1).startsWith('http')}
#
{#each filteredItems as doc, docIdx}
{ console.log(doc); confirmSelect(doc); }} on:mousemove={() => { selectedIdx = docIdx; }} on:focus={() => {}} > {#if doc.type === 'collection'}
{doc?.title ?? `#${doc.name}`}
Collection
{:else}
#{doc.name} ({doc.filename})
{doc.title}
{/if}
{/each} {#if prompt.split(' ')?.at(0)?.substring(1).startsWith('http')}
{ const url = prompt.split(' ')?.at(0)?.substring(1); if (isValidHttpUrl(url)) { confirmSelectWeb(url); } else { toast.error( 'Oops! Looks like the URL is invalid. Please double-check and try again.' ); } }} >
{prompt.split(' ')?.at(0)?.substring(1)}
Web
{/if}
{/if}