{#if commandItems.length > 0}
{$i18n.t('Commands')}
{#each commandItems as item, commandIdx} {#if item.data.id === 'compact'}
e.preventDefault()} on:click={() => { if (!compactDisabled) { onSelect(item); } }} on:mouseenter={() => { selectedIdx = commandIdx; }} on:focus={() => {}} data-selected={commandIdx === selectedIdx} >
Compact
{contextCirclePercent}% full
{:else if item.data.id === 'fork'}
e.preventDefault()} on:click={() => { if (!forkDisabled) { onSelect(item); } }} on:mouseenter={() => { selectedIdx = commandIdx; }} on:focus={() => {}} data-selected={commandIdx === selectedIdx} >
Fork
Clone chat
{:else if item.data.id === 'status'}
e.preventDefault()} on:click={() => { onSelect(item); }} on:mouseenter={() => { selectedIdx = commandIdx; }} on:focus={() => {}} data-selected={commandIdx === selectedIdx} >
Status
Check what is running in this chat.
{/if} {/each} {/if} {#if filteredPrompts.length > 0}
{$i18n.t('Prompts')}
{#each filteredPrompts as promptItem, promptIdx} {@const itemIdx = commandItems.length + promptIdx}
{ onSelect({ type: 'prompt', data: promptItem }); }} on:mousemove={() => { selectedIdx = itemIdx; }} on:focus={() => {}} data-selected={itemIdx === selectedIdx} >
{promptItem.command}
{promptItem.name}
{/each} {/if} {#if skills.length > 0}
{$i18n.t('Skills')}
{#each skills as skill, skillIdx} {@const itemIdx = commandItems.length + filteredPrompts.length + skillIdx}
{ onSelect({ type: 'skill', data: skill }); }} on:mousemove={() => { selectedIdx = itemIdx; }} on:focus={() => {}} data-selected={itemIdx === selectedIdx} >
{skill.name}
{skill.id}
{/each} {/if}