{#if isRunnableByPath(runnable) || (isRunnableByName(runnable) && runnable.inlineScript)} {#if isRunnableByName(runnable)} dispatch('createScriptFromInlineScript', runnable)} {id} bind:inlineScript={runnable.inlineScript} bind:name={runnable.name} bind:fields={runnable.fields} bind:delete_after_secs={runnable.delete_after_secs} onRun={testPreview} on:delete path={appPath} {onSelectionChange} /> {:else if isRunnableByPath(runnable)} fork(e.detail)} on:delete {id} isLoading={testIsLoading} onRun={testPreview} onCancel={async () => { if (jobLoader) { await jobLoader.cancelJob() } }} /> {/if} {#snippet content()} {#if selectedTab == 'inputs'} {#if runnable?.fields} {#each Object.keys(runnable.fields) as k} {@const meta = runnable.fields[k]} {/each} {:else} No inputs {/if} {:else if selectedTab == 'test'} {#if debugMode && isDebuggableScript} inlineScriptEditor?.startDebugging() ?? Promise.resolve()} onStop={() => inlineScriptEditor?.stopDebugging() ?? Promise.resolve()} onContinue={() => inlineScriptEditor?.continueExecution() ?? Promise.resolve()} onStepOver={() => inlineScriptEditor?.stepOver() ?? Promise.resolve()} onStepIn={() => inlineScriptEditor?.stepIn() ?? Promise.resolve()} onStepOut={() => inlineScriptEditor?.stepOut() ?? Promise.resolve()} onClearBreakpoints={() => inlineScriptEditor?.clearAllBreakpoints()} onExitDebug={() => inlineScriptEditor?.toggleDebugMode()} /> {/if} { if (jobLoader) { await jobLoader.cancelJob() } }} size="md" /> v.type == 'static') .map(([k]) => k)} schema={runnable ? getSchema(runnable) : {}} bind:args /> {#if showDebugPanel || hasDebugResult} {#if hasDebugResult} {:else} {#if $debugState.running && !$debugState.stopped} Running... {:else if $debugState.stopped} Paused at breakpoint {:else} Waiting for debug session {/if} {/if} {:else if debugMode && isDebuggableScript} Click "Debug" in the toolbar to start debugging {:else} {/if} {/if} {/snippet} {:else} onPick(e.detail as { runnable: Runnable; fields: Record })} on:delete showScriptPicker on:new={(e) => { runnable = { type: 'inline', inlineScript: e.detail, name: runnable?.name ?? 'Background Runnable' } }} /> {/if}