chore(workflow): remove the needs block (#1888)
This commit is contained in:
5 files changed
+106
-53
No files matched your search
@@ -2,12 +2,10 @@
|
||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { computed, ref, onMounted } from "vue";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { api } from "@/lib/api";
|
||||
import type { Identity } from "@/stores/org";
|
||||
import { useOrgStore } from "@/stores/org";
|
||||
@@ -66,14 +64,6 @@ const MODES = [
|
||||
{ value: "none", label: "None", hint: "Scratch workspace, no clone" },
|
||||
];
|
||||
const repository = computed(() => text("repository") || "required");
|
||||
|
||||
// needs is the workflow's declared harness requirements: captures (a stage
|
||||
// returns structured output through capture tools) and the largest gate-retry
|
||||
// budget any stage declares.
|
||||
const needs = computed<{ captures?: boolean; gate_retries?: number }>(() => {
|
||||
const value = workflowField(props.yaml, "needs");
|
||||
return value && typeof value === "object" ? (value as { captures?: boolean; gate_retries?: number }) : {};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -111,21 +101,6 @@ const needs = computed<{ captures?: boolean; gate_retries?: number }>(() => {
|
||||
<ToggleGroupItem v-for="mode in MODES" :key="mode.value" :value="mode.value" :title="mode.hint">{{ mode.label }}</ToggleGroupItem>
|
||||
</ToggleGroup>
|
||||
</div>
|
||||
<Label class="flex min-h-10 items-center gap-3 px-3 py-1.5">
|
||||
<span class="flex-1 text-label" title="Stages return structured output through capture tools">Captures</span>
|
||||
<Switch :model-value="needs.captures === true" @update:model-value="set('needs', { ...needs, captures: $event || undefined })" />
|
||||
</Label>
|
||||
<Label class="flex min-h-10 items-center gap-3 px-3 py-1.5">
|
||||
<span class="flex-1 text-label">Gate retries</span>
|
||||
<Input
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="0"
|
||||
class="h-8 w-20 text-right text-label"
|
||||
:model-value="needs.gate_retries ?? ''"
|
||||
@update:model-value="(value) => set('needs', { ...needs, gate_retries: String(value) === '' ? undefined : Number(String(value)) })"
|
||||
/>
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
<section class="space-y-1.5">
|
||||
|
||||
Reference in new issue
Block a user