{#if ['/', '#', '@'].includes(command?.charAt(0)) || '\\#' === command.slice(0, 2)} {#if command?.charAt(0) === '/'} {:else if (command?.charAt(0) === '#' && command.startsWith('#') && !command.includes('# ')) || ('\\#' === command.slice(0, 2) && command.startsWith('#') && !command.includes('# '))} { console.log(e); dispatch('upload', { type: 'youtube', data: e.detail }); }} on:url={(e) => { console.log(e); dispatch('upload', { type: 'web', data: e.detail }); }} on:select={(e) => { console.log(e); files = [ ...files, { ...e.detail, status: 'processed' } ]; dispatch('select'); }} /> {:else if command?.charAt(0) === '@'} { prompt = removeLastWordFromString(prompt, command); dispatch('select', { type: 'model', data: e.detail }); }} /> {/if} {/if}