{ e.stopPropagation() }} role="none" bind:clientHeight={height} >
dispatch('close')} {disableAi} on:insert bind:funcDesc {preFilter} {loading} /> {#if selectedKind != 'preprocessor' && selectedKind != 'flow'} {/if} { refreshCount.val += 1 if (selectedKind === 'aiagent') { savedAgentsWs = undefined loadSavedAgents() } }} />
{#if kind === 'script'}
{ selectedKind = 'script' }} /> {#if toolMode} { dispatch('pickMcpTool') dispatch('close') }} /> { dispatch('pickWebsearchTool') dispatch('close') }} /> {#if allowAiAgentTool} { dispatch('pickAiAgentTool') dispatch('close') }} /> {/if} {:else} {#if customUi?.triggers != false && allowTrigger} { selectedKind = 'trigger' }} /> {/if} { selectedKind = 'approval' }} /> {#if customUi?.flowNode != false} { selectedKind = 'flow' }} /> {/if} {#if stop} { selectedKind = 'script' }} /> {/if} { dispatch('close') dispatch('new', { kind: 'forloop' }) }} /> { dispatch('close') dispatch('new', { kind: 'whileloop' }) }} /> { dispatch('close') dispatch('new', { kind: 'branchone' }) }} /> { dispatch('close') dispatch('new', { kind: 'branchall' }) }} /> {#if customUi?.aiAgent != false} { selectedKind = 'aiagent' selectedByKeyboard = 0 loadSavedAgents() // Clicking leaves focus on this button, where Enter would only re-select it. stepGen?.focus() }} /> {/if} {#if customUi?.aiSandbox != false} { selectedKind = 'aisandbox' selectedByKeyboard = 0 stepGen?.focus() }} /> {/if} {/if}
{/if} {#if selectedKind === 'aiagent'}
{#if savedAgentsLoading}
Loading saved agents
{:else if filteredAgents.length > 0}
Saved agents
{#each filteredAgents as agent, i (agent.path)} {/each} {:else}
{savedAgents.length > 0 ? 'No saved agent matches this search' : 'No saved agent in this workspace yet. Configure a blank one, then Save as reusable agent to reuse it.'}
{/if}
{:else if selectedKind === 'aisandbox'}
(selectedByKeyboard = 0)} />
{:else} { dispatch('close') }} on:new on:pickScript on:pickFlow {preFilter} {displayPath} refreshCount={refreshCount.val} /> {/if}