{#if responseContent === null} {#if !floatingInput}
{#each actions as action}
{ selectedText = window.getSelection().toString(); selectedAction = action; if (action.prompt.includes('{{INPUT_CONTENT}}')) { floatingInput = true; floatingInputValue = ''; await tick(); setTimeout(() => { const input = document.getElementById('floating-message-input'); if (input) { input.focus(); } }, 0); } else { actionHandler(action.id); } }} > {#if action.icon}
{/if}
{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}