{#if selectedKind != 'preprocessor'}
{#if ['script', 'trigger', 'approval', 'preprocessor', 'failure'].includes(selectedKind)} {#if (preFilter === 'all' && owners.length > 0) || preFilter === 'workspace'} {#if preFilter !== 'workspace'}
Folders
{/if} {#if owners.length > 0} {#each owners as owner (owner)}
{/each}
{:else}
No items found.
{/if} {/if} {#if preFilter === 'hub' || preFilter === 'all'} {#if preFilter == 'all'}
Integrations
{/if} { filteredWorkspaceItems = [] selectedByKeyboard = 0 }} filters={integrations} bind:selectedFilter={selected} resourceType /> {#if !selected && customUi?.suggestIntegration != false} {/if} {/if} {:else if selectedKind === 'flow'} {#if owners.length > 0} {#each owners as owner (owner)}
{/each} {/if} {/if}
{/if}
{#if kind == 'script'} {#each topLevelNodes as [label, kind], i (label)} { dispatch('new', { kind }) }} {label} selected={selectedByKeyboard === i} /> {/each} {/if} {#if inlineScripts?.length > 0}
New {selectedKind != 'script' ? selectedKind + ' ' : ''}script
{#if $userStore?.is_admin || $userStore?.is_super_admin} {#if !openScriptSettings} {/if} {/if}
{#if openScriptSettings}
{/if} {#each inlineScripts as [label, lang], i (lang)} { dispatch('new', { kind: selectedKind, inlineScript: { language: lang == 'docker' ? 'bash' : lang, kind: selectedKind, subkind: lang == 'docker' ? 'docker' : selectedKind == 'preprocessor' ? 'preprocessor' : 'flow', summary } }) }} /> {/each} {/if} {#if !disableAi && funcDesc?.length > 0 && kind != 'failure' && kind != 'preprocessor' && (selectedKind == 'script' || selectedKind == 'trigger') && preFilter == 'all'}
  • { lang = 'bun' onGenerate() }} />
  • { lang = 'python3' onGenerate() }} />
{/if} {#if (!selected || selected?.kind === 'owner') && (preFilter === 'workspace' || preFilter === 'all')} {#if !selected && (preFilter !== 'workspace' || funcDesc?.length > 0)}
Workspace
{/if} {#await import('../pickers/WorkspaceScriptPickerQuick.svelte') then Module} owners, (v) => { $workspaceStore && (cachedOwners[$workspaceStore] = v) owners = v } } bind:ownerFilter={selected} bind:filteredWithOwner={filteredWorkspaceItems} {filter} kind={selectedKind} selected={selectedByKeyboard - inlineScripts?.length - aiLength - topLevelNodes.length} on:pickScript on:pickFlow {displayPath} {refreshCount} /> {/await}
{/if} {#if selectedKind === 'script' && preFilter === 'all' && !selected && customUi?.aiSandbox != false}
AI Sandbox
{ dispatch('new', { kind: selectedKind, inlineScript: { language: 'bun', kind: selectedKind, subkind: 'claudesandbox', summary } }) }} /> {/if} {#if selectedKind != 'preprocessor' && selectedKind != 'flow'} {#if (!selected || selected?.kind === 'integrations') && (preFilter === 'hub' || preFilter === 'all')} {#if !selected && preFilter !== 'hub'}
Hub
{/if} {#await import('../pickers/PickHubScriptQuick.svelte') then Module} integrations, (v) => { cachedIntegrations = v integrations = v } } appFilter={selected?.name} kind={selectedKind} selected={selectedByKeyboard - inlineScripts?.length - aiLength - filteredWorkspaceItems?.length - topLevelNodes.length} on:pickScript bind:loading {displayPath} {refreshCount} /> {/await} {/if} {/if}