feat(ui): start tasks from the dashboard and slim it to activity and setup

This commit is contained in:
sam committed 2026-10-14 23:28:37 +11:00
1 parent c1554d63c0
commit 88ef6ca5b2
23 files changed
+297 -487

No files matched your search

+6 -3
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { firstLine } from "./first-line";
import { computed, onMounted, ref, useId, watchEffect } from "vue";
import { ChevronRight } from "@lucide/vue";
import { RadioGroupItem, RadioGroupRoot } from "reka-ui";
@@ -30,6 +31,8 @@ import {
const props = defineProps<{
/** Starts this workflow, with no chooser. */ workflow?: string;
/** An unsaved definition of `workflow` to test-run instead of the stored one. */ draft?: string;
/** Preselected in the chooser, as the dashboard's quick start hands over. */ initialWorkflow?: string;
initialInstructions?: string;
}>();
const emit = defineEmits<{ started: [taskId: number]; cancel: [] }>();
const uid = useId();
@@ -57,9 +60,9 @@ identities.watchIdentities();
const actors = computed(() => identities.identities.filter((i) => i.kind !== "system" && i.lifecycle === "active"));
const repository = ref("");
const workflow = ref(props.workflow ?? "");
const title = ref("");
const instructions = ref("");
const workflow = ref(props.workflow ?? props.initialWorkflow ?? "");
const instructions = ref(props.initialInstructions ?? "");
const title = ref(firstLine(instructions.value));
const identity = ref("");
// One text field per declared input, by input name: the chosen workflow's
// declaration decides what is rendered and what the request carries.