workflow

package
v0.35.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

templ: version: v0.3.1020

Package workflow holds the templ components for /tools/agents/workflows. Layout is split per section so each file maps to a chunk of the editor shell mounted around the Svelte SPA.

templ: version: v0.3.1020

templ: version: v0.3.1020

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgField

func ArgField(row entity.Config) templ.Component

ArgField is the workflow-side wrapper for one arg row. It calls the existing admin widget (fieldtype.Text / Dropdown / Secret / …) but adds workflow-specific chrome around it:

  • Label + required asterisk
  • Fixed | Expression toggle pill (default = Fixed)
  • Live-template preview slot (filled by JS when mode = Expression)
  • Description text

Widget HTML stays untouched — admin keeps its w-72 / w-96 / w-40 intentional widths. The .wf-arg-field parent scopes a CSS override in editor.css to stretch every widget to full width in the inspector without modifying the widget itself.

Add a new widget type = add a `case` to the switch below. The fieldtype package owns the widget HTML; this template owns the workflow chrome.

func ArgForm

func ArgForm(rows []entity.Config) templ.Component

ArgForm renders the full args block for one connector op or channel action — one ArgField per row.Type. Returns no-op when rows is empty so the inspector shows its own "No args required" empty state.

func SvelteEditor added in v0.14.20

func SvelteEditor(vm SvelteEditorVM) templ.Component

SvelteEditor renders the workflow editor as a Svelte island embedded inside the standard agents shell (sidebar + topbar). The data-island attribute tells main.ts (fe/agents/workflow/src/main.ts) which component to mount; data-props is the JSON-encoded props payload.

Why an island and not a standalone SPA route: the existing sidebar Wick navigation (New session / Overview / Workflows / Workspaces / …) is owned by templ, and rebuilding it in Svelte just to host the editor would double the surface area for no win. The island pattern keeps templ in charge of the chrome and Svelte in charge of the canvas — same trade-off sveltempl makes upstream.

func SvelteList added in v0.14.20

func SvelteList(vm SvelteListVM) templ.Component

SvelteList renders the workflow list as a Svelte island inside the agents shell. Same island pattern as SvelteEditor — templ owns the sidebar/chrome, Svelte owns the list content.

Types

type SvelteEditorVM added in v0.14.20

type SvelteEditorVM struct {
	Layout    view.AgentsLayoutVM
	Base      string
	ID        string
	AssetURL  string
	PropsJSON string
}

SvelteEditorVM feeds the templ wrapper that hosts the Svelte workflow editor as an island inside the existing AgentsLayout.

AssetURL is the absolute path to the hashed Vite bundle resolved at boot via spaAssetURL("workflow"). PropsJSON is the encoded `{ workflowID }` payload the island registry reads from data-props.

type SvelteListVM added in v0.14.20

type SvelteListVM struct {
	Layout   view.AgentsLayoutVM
	Base     string
	AssetURL string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL