{#if responseContent === null} {#if !floatingInput}
{#each ACTIONS as action}
{ selectedText = window.getSelection().toString(); selectedAction = action; if (action.input) { floatingInput = true; floatingInputValue = ''; await tick(); setTimeout(() => { const input = document.getElementById('floating-message-input'); if (input) { input.focus(); } }, 0); } else { actionHandler(action.id); } }} >
{action.label}
{/each}
{:else}
{ if (e.key === 'Enter') { actionHandler(selectedAction?.id); } }} />
{ actionHandler(selectedAction?.id); }} >
{/if} {:else}
{#if !responseContent || responseContent?.trim() === ''}
{:else}
{/if} {#if responseDone}
{$i18n.t('Add')}
{/if}
{/if}