Files
archie/ui/src/workflows/WorkflowEditor.vue
T

566 lines
26 KiB
Vue

<script setup lang="ts">
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { computed, onBeforeUnmount, ref, watch } from "vue";
import { ChevronDown, Ellipsis, RotateCcw, Trash2 } from "@lucide/vue";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Spinner } from "@/components/ui/spinner";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { Textarea } from "@/components/ui/textarea";
import StepRun from "./StepRun.vue";
import { restartAt, withRuns, workflowGraph } from "./workflow-graph";
import { api } from "@/lib/api";
import StepEditor from "./StepEditor.vue";
import WorkflowSettings from "./WorkflowSettings.vue";
import TriggerSettings from "./TriggerSettings.vue";
import OptionSelect from "./OptionSelect.vue";
import RunWorkflowButton from "./RunWorkflowButton.vue";
import TaskRowActions from "@/tasks/TaskRowActions.vue";
import WorkflowCanvas from "./WorkflowCanvas.vue";
import WorkflowHistory from "./WorkflowHistory.vue";
import { useWorkflowHistory } from "./workflow-history";
import { revisionOfRun, type WorkflowRevision } from "./workflow-revisions";
import { deleteStep, duplicateStep, insertStep, moveStep, replaceStep, revertWorkflowChange, stepAt, workflowChanges, workflowField, type StepPath } from "./workflow-edit";
import ChangeList from "@/components/ChangeList.vue";
import CoBuilder from "./CoBuilder.vue";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { useWorkflowRuns } from "./workflow-runs";
import { useWorkflowTriggers } from "./workflow-triggers";
import { cloneControlPlaneValue, useSettingsStore } from "@/stores/settings";
import {
removeWorkflowDefinition,
upsertWorkflowDefinition,
useWorkflowsStore,
type WorkflowDefinitionCollection,
} from "@/stores/workflows";
import {
parseWorkflowYaml,
settingsProblem,
stepControlsProblem,
validationLabel,
yamlLines,
yamlTokenClass,
} from "./workflow-yaml";
const store = useSettingsStore();
const workflows = useWorkflowsStore();
const state = computed(() => workflows.state);
// Chat and agent aliases: embedding and transcription have their own purposes.
const modelAliases = computed(() =>
Object.keys((store.stateFor("model-aliases").resource?.value ?? {}) as Record<string, string>)
.filter((alias) => alias !== "embedding" && alias !== "transcription")
.sort(),
);
const collection = computed(() => workflows.collection);
const shipped = computed(() => workflows.shipped);
// Which definition is open belongs to the page, which also lists them.
const selected = defineModel<string>("selected", { required: true });
defineProps<{ runsCount?: number }>();
const id = ref("");
const yaml = ref("");
const loadedYaml = ref("");
// The one card open in place: "workflow", "start", or a step's path as JSON.
const open = ref<string | null>(null);
const openPath = computed<StepPath | null>(() => (open.value?.startsWith("[") ? (JSON.parse(open.value) as StepPath) : null));
function openStepAt(path: StepPath | null): void {
open.value = path ? JSON.stringify(path) : null;
}
const localError = ref("");
const { runs, error: runsError, loading: runsLoading, watched, watchedRun, stages, attempt, pick, follow, refresh } = useWorkflowRuns(selected);
const stepTab = ref("definition");
const graph = computed(() => withRuns(workflowGraph(yaml.value), stages.value));
function toggle(key: string): void {
open.value = open.value === key ? null : key;
const run = graph.value.nodes.find((node) => JSON.stringify(node.data.path ?? null) === open.value)?.data.run;
stepTab.value = run && watchedRun.value ? "run" : "definition";
}
watch(watched, () => { open.value = null; restartError.value = ""; });
// A parked run restarts at a step through the retry action, keeping the
// results of the steps before it.
const restartable = computed(() => watchedRun.value?.status === "parked");
const openRestart = computed(() => restartable.value && openPath.value ? restartAt(graph.value, openPath.value) : null);
const restarting = ref(false);
const restartError = ref("");
async function restartFrom(from: string): Promise<void> {
restartError.value = "";
restarting.value = true;
try {
await api.taskAction(watched.value, "retry", { resume_from: from });
await refresh();
} catch (err) {
restartError.value = err instanceof Error ? err.message : "Restart failed";
} finally {
restarting.value = false;
}
}
const { triggers, reload: reloadTriggers } = useWorkflowTriggers(selected);
const { revisions, error: historyError } = useWorkflowHistory(selected);
const historyRevision = ref(0);
const historyMode = ref("yaml");
// The revision a run used, matched by the definition it pinned.
function runRevision(run?: { workflow_definition_yaml?: string; created_at?: string }): WorkflowRevision | undefined {
return run ? revisionOfRun(revisions.value, run.workflow_definition_yaml, run.created_at) : undefined;
}
const watchedRevision = computed(() => runRevision(watchedRun.value));
function openRevision(version: number): void {
historyRevision.value = version;
view.value = "history";
}
// A restored version becomes the draft: nothing runs it until Publish.
function restoreRevision(restored: string): void {
yaml.value = restored;
open.value = null;
view.value = "canvas";
}
// Canvas edits are edits to the YAML; a newly placed step opens for editing.
const stepTypeNames = computed(() => vocabulary.value.map((info) => info.name));
function insertAt(after: StepPath, type: string): void {
stepTab.value = "definition";
const inserted = insertStep(yaml.value, after, type);
yaml.value = inserted.source;
openStepAt(inserted.path);
}
function duplicateAt(path: StepPath): void {
stepTab.value = "definition";
const copied = duplicateStep(yaml.value, path);
yaml.value = copied.source;
openStepAt(copied.path);
}
function moveAt(path: StepPath, delta: -1 | 1): void {
const moved = moveStep(yaml.value, path, delta);
yaml.value = moved.source;
if (openPath.value) openStepAt(moved.path);
}
function removeAt(path: StepPath): void {
yaml.value = deleteStep(yaml.value, path);
open.value = null;
}
function renameAt(path: StepPath, name: string): void {
const { id: _id, type, ...rest } = stepAt(yaml.value, path) ?? {};
yaml.value = replaceStep(yaml.value, path, { id: name || undefined, type, ...rest });
}
const shippedEntry = computed(() =>
shipped.value.definitions.find((entry) => entry.id === id.value),
);
function load(value: string): void {
const entry = collection.value.definitions.find(
(candidate) => candidate.id === value,
);
id.value = entry?.id ?? value;
yaml.value = workflows.drafts.find((draft) => draft.id === value)?.yaml ?? entry?.yaml ?? `id: ${value}\nsteps: []\n`;
loadedYaml.value = yaml.value;
open.value = null;
localError.value = "";
}
watch(selected, load, { immediate: true });
// The collection arrives after the first render; a later live update must not
// overwrite what is being typed, so it only refreshes an editor with no local edits.
watch([collection, () => workflows.drafts], () => {
const incoming =
workflows.drafts.find((draft) => draft.id === selected.value) ??
collection.value.definitions.find((entry) => entry.id === selected.value);
if (incoming && yaml.value === loadedYaml.value && incoming.yaml !== loadedYaml.value) load(selected.value);
});
// Every edit lands in the workflow's draft shortly after it is made, so work
// survives a reload and nothing reaches the running workflow until Publish.
// A draft equal to the published definition is removed.
let pending: ReturnType<typeof setTimeout> | undefined;
async function persistDraft(target: string, value: string): Promise<void> {
if (!target) return;
const published = collection.value.definitions.find((entry) => entry.id === target)?.yaml ?? "";
const current = workflows.drafts.find((draft) => draft.id === target)?.yaml;
const next = value === published ? undefined : value;
if (next === current) return;
if (await workflows.putDraft(target, next)) {
if (target === selected.value && value === yaml.value) loadedYaml.value = value;
} else if (workflows.draftState.saving) {
pending = setTimeout(() => void persistDraft(target, value), 500);
}
}
// The last edit not yet written, flushed at once when the editor switches
// workflow so the switch cannot drop it.
let unsaved: { target: string; value: string } | undefined;
watch(yaml, (value) => {
clearTimeout(pending);
if (unsaved && unsaved.target !== selected.value) void persistDraft(unsaved.target, unsaved.value);
const edit = (unsaved = { target: selected.value, value });
pending = setTimeout(() => {
unsaved = undefined;
void persistDraft(edit.target, edit.value);
}, 800);
});
onBeforeUnmount(() => {
clearTimeout(pending);
void persistDraft(selected.value, yaml.value);
});
async function dropDraft(target: string): Promise<void> {
clearTimeout(pending);
unsaved = undefined;
await workflows.putDraft(target, undefined);
}
// Edits made while Archie works would be overwritten by its draft, so the
// editor is locked until the turn ends.
const archieWorking = ref(false);
// Archie works from the saved draft, so pending edits are written first.
async function flushDraft(): Promise<void> {
clearTimeout(pending);
unsaved = undefined;
await persistDraft(selected.value, yaml.value);
}
// Archie's draft replaces what the editor shows; the review then lists its
// changes against the published workflow.
async function takeProposal(): Promise<void> {
await workflows.reloadDrafts();
const draft = workflows.drafts.find((entry) => entry.id === selected.value)?.yaml;
if (draft === undefined || draft === yaml.value) return;
clearTimeout(pending);
unsaved = undefined;
load(selected.value);
}
async function discard(): Promise<void> {
await dropDraft(selected.value);
load(selected.value);
}
async function save(next: WorkflowDefinitionCollection): Promise<boolean> {
localError.value = "";
return workflows.save(next);
}
async function publish(): Promise<void> {
// The id is the one the YAML declares; renaming is editing it there.
const nextID = parsed.value.ok ? parsed.value.id : "";
if (!nextID) return;
const previous = selected.value;
// Saving replaces the entry with that id, so a rename onto another
// workflow's id would silently overwrite it.
if (previous !== nextID && collection.value.definitions.some((entry) => entry.id === nextID)) {
localError.value = `A workflow with id "${nextID}" already exists; choose another id.`;
return;
}
let next = collection.value;
if (previous && previous !== nextID)
next = removeWorkflowDefinition(next, previous);
if (
await save(upsertWorkflowDefinition(next, { id: nextID, yaml: yaml.value }))
) {
await dropDraft(previous);
if (previous !== nextID) await dropDraft(nextID);
selected.value = nextID;
loadedYaml.value = yaml.value;
}
}
const confirmDelete = ref(false);
async function remove(): Promise<void> {
if (!selected.value) return;
if (
!(await save(removeWorkflowDefinition(collection.value, selected.value)))
)
return;
await dropDraft(selected.value);
selected.value = "";
id.value = "";
yaml.value = "";
}
async function restoreOne(): Promise<void> {
if (!shippedEntry.value) return;
// The restored definition replaces whatever draft was open.
if (
await save(
upsertWorkflowDefinition(
collection.value,
cloneControlPlaneValue(shippedEntry.value),
),
)
) {
await dropDraft(selected.value);
load(selected.value);
}
}
// What is typed, read against the served step vocabulary (workflow-yaml.ts).
// The Steps preview, the gutter and the validity indicator are three readings
// of one parse, so they cannot disagree about the same text. Step settings are
// not served, so a save the server refuses still reports its own reason below.
const vocabulary = computed(() => workflows.stepTypes);
const parsed = computed(() => parseWorkflowYaml(yaml.value, vocabulary.value));
const stored = computed(() => collection.value.definitions.find((entry) => entry.id === selected.value)?.yaml);
const dirty = computed(() => yaml.value !== (stored.value ?? ""));
const changes = computed(() => (dirty.value ? workflowChanges(stored.value ?? "", yaml.value) : []));
const view = ref("canvas");
// What each step lacks, read the way its editor reads it.
const problems = computed(() =>
Object.fromEntries(
graph.value.nodes.flatMap((node) => {
const path = node.data.path;
const step = path && stepAt(yaml.value, path);
if (!step) return [];
const schema = vocabulary.value.find((info) => info.name === step.type)?.settings;
const problem = stepControlsProblem(step) || (schema && step.settings ? settingsProblem(step.settings, schema, "settings") : "");
return problem ? [[JSON.stringify(path), problem]] : [];
}),
),
);
const WORKS_ON: Record<string, string> = { optional: "Repository if given", none: "No repository" };
const REQUIRED = "Works on a repository";
const workflowSummary = computed(() =>
[WORKS_ON[String(workflowField(yaml.value, "repository") ?? "")] ?? REQUIRED, workflowField(yaml.value, "profile")].filter(Boolean).join(" · "),
);
const runOptions = computed(() => [
{ value: "", label: "Definition only" },
...runs.value.map((run) => ({
value: String(run.id),
label: [`${run.source === "test" ? "Test" : "Run"} #${run.id}`, run.title, run.status, runRevision(run) ? `v${runRevision(run)!.version}` : ""].filter(Boolean).join(" · "),
})),
]);
const lines = computed(() => yamlLines(yaml.value));
// Below md the section tabs that do not fit beside Canvas and YAML are picked
// from one menu, which also names the section in view.
const OVERFLOW: Record<string, string> = { history: "History", performance: "Performance", runs: "Runs" };
// The highlight layer sits behind the textarea and never scrolls by itself, so
// it follows the textarea's own scroll on both axes.
const scrolled = ref({ top: 0, left: 0 });
function syncScroll(event: Event): void {
const { scrollTop, scrollLeft } = event.target as HTMLTextAreaElement;
scrolled.value = { top: scrollTop, left: scrollLeft };
}
</script>
<template>
<form class="space-y-4" @submit.prevent="publish">
<Tabs v-model="view" class="space-y-1.5">
<div class="flex flex-wrap items-center gap-2">
<TabsList class="max-w-full justify-start">
<TabsTrigger value="canvas">Canvas</TabsTrigger>
<TabsTrigger value="yaml">YAML</TabsTrigger>
<TabsTrigger v-if="stored !== undefined" value="history" class="max-md:hidden">History</TabsTrigger>
<TabsTrigger v-if="$slots.performance" value="performance" class="max-md:hidden">Performance</TabsTrigger>
<TabsTrigger v-if="$slots.runs" value="runs" class="max-md:hidden">Runs <span class="ml-1 font-mono text-xs text-fg-subtle">{{ runsCount ?? 0 }}</span></TabsTrigger>
</TabsList>
<DropdownMenu>
<DropdownMenuTrigger as-child>
<Button type="button" variant="outline" size="sm" class="md:hidden" aria-label="More sections">
{{ OVERFLOW[view] ?? "More" }}<ChevronDown data-icon="inline-end" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" class="w-40">
<DropdownMenuItem v-if="stored !== undefined" @select="view = 'history'">History</DropdownMenuItem>
<DropdownMenuItem v-if="$slots.performance" @select="view = 'performance'">Performance</DropdownMenuItem>
<DropdownMenuItem v-if="$slots.runs" @select="view = 'runs'">Runs <span class="ml-auto font-mono text-xs text-fg-subtle">{{ runsCount ?? 0 }}</span></DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<div v-if="runs.length && view === 'canvas'" class="flex min-w-0 items-center gap-1">
<OptionSelect :model-value="watched" :options="runOptions" aria-label="Run shown on the canvas" class="min-w-0 max-w-64" @update:model-value="pick" />
<template v-if="watchedRun">
<RouterLink :to="`/tasks/${watchedRun.id}`" class="shrink-0 px-1 text-xs text-muted-foreground hover:text-foreground hover:underline">Open</RouterLink>
<button v-if="watchedRevision" type="button" class="shrink-0 px-1 font-mono text-xs text-muted-foreground hover:text-foreground hover:underline" title="Open the version this run used" @click="openRevision(watchedRevision.version)">v{{ watchedRevision.version }}</button>
<TaskRowActions :task="watchedRun" class="shrink-0" @done="refresh" />
</template>
</div>
<template v-if="view === 'canvas' || view === 'yaml'">
<div class="ml-auto flex flex-wrap items-center justify-end gap-2">
<span v-if="!parsed.ok" class="max-w-md truncate text-xs text-danger" role="status" :title="validationLabel(parsed)">
{{ validationLabel(parsed) }}
</span>
<Popover v-else-if="dirty">
<PopoverTrigger as-child>
<Button type="button" variant="ghost" size="sm" class="text-xs text-fg-subtle">
Draft · {{ changes.length }} {{ changes.length === 1 ? "change" : "changes" }}</Button>
</PopoverTrigger>
<PopoverContent align="end" class="max-h-96 w-96 overflow-y-auto p-0">
<ChangeList :changes="changes" @revert="(change) => (yaml = revertWorkflowChange(yaml, change))" />
</PopoverContent>
</Popover>
<DropdownMenu>
<DropdownMenuTrigger as-child>
<Button type="button" variant="ghost" size="icon-sm" aria-label="More"><Ellipsis /></Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" class="w-48">
<DropdownMenuItem v-if="dirty" :disabled="archieWorking" @select="discard"><RotateCcw />Discard draft</DropdownMenuItem>
<DropdownMenuItem v-if="shippedEntry" @select="restoreOne"><RotateCcw />Restore default</DropdownMenuItem>
<DropdownMenuSeparator v-if="dirty || shippedEntry" />
<DropdownMenuItem variant="destructive" @select="confirmDelete = true"><Trash2 />Delete workflow</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<RunWorkflowButton v-if="stored !== undefined" :workflow="selected" :draft="yaml" :disabled="!parsed.ok" @started="(id) => { view = 'canvas'; void follow(id); }" />
<RunWorkflowButton v-if="stored !== undefined" :workflow="selected" :disabled="dirty" @started="(id) => { view = 'canvas'; void follow(id); }" />
<Button type="submit" size="sm" :disabled="state.saving || !parsed.ok || !dirty || archieWorking">
<Spinner v-if="state.saving" data-icon="inline-start" />Publish</Button>
</div>
</template>
</div>
<p v-if="runsLoading && !runs.length" class="text-xs text-fg-muted" role="status">Loading recent runs…</p>
<div v-else-if="runsError" class="text-sm text-danger" role="alert">
<p>Could not load recent runs: {{ runsError }}</p>
<Button type="button" variant="outline" size="sm" @click="refresh">Retry runs</Button>
</div>
<p v-if="watchedRun && !watchedRun.workflow_definition_yaml" class="text-xs text-fg-muted" role="status">No workflow snapshot was recorded for this run. Showing the current definition.</p>
<!-- Kept mounted so an Archie turn started here still finishes, unlocks the
editor and loads its draft when the operator switches tabs. -->
<TabsContent value="canvas" force-mount class="space-y-2 data-[state=inactive]:hidden">
<!-- The canvas takes the height the viewport has left, so the page
itself does not scroll; the canvas pans. A phone stacks more chrome
above it (the workflow list, a two-row toolbar and the run picker),
hence the larger offset below md. -->
<div class="relative h-[calc(100dvh-17rem)] min-h-[26rem] max-md:flex max-md:h-[calc(100dvh-22rem)] max-md:min-h-[23rem] max-md:flex-col">
<p v-if="restartError" role="alert" class="absolute bottom-3 left-14 z-10 max-w-xl rounded-md border border-danger/40 bg-card px-3 py-2 text-sm text-danger shadow-lg">{{ restartError }}</p>
<WorkflowCanvas
class="max-md:h-auto max-md:min-h-0 max-md:flex-1"
:inert="archieWorking"
:yaml="yaml"
:stages="stages"
:open="open"
:triggers="triggers"
:types="stepTypeNames"
:restartable="restartable"
:problems="problems"
:title="parsed.ok ? parsed.id : id"
:summary="workflowSummary"
@toggle="toggle"
@restart="restartFrom"
@insert="insertAt"
@duplicate="duplicateAt"
@move="moveAt"
@remove="removeAt"
@rename="renameAt"
>
<template #body="{ data }">
<WorkflowSettings v-if="data.kind === 'workflow'" v-model:yaml="yaml" />
<TriggerSettings v-else-if="data.kind === 'start'" v-model:yaml="yaml" :triggers="triggers" @bound="reloadTriggers" />
<template v-else-if="data.path">
<div v-if="data.run && watchedRun" class="flex items-center gap-2 border-b border-border px-3 py-2">
<Tabs v-model="stepTab"><TabsList><TabsTrigger value="run">Run</TabsTrigger><TabsTrigger value="definition">Definition</TabsTrigger></TabsList></Tabs>
<Button v-if="openRestart" type="button" size="sm" variant="outline" class="ml-auto" :disabled="restarting || openRestart.blocked" @click="restartFrom(openRestart.from)"><RotateCcw />{{ openRestart.label }}</Button>
</div>
<div v-if="data.run && watchedRun && stepTab === 'run'" class="max-h-[32rem] overflow-y-auto">
<StepRun :task="watchedRun" :attempt="attempt" :stage="data.run" :stages="stages" />
</div>
<StepEditor
v-else
:key="open ?? ''"
v-model:yaml="yaml"
:workflows="collection.definitions"
:path="data.path"
:vocabulary="vocabulary"
:model-aliases="modelAliases"
/>
</template>
</template>
</WorkflowCanvas>
<div class="pointer-events-none absolute inset-x-0 bottom-3 z-10 flex justify-center px-3 max-md:static max-md:px-0 max-md:pt-2 max-md:pr-16">
<CoBuilder
v-if="selected"
:key="selected"
:workflow="selected"
:empty="!parsed.ok || parsed.steps.length === 0"
:before-send="flushDraft"
@proposed="takeProposal"
@working="(value) => (archieWorking = value)"
/>
</div>
</div>
</TabsContent>
<TabsContent value="history">
<WorkflowHistory v-model:selected="historyRevision" v-model:mode="historyMode" :revisions="revisions" :current="yaml" :error="historyError" @restore="restoreRevision" />
</TabsContent>
<TabsContent value="performance" class="grid gap-4"><slot name="performance" /></TabsContent>
<TabsContent value="runs"><slot name="runs" /></TabsContent>
<TabsContent value="yaml" :inert="archieWorking">
<!--
A gutter and a highlighted layer behind the live textarea, so the YAML
is numbered and coloured where it is edited rather than in a second,
read-only pane beside it. The layer is aria-hidden and never focusable:
the textarea in front of it stays the only thing the operator and a
screen reader reach.
-->
<div
class="relative overflow-hidden rounded-lg border border-input font-mono text-[13px] leading-6 focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50"
>
<div
aria-hidden="true"
class="pointer-events-none absolute inset-y-0 left-0 w-11 select-none overflow-hidden border-r border-border bg-secondary/40 py-3 text-right"
>
<div :style="`transform:translateY(${-scrolled.top}px)`">
<div
v-for="line in lines"
:key="line.number"
class="min-h-6 pr-2 text-fg-subtle"
>{{ line.number }}</div
>
</div>
</div>
<!-- Clipped to the right of the gutter, so a line scrolled left never
paints over the numbers. -->
<div
aria-hidden="true"
class="pointer-events-none absolute inset-y-0 right-0 left-11 overflow-hidden py-3 pr-3 pl-3 whitespace-pre"
>
<div :style="`transform:translate(${-scrolled.left}px,${-scrolled.top}px)`">
<div v-for="line in lines" :key="line.number" class="min-h-6">
<span
v-for="(token, i) in line.tokens"
:key="i"
:class="yamlTokenClass(token.kind)"
>{{ token.text }}</span
>
</div>
</div>
</div>
<Textarea
id="workflow-yaml"
aria-label="Workflow YAML"
v-model="yaml"
name="workflow-yaml"
required
class="relative min-h-96 resize-y rounded-none border-0 bg-transparent py-3 pr-3 pl-14 text-[13px] leading-6 text-transparent caret-foreground shadow-none md:text-[13px] focus-visible:ring-0"
spellcheck="false"
wrap="off"
@scroll="syncScroll"
/>
</div>
</TabsContent>
</Tabs>
<p v-if="localError || state.error" class="text-sm text-danger" role="alert">
{{ localError || state.error }}
</p>
<AlertDialog v-model:open="confirmDelete">
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete the {{ selected }} workflow?</AlertDialogTitle>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction variant="destructive" @click="remove">Delete</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</form>
</template>