diff --git a/ui/src/workflows/WorkflowEditor.vue b/ui/src/workflows/WorkflowEditor.vue index 61e77e3ed..b515c598e 100644 --- a/ui/src/workflows/WorkflowEditor.vue +++ b/ui/src/workflows/WorkflowEditor.vue @@ -10,7 +10,7 @@ import { AlertDialogTitle, } from "@/components/ui/alert-dialog"; import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue"; -import { CircleAlert, RotateCcw, Trash2 } from "@lucide/vue"; +import { CircleAlert, Copy, RotateCcw, Trash2 } from "@lucide/vue"; import { isSending, setTurnHooks } from "@/chat/state"; import { Button } from "@/components/ui/button"; @@ -69,6 +69,7 @@ const modelAliases = computed(() => const collection = computed(() => workflows.collection); // Which definition is open belongs to the page, which also lists them. const selected = defineModel("selected", { required: true }); +const emit = defineEmits<{ duplicate: [id: string] }>(); // Stage statistics are read by the page with the rest of the workflow stats. defineProps<{ stageStats: StageStats[]; statsKnown: boolean; statsError: string }>(); const id = ref(""); @@ -503,7 +504,7 @@ onBeforeUnmount(() => yamlObserver?.disconnect()); - + @@ -514,6 +515,7 @@ onBeforeUnmount(() => yamlObserver?.disconnect()); Version {{ watchedRevision.version }} Draft changes {{ changes.length }} Discard changes + Duplicate Delete workflow diff --git a/ui/src/workflows/WorkflowsPage.vue b/ui/src/workflows/WorkflowsPage.vue index 96752ff3e..81c193c23 100644 --- a/ui/src/workflows/WorkflowsPage.vue +++ b/ui/src/workflows/WorkflowsPage.vue @@ -19,7 +19,6 @@ import { DropdownMenuItem } from "@/components/ui/dropdown-menu"; import { MoreMenu } from "@/components/ui/more-menu"; import { Section } from "@/components/ui/section"; import { StatusDot } from "@/components/ui/status-dot"; -import { Switch } from "@/components/ui/switch"; import { api, describeError } from "@/lib/api"; import { errors } from "@/copy/errors"; import { keepValue } from "@/lib/keep-unchanged"; @@ -121,9 +120,6 @@ const provenance = computed(() => { if (shippedYAML === undefined) return "Custom"; return shippedYAML === storedYAML ? "" : "Edited"; }); -// A workflow the server does not list yet (a new, unsaved one) has no -// enabled state to show. -const enabled = computed(() => data.value.definitions?.find((d) => d.id === selected.value)?.enabled); async function setEnabled(id: string, value: boolean) { try { await api.workflowEnabled(id, value); @@ -228,6 +224,7 @@ const rate = (deliveredRuns = 0, total = 0) => (total ? deliveredRuns / total : {{ row.id }} Draft + Disabled {{ compact(row.avg_tokens) }} tok @@ -271,15 +268,12 @@ const rate = (deliveredRuns = 0, total = 0) => (total ? deliveredRuns / total : {{ provenance }} - + -