{t('conn.wfTitle')}

{t('wl.hint')}
{#if rows.length === 0}

{t('conn.missingMaterial')}

{:else}

{t('conn.wfCount', { n: rows.length, m: rows.filter((r) => r.kind === 'image').length, k: rows.filter((r) => r.kind === 'video').length, })} {#if pendingCount} · {t('conn.wfPendingCount', { n: pendingCount })} {/if} {#if favCount} · {t('wl.favCount', { n: favCount })} {/if}

(search = e.currentTarget.value)} placeholder={t('wl.searchPh')} aria-label={t('wl.searchPh')} /> /
{#if hasActiveFilter} {/if}
{#if filtered.length === 0} {:else}

{t('wl.resultCount', { n: filtered.length, m: rows.length })}

{#if selected.size > 0} {/if}
toggleSelectVisible()} /> {t('common.name')} {t('wl.headMeta')} {t('wl.headActions')}
{#each visible as row (row.id)} {@const full = fullCache[row.id]}
toggleRow(row.id, e.currentTarget.checked)} /> {#if row.category} {categoryLabel(row.category)} {/if} {#if row.model_family} {row.model_family} {/if} {#if (row.media_io?.in ?? []).length || (row.media_io?.out ?? []).length} {/if} {#if row.usage} {usageLabel(row.usage)} {:else} {/if} {#if rowNeedsOutputMap(row)} {/if} {#if !row.is_enabled && row.usage && !rowNeedsOutputMap(row)} {t('conn.wfDisabledBadge')} {/if} {#if full && (full.warnings ?? []).some((w) => w.level === 'error')} w.level === 'error').map((w) => w.message).join('\n')}> {t('conn.wfBrokenBadge')} {/if} { if (next) void workflows.update(row.id, { is_enabled: true }).then( () => client.invalidateQueries({ queryKey: ['workflows'] }), (err) => toast.error(apiErrorMessage(err)), ); else void workflows.update(row.id, { is_enabled: false }).then( () => client.invalidateQueries({ queryKey: ['workflows'] }), (err) => toast.error(apiErrorMessage(err)), ); }} /> {#if !row.usage || rowNeedsOutputMap(row)} ? {/if}
{@const lastLine = lastTestLine(full)} {@const used = row.last_used_at ? `${t('wl.lastUsed')}:${formatDbTime(row.last_used_at)}` : null} {@const recheck = recheckLine(row)} {#if lastLine || used || recheck}
{#if used}{used}{/if} {#if lastLine}{t('conn.wfLastTest')}:{lastLine}{/if} {#if recheck} {recheck.text} {/if}
{/if} {#if wfMapEditId === row.id && full}

{t('conn.wfOutputHint')}

{#each (full.output_schema ?? []).filter((o) => o.evidence === 'unknown_node') as c (c.nodeId)}
{/each}
{/if} {/each}
{#if filtered.length > visibleCount} {/if} {/if} {/if}
client.invalidateQueries({ queryKey: ['workflows'] })} /> client.invalidateQueries({ queryKey: ['workflows'] })} /> { client.invalidateQueries({ queryKey: ['workflows'] }); if (testWf) { delete fullCache[testWf.id]; void ensureFull(testWf.id); } }} /> $dedupeMutation.mutate()} />