import { Trash2 } from "lucide-react"; import { Button } from "@/shared/ui/button"; import { Input } from "@/shared/ui/input"; import { Textarea } from "@/shared/ui/textarea"; import { FieldLabel, FormSelect } from "./workflowFormPrimitives"; import { ACTION_LABELS, ACTION_TYPES } from "./workflowFormTypes"; import { WorkflowWebhookHeadersEditor } from "./WorkflowWebhookHeadersEditor"; import type { ActionType, StepFormState, TriggerType, } from "./workflowFormTypes"; function BackendSupportHint({ action }: { action: StepFormState["action"] }) { switch (action) { case "send_dm": return (

Backend note: `send_dm` is not executed yet, so runs fail at this step.

); case "set_channel_topic": return (

Backend note: `set_channel_topic` is not executed yet, so runs fail at this step.

); case "request_approval": return (

Backend note: approval gates still stop runs with WF-08; approval records are not persisted yet.

); default: return null; } } function StepConfigFields({ step, prefix, disabled, triggerType, onUpdate, }: { step: StepFormState; prefix: string; disabled?: boolean; triggerType: TriggerType; onUpdate: (step: StepFormState) => void; }) { switch (step.action) { case "delay": return (
Duration onUpdate({ ...step, duration: event.target.value }) } placeholder="e.g. 5s, 1m, 1h" value={step.duration ?? ""} />
); case "send_message": return (
Message text