@arbidocs/blocks 0.4.76 → 0.4.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/index.cjs +346 -258
- package/dist/agents/index.js +5 -5
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
- package/dist/agents/tasks/WorkflowThreadStrip.d.ts +15 -4
- package/dist/agents/workflows/SchemaForm.d.ts +6 -1
- package/dist/agents/workflows/StepBarFrame.d.ts +75 -0
- package/dist/agents/workflows/StepParts.d.ts +109 -0
- package/dist/agents/workflows/WorkflowRunner.d.ts +15 -2
- package/dist/agents/workflows/WorkflowStepBar.d.ts +9 -11
- package/dist/agents/workflows/index.d.ts +5 -2
- package/dist/agents/workflows/planSteps.d.ts +8 -1
- package/dist/agents/workflows/run.d.ts +61 -8
- package/dist/agents/workflows/stepWindow.d.ts +59 -0
- package/dist/agents/workflows/types.d.ts +133 -4
- package/dist/agents/workflows/useWorkflowPreview.d.ts +2 -1
- package/dist/agents/workflows/useWorkflowView.d.ts +19 -0
- package/dist/chat/ChatPage.d.ts +1 -1
- package/dist/chat/WorkflowStepChip.d.ts +24 -0
- package/dist/chat/chat-page-types.d.ts +9 -0
- package/dist/chat/index.cjs +130 -122
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/index.js +2 -2
- package/dist/{chunk-TKB7TVMW.js → chunk-5OC5CGYX.js} +168 -100
- package/dist/chunk-5OC5CGYX.js.map +1 -0
- package/dist/{chunk-ZWA7UUZL.cjs → chunk-7YUFMNFW.cjs} +2 -54
- package/dist/chunk-7YUFMNFW.cjs.map +1 -0
- package/dist/chunk-A24C6BNA.js +92 -0
- package/dist/chunk-A24C6BNA.js.map +1 -0
- package/dist/chunk-AINNADMT.cjs +62 -0
- package/dist/chunk-AINNADMT.cjs.map +1 -0
- package/dist/chunk-CWAZNXC5.js +441 -0
- package/dist/chunk-CWAZNXC5.js.map +1 -0
- package/dist/{chunk-UIWLDSTF.js → chunk-EWSEQEPL.js} +71 -7
- package/dist/chunk-EWSEQEPL.js.map +1 -0
- package/dist/chunk-FE4ULGOR.js +151 -0
- package/dist/chunk-FE4ULGOR.js.map +1 -0
- package/dist/chunk-FT5FFXSJ.js +60 -0
- package/dist/chunk-FT5FFXSJ.js.map +1 -0
- package/dist/{chunk-WJEKRSPH.js → chunk-ICBAFX5B.js} +3 -3
- package/dist/{chunk-WJEKRSPH.js.map → chunk-ICBAFX5B.js.map} +1 -1
- package/dist/{chunk-7CVF3DK2.cjs → chunk-IF6VAYIA.cjs} +5 -5
- package/dist/{chunk-7CVF3DK2.cjs.map → chunk-IF6VAYIA.cjs.map} +1 -1
- package/dist/chunk-MLAHDAN5.cjs +450 -0
- package/dist/chunk-MLAHDAN5.cjs.map +1 -0
- package/dist/{chunk-IPGKTUF7.cjs → chunk-MP6FK43E.cjs} +71 -5
- package/dist/chunk-MP6FK43E.cjs.map +1 -0
- package/dist/{chunk-5EBGRG3X.js → chunk-OPA2Y6YZ.js} +3 -54
- package/dist/chunk-OPA2Y6YZ.js.map +1 -0
- package/dist/{chunk-7FKARMA3.cjs → chunk-SSDISIDW.cjs} +190 -122
- package/dist/chunk-SSDISIDW.cjs.map +1 -0
- package/dist/chunk-TZR36PPP.cjs +95 -0
- package/dist/chunk-TZR36PPP.cjs.map +1 -0
- package/dist/chunk-VFIZYSZB.cjs +2783 -0
- package/dist/chunk-VFIZYSZB.cjs.map +1 -0
- package/dist/chunk-WXRCMIAE.js +2707 -0
- package/dist/chunk-WXRCMIAE.js.map +1 -0
- package/dist/{chunk-HITAN7JF.cjs → chunk-XMBYDLZQ.cjs} +4 -4
- package/dist/{chunk-HITAN7JF.cjs.map → chunk-XMBYDLZQ.cjs.map} +1 -1
- package/dist/{chunk-MK6NJQGF.js → chunk-XQDM6T6C.js} +3 -3
- package/dist/{chunk-MK6NJQGF.js.map → chunk-XQDM6T6C.js.map} +1 -1
- package/dist/chunk-ZVBPRMHJ.cjs +153 -0
- package/dist/chunk-ZVBPRMHJ.cjs.map +1 -0
- package/dist/connect/docx.cjs +10 -88
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +6 -86
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +468 -49
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +2 -0
- package/dist/connect/index.js +454 -37
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedTagMatrix.d.ts +20 -0
- package/dist/connection/ConnectedWorkflowRunner.d.ts +28 -2
- package/dist/connection/WorkflowRunThread.d.ts +21 -0
- package/dist/connection/WorkflowRunnerDialogs.d.ts +37 -0
- package/dist/connection/useWorkflowThread.d.ts +12 -0
- package/dist/document-tools/index.cjs +7 -143
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +5 -144
- package/dist/document-tools/index.js.map +1 -1
- package/dist/docx/index.cjs +18 -17
- package/dist/docx/index.cjs.map +1 -1
- package/dist/docx/index.js +3 -2
- package/dist/docx/index.js.map +1 -1
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +560 -431
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +4 -4
- package/dist/studio/index.js +3 -3
- package/dist/tags/TagMatrix.d.ts +64 -0
- package/dist/tags/index.d.ts +3 -0
- package/dist/tags/tagMatrixModel.d.ts +39 -0
- package/dist/workflow-canvas/StepActionSettings.d.ts +132 -0
- package/dist/workflow-canvas/StepInspector.d.ts +25 -2
- package/dist/workflow-canvas/WorkflowBuilder.d.ts +11 -3
- package/dist/workflow-canvas/WorkflowCanvas.d.ts +27 -2
- package/dist/workflow-canvas/edit.d.ts +9 -1
- package/dist/workflow-canvas/index.cjs +882 -102
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +849 -69
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +4 -4
- package/src/workflow-canvas/canvas.css +9 -0
- package/dist/chunk-22P5KNIM.js +0 -1422
- package/dist/chunk-22P5KNIM.js.map +0 -1
- package/dist/chunk-5EBGRG3X.js.map +0 -1
- package/dist/chunk-7FKARMA3.cjs.map +0 -1
- package/dist/chunk-IPGKTUF7.cjs.map +0 -1
- package/dist/chunk-TKB7TVMW.js.map +0 -1
- package/dist/chunk-UIWLDSTF.js.map +0 -1
- package/dist/chunk-VYRKO3XU.cjs +0 -1469
- package/dist/chunk-VYRKO3XU.cjs.map +0 -1
- package/dist/chunk-ZWA7UUZL.cjs.map +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { DocumentPicker, TriStateFilterMenu, MultiSelect } from './chunk-CKB64Z4R.js';
|
|
3
3
|
import { EmptyState } from './chunk-P6GHJSLR.js';
|
|
4
|
-
import { defaultInputs, validateInputs, SchemaForm, isWorkflowScope, fieldToFrontmatter, workflowFromFrontmatter, workflowSteps, initialRunInputs, stepPhase, composeStepPrompt, useWorkflowView, composeWorkflowPrompt, isRunFinished, buildLaunch } from './chunk-
|
|
4
|
+
import { defaultInputs, validateInputs, SchemaForm, isWorkflowScope, fieldToFrontmatter, workflowFromFrontmatter, workflowSteps, initialRunInputs, stepPhase, composeStepPrompt, useWorkflowView, composeWorkflowPrompt, isRunFinished, StepBarFrame, stepLevels, buildLaunch, PhaseMark, STEP_LABEL, STEP_EXTRA, STEP_PILL, stepPillTone } from './chunk-WXRCMIAE.js';
|
|
5
5
|
import { TabHeader } from './chunk-4WWM3GQ5.js';
|
|
6
|
+
import { QuickActionDialogHeader, AddFilesFirst, ScopePicker, StartTiles } from './chunk-DDF5GPIJ.js';
|
|
7
|
+
import { FoldSection } from './chunk-XD2M6LIG.js';
|
|
6
8
|
import { CellHoverIcon } from './chunk-RFXJYIDV.js';
|
|
7
9
|
import { ToneBadge } from './chunk-DPLRHEJZ.js';
|
|
8
10
|
import { SelectionBar, SelectionBarAction } from './chunk-NUNKSZKU.js';
|
|
9
11
|
import { FilterInput } from './chunk-YU2KUMGE.js';
|
|
10
12
|
import { GridView } from './chunk-ZPLG7QYF.js';
|
|
11
|
-
import { QuickActionDialogHeader, AddFilesFirst, ScopePicker, StartTiles } from './chunk-DDF5GPIJ.js';
|
|
12
|
-
import { FoldSection } from './chunk-XD2M6LIG.js';
|
|
13
13
|
import { ActionLink } from './chunk-S7PSMMRG.js';
|
|
14
|
-
import { useBlocksEnvironment } from './chunk-76JDDMSP.js';
|
|
15
14
|
import { useMentionAutocomplete } from './chunk-HOXKR26S.js';
|
|
16
15
|
import { toMessageMentions, extractMentions, MentionMenu } from './chunk-AA3PT6KR.js';
|
|
17
16
|
import { useIsPhone } from './chunk-SLSBJRWW.js';
|
|
17
|
+
import { useBlocksEnvironment } from './chunk-76JDDMSP.js';
|
|
18
18
|
import { formatCount, initials } from './chunk-OXF2IFXG.js';
|
|
19
19
|
import { ModalHeader } from './chunk-TX2ZICS7.js';
|
|
20
20
|
import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
|
|
21
21
|
import { memo, forwardRef, useState, useMemo, useId, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
|
|
22
22
|
import { cn, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Textarea, Input, Switch, Button, Collapsible, CollapsibleTrigger, CollapsibleContent, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Tooltip, TooltipTrigger, TooltipContent, Badge, Slider, UserEntity, getEntityColorStyles, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, VisibilityToggle, EntityPill, ThreadVisibilityIcon, DialogClose, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandItem, DropdownMenuSeparator, badgeVariants, Checkbox } from '@arbidocs/react/ui';
|
|
23
23
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
24
|
-
import { ChevronDown, ChevronRight, Plus, Trash2, Loader2, Play, MessageSquare, Eye, ClipboardList, Pencil, Copy, Bot, Sparkles, Wand2, X, Globe, Download, Lock, ListChecks, AlertTriangle, FileX, SkipForward, Check, FileText, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, MoreHorizontal, CalendarClock, History, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, LayoutGrid, List, CornerLeftUp, CircleDashed, RotateCcw, ListPlus, Link2, Clock, Bell, MousePointerClick, ArrowUpRight, Flag, UserRoundCog, MessageSquareReply,
|
|
24
|
+
import { ChevronDown, ChevronRight, Plus, Trash2, Loader2, Play, MessageSquare, Eye, ClipboardList, Pencil, Copy, Bot, Sparkles, Wand2, X, Globe, Download, Lock, ListChecks, AlertTriangle, FileX, SkipForward, Check, FileText, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, MoreHorizontal, CalendarClock, History, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, LayoutGrid, List, CornerLeftUp, CornerUpLeft, UserRound, CircleDashed, RotateCcw, ListPlus, Link2, Clock, Bell, MousePointerClick, ArrowUpRight, BellRing, PenLine, Flag, UserRoundCog, MessageSquareReply, Zap } from 'lucide-react';
|
|
25
25
|
|
|
26
26
|
function useControllableState(value, defaultValue, onChange) {
|
|
27
27
|
const [inner, setInner] = useState(defaultValue);
|
|
@@ -565,15 +565,20 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
565
565
|
}, []);
|
|
566
566
|
useEffect(() => {
|
|
567
567
|
if (Object.values(states).some((s) => s.status === "running")) return;
|
|
568
|
-
const next = steps.find(
|
|
569
|
-
|
|
570
|
-
|
|
568
|
+
const next = steps.find(
|
|
569
|
+
(s) => (s.kind === "agent" || s.kind === "action") && stepPhase(steps, states, s.id) === "ready"
|
|
570
|
+
);
|
|
571
|
+
if (!next || next.kind !== "agent" && next.kind !== "action") return;
|
|
572
|
+
const prompt = next.kind === "agent" ? composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
|
|
571
573
|
set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
572
574
|
timers.current.set(
|
|
573
575
|
next.id,
|
|
574
576
|
setTimeout(() => {
|
|
575
577
|
timers.current.delete(next.id);
|
|
576
|
-
set(
|
|
578
|
+
set(
|
|
579
|
+
next.id,
|
|
580
|
+
next.kind === "agent" ? { status: "done", text: answer.replace("{prompt}", prompt) } : { status: "done" }
|
|
581
|
+
);
|
|
577
582
|
}, delayMs)
|
|
578
583
|
);
|
|
579
584
|
}, [states, steps, workflow]);
|
|
@@ -6212,6 +6217,11 @@ var ICONS = {
|
|
|
6212
6217
|
step_skipped: /* @__PURE__ */ jsx(RotateCcw, { className: "size-3.5", "aria-hidden": true }),
|
|
6213
6218
|
step_failed: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3.5", "aria-hidden": true }),
|
|
6214
6219
|
step_signal: /* @__PURE__ */ jsx(Flag, { className: "size-3.5", "aria-hidden": true }),
|
|
6220
|
+
step_waiting: /* @__PURE__ */ jsx(Hourglass, { className: "size-3.5", "aria-hidden": true }),
|
|
6221
|
+
step_progress: /* @__PURE__ */ jsx(PenLine, { className: "size-3.5", "aria-hidden": true }),
|
|
6222
|
+
step_sent_back: /* @__PURE__ */ jsx(CornerUpLeft, { className: "size-3.5", "aria-hidden": true }),
|
|
6223
|
+
step_ready: /* @__PURE__ */ jsx(BellRing, { className: "size-3.5", "aria-hidden": true }),
|
|
6224
|
+
step_reminded: /* @__PURE__ */ jsx(BellRing, { className: "size-3.5", "aria-hidden": true }),
|
|
6215
6225
|
linked_run: /* @__PURE__ */ jsx(ArrowUpRight, { className: "size-3.5", "aria-hidden": true })
|
|
6216
6226
|
};
|
|
6217
6227
|
var asString = (v) => typeof v === "string" && v.trim() ? v : null;
|
|
@@ -6257,6 +6267,16 @@ function TaskActivityTimeline({
|
|
|
6257
6267
|
return { headline: "Step done" };
|
|
6258
6268
|
case "step_skipped":
|
|
6259
6269
|
return { headline: "Step skipped" };
|
|
6270
|
+
case "step_waiting":
|
|
6271
|
+
return { headline: "Waiting on people" };
|
|
6272
|
+
case "step_progress":
|
|
6273
|
+
return { headline: detail.signed ? "Signed" : "Step moved on" };
|
|
6274
|
+
case "step_sent_back":
|
|
6275
|
+
return { headline: "Sent the work back" };
|
|
6276
|
+
case "step_ready":
|
|
6277
|
+
return { headline: "Told whose turn it is" };
|
|
6278
|
+
case "step_reminded":
|
|
6279
|
+
return { headline: "Sent a reminder" };
|
|
6260
6280
|
case "step_signal":
|
|
6261
6281
|
return { headline: `Signalled \u201C${asString(detail.signal) ?? "a signal"}\u201D` };
|
|
6262
6282
|
case "linked_run":
|
|
@@ -6467,7 +6487,13 @@ function ThreadActivity({ item, children }) {
|
|
|
6467
6487
|
}
|
|
6468
6488
|
) });
|
|
6469
6489
|
}
|
|
6470
|
-
var STEP_KINDS = /* @__PURE__ */ new Set([
|
|
6490
|
+
var STEP_KINDS = /* @__PURE__ */ new Set([
|
|
6491
|
+
"step_started",
|
|
6492
|
+
"step_waiting",
|
|
6493
|
+
"step_done",
|
|
6494
|
+
"step_skipped",
|
|
6495
|
+
"step_failed"
|
|
6496
|
+
]);
|
|
6471
6497
|
function groupThreadActivity(steps, items) {
|
|
6472
6498
|
const out = { before: [], byStep: {}, after: [] };
|
|
6473
6499
|
const states = {};
|
|
@@ -6476,7 +6502,7 @@ function groupThreadActivity(steps, items) {
|
|
|
6476
6502
|
if (item.kind && STEP_KINDS.has(item.kind) && item.step) {
|
|
6477
6503
|
current = item.step;
|
|
6478
6504
|
states[item.step] = {
|
|
6479
|
-
status: item.kind === "step_started" ? "running" : item.kind === "step_done" ? "done" : item.kind === "step_skipped" ? "skipped" : "failed"
|
|
6505
|
+
status: item.kind === "step_started" ? "running" : item.kind === "step_waiting" ? "waiting" : item.kind === "step_done" ? "done" : item.kind === "step_skipped" ? "skipped" : "failed"
|
|
6480
6506
|
};
|
|
6481
6507
|
continue;
|
|
6482
6508
|
}
|
|
@@ -6496,7 +6522,9 @@ var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
|
|
|
6496
6522
|
skip: "Skip this step",
|
|
6497
6523
|
startedBy: "Started by {step} in {thread}",
|
|
6498
6524
|
signalled: "This step signalled \u201C{signal}\u201D",
|
|
6499
|
-
linkedRun: "Started on \u201C{signal}\u201D: open its thread"
|
|
6525
|
+
linkedRun: "Started on \u201C{signal}\u201D: open its thread",
|
|
6526
|
+
waitingFor: "Waiting for {name}",
|
|
6527
|
+
sentBack: "Sent back to be done again"
|
|
6500
6528
|
};
|
|
6501
6529
|
function WorkflowThreadStartedBy({
|
|
6502
6530
|
origin,
|
|
@@ -6551,13 +6579,6 @@ function SignalPill({ signal, l }) {
|
|
|
6551
6579
|
}
|
|
6552
6580
|
);
|
|
6553
6581
|
}
|
|
6554
|
-
function Mark({ phase, icon }) {
|
|
6555
|
-
if (phase === "done") return /* @__PURE__ */ jsx(Check, { className: "size-3.5" });
|
|
6556
|
-
if (phase === "running") return /* @__PURE__ */ jsx(Loader2, { className: "size-3.5 animate-spin" });
|
|
6557
|
-
if (phase === "failed") return /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3.5" });
|
|
6558
|
-
if (phase === "skipped") return /* @__PURE__ */ jsx(MinusCircle, { className: "size-3.5" });
|
|
6559
|
-
return icon ? /* @__PURE__ */ jsx("span", { className: "flex size-3.5 items-center justify-center [&_svg]:size-3.5", children: icon }) : /* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-current" });
|
|
6560
|
-
}
|
|
6561
6582
|
function Entry({ item }) {
|
|
6562
6583
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6563
6584
|
/* @__PURE__ */ jsx("span", { className: "shrink-0", children: item.avatar }),
|
|
@@ -6593,93 +6614,137 @@ function WorkflowThreadStrip({
|
|
|
6593
6614
|
renderStepAction,
|
|
6594
6615
|
signals = [],
|
|
6595
6616
|
startedBy,
|
|
6617
|
+
assigneeOf,
|
|
6596
6618
|
labels,
|
|
6619
|
+
barLabels,
|
|
6597
6620
|
className
|
|
6598
6621
|
}) {
|
|
6599
6622
|
const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
|
|
6600
6623
|
const grouped = groupThreadActivity(steps, items);
|
|
6601
6624
|
const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
|
|
6602
6625
|
const chevron = /* @__PURE__ */ jsx(ChevronRight, { className: "size-3 shrink-0 text-muted-foreground" });
|
|
6603
|
-
|
|
6604
|
-
|
|
6626
|
+
const [selected, setSelected] = useState(null);
|
|
6627
|
+
const [open, setOpen] = useState(null);
|
|
6628
|
+
const phaseOf = (id) => stepPhase(steps, states, id);
|
|
6629
|
+
const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
|
|
6630
|
+
const waitingOf = (id) => {
|
|
6631
|
+
const step = steps.find((s) => s.id === id);
|
|
6632
|
+
const phase = phaseOf(id);
|
|
6633
|
+
const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
|
|
6634
|
+
return name ? l.waitingFor.replace("{name}", name) : void 0;
|
|
6635
|
+
};
|
|
6636
|
+
const pill = (step, isCurrent, narrow = false) => {
|
|
6637
|
+
const phase = phaseOf(step.id);
|
|
6638
|
+
const happened = grouped.byStep[step.id] ?? [];
|
|
6639
|
+
const assignee = phase === "ready" || phase === "waiting" ? assigneeOf?.(step) : void 0;
|
|
6640
|
+
const waiting = assignee ? l.waitingFor.replace("{name}", assignee) : void 0;
|
|
6641
|
+
const sentBack = states[step.id]?.sentBack;
|
|
6642
|
+
return /* @__PURE__ */ jsxs(Popover, { open: open === step.id, onOpenChange: (o) => setOpen(o ? step.id : null), children: [
|
|
6643
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
6644
|
+
"button",
|
|
6645
|
+
{
|
|
6646
|
+
type: "button",
|
|
6647
|
+
className: cn(STEP_PILL, "py-0.5", stepPillTone(phase, isCurrent)),
|
|
6648
|
+
"aria-current": isCurrent ? "step" : void 0,
|
|
6649
|
+
title: waiting ? `${step.title} \xB7 ${waiting}` : step.title,
|
|
6650
|
+
"data-phase": phase,
|
|
6651
|
+
"data-testid": `workflow-thread-step-${step.id}`,
|
|
6652
|
+
children: [
|
|
6653
|
+
/* @__PURE__ */ jsx(PhaseMark, { phase, icon: iconOf(step) }),
|
|
6654
|
+
/* @__PURE__ */ jsx("span", { className: cn(STEP_LABEL, isCurrent ? "max-w-[16rem]" : "max-w-[11rem]"), children: step.title }),
|
|
6655
|
+
sentBack && /* @__PURE__ */ jsx(
|
|
6656
|
+
CornerUpLeft,
|
|
6657
|
+
{
|
|
6658
|
+
className: "size-3 shrink-0 text-amber-600 dark:text-amber-400",
|
|
6659
|
+
"aria-label": l.sentBack,
|
|
6660
|
+
"data-testid": `workflow-thread-step-${step.id}-sent-back`
|
|
6661
|
+
}
|
|
6662
|
+
),
|
|
6663
|
+
assignee && isCurrent && !narrow && /* @__PURE__ */ jsxs(
|
|
6664
|
+
"span",
|
|
6665
|
+
{
|
|
6666
|
+
className: cn(STEP_EXTRA, "flex max-w-[12rem] items-center gap-0.5"),
|
|
6667
|
+
title: waiting,
|
|
6668
|
+
"data-testid": `workflow-thread-step-${step.id}-assignee`,
|
|
6669
|
+
children: [
|
|
6670
|
+
/* @__PURE__ */ jsx(UserRound, { className: "size-3 shrink-0" }),
|
|
6671
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: waiting })
|
|
6672
|
+
]
|
|
6673
|
+
}
|
|
6674
|
+
),
|
|
6675
|
+
happened.length > 0 && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-full bg-muted px-1.5 text-[10px] font-normal text-muted-foreground", children: happened.length })
|
|
6676
|
+
]
|
|
6677
|
+
}
|
|
6678
|
+
) }),
|
|
6679
|
+
/* @__PURE__ */ jsxs(
|
|
6680
|
+
PopoverContent,
|
|
6681
|
+
{
|
|
6682
|
+
align: "start",
|
|
6683
|
+
className: "w-72 space-y-1 p-2",
|
|
6684
|
+
"data-testid": `workflow-thread-step-${step.id}-menu`,
|
|
6685
|
+
children: [
|
|
6686
|
+
/* @__PURE__ */ jsx("p", { className: "px-1 text-xs font-semibold", children: step.title }),
|
|
6687
|
+
assignee && /* @__PURE__ */ jsx("p", { className: "px-1 text-xs", "data-testid": `workflow-thread-step-${step.id}-waiting-for`, children: waiting }),
|
|
6688
|
+
sentBack && /* @__PURE__ */ jsx("p", { className: "px-1 text-xs text-amber-700 dark:text-amber-300", children: l.sentBack }),
|
|
6689
|
+
/* @__PURE__ */ jsx("p", { className: "px-1 text-xs font-medium text-muted-foreground", children: happened.length ? l.happened.replace("{count}", String(happened.length)) : l.nothingYet }),
|
|
6690
|
+
happened.map((item) => /* @__PURE__ */ jsx(Entry, { item }, item.id)),
|
|
6691
|
+
renderStepAction?.(step, phase),
|
|
6692
|
+
onSkip && ["ready", "blocked", "failed", "waiting"].includes(phase) && /* @__PURE__ */ jsx(
|
|
6693
|
+
"button",
|
|
6694
|
+
{
|
|
6695
|
+
type: "button",
|
|
6696
|
+
onClick: () => onSkip(step.id),
|
|
6697
|
+
className: "w-full rounded-md px-1 py-1 text-left text-xs text-muted-foreground hover:bg-accent",
|
|
6698
|
+
"data-testid": `workflow-thread-step-${step.id}-skip`,
|
|
6699
|
+
children: l.skip
|
|
6700
|
+
}
|
|
6701
|
+
)
|
|
6702
|
+
]
|
|
6703
|
+
}
|
|
6704
|
+
)
|
|
6705
|
+
] });
|
|
6706
|
+
};
|
|
6707
|
+
const leading = startedBy || grouped.before.length ? /* @__PURE__ */ jsxs("ol", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6708
|
+
startedBy && /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6709
|
+
/* @__PURE__ */ jsx(WorkflowThreadStartedBy, { origin: startedBy, labels }),
|
|
6710
|
+
chevron
|
|
6711
|
+
] }),
|
|
6712
|
+
grouped.before.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6713
|
+
/* @__PURE__ */ jsx(Entry, { item }),
|
|
6714
|
+
chevron
|
|
6715
|
+
] }, item.id))
|
|
6716
|
+
] }) : null;
|
|
6717
|
+
const trailing = grouped.after.length || strays.length ? /* @__PURE__ */ jsxs("ol", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6718
|
+
grouped.after.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6719
|
+
chevron,
|
|
6720
|
+
/* @__PURE__ */ jsx(Entry, { item })
|
|
6721
|
+
] }, item.id)),
|
|
6722
|
+
strays.map((s) => /* @__PURE__ */ jsx("li", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ jsx(SignalPill, { signal: s, l }) }, `${s.step}-${s.signal}`))
|
|
6723
|
+
] }) : null;
|
|
6724
|
+
return /* @__PURE__ */ jsx("div", { className: cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsx(
|
|
6725
|
+
StepBarFrame,
|
|
6605
6726
|
{
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
className: cn(
|
|
6626
|
-
"flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-medium",
|
|
6627
|
-
phase === "running" || phase === "ready" ? "border-primary bg-primary/10 text-primary" : phase === "done" || phase === "skipped" ? "border-primary/30 text-primary" : phase === "failed" ? "border-destructive/40 text-destructive" : "border-dashed border-border text-muted-foreground"
|
|
6628
|
-
),
|
|
6629
|
-
"data-phase": phase,
|
|
6630
|
-
"data-testid": `workflow-thread-step-${step.id}`,
|
|
6631
|
-
children: [
|
|
6632
|
-
/* @__PURE__ */ jsx(
|
|
6633
|
-
Mark,
|
|
6634
|
-
{
|
|
6635
|
-
phase,
|
|
6636
|
-
icon: step.icon && renderIcon ? renderIcon(step.icon) : void 0
|
|
6637
|
-
}
|
|
6638
|
-
),
|
|
6639
|
-
step.title,
|
|
6640
|
-
happened.length > 0 && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 text-[10px] text-muted-foreground", children: happened.length })
|
|
6641
|
-
]
|
|
6642
|
-
}
|
|
6643
|
-
);
|
|
6644
|
-
return /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6645
|
-
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
6646
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { type: "button", className: "rounded-full", children: chip }) }),
|
|
6647
|
-
/* @__PURE__ */ jsxs(
|
|
6648
|
-
PopoverContent,
|
|
6649
|
-
{
|
|
6650
|
-
align: "start",
|
|
6651
|
-
className: "w-72 space-y-1 p-2",
|
|
6652
|
-
"data-testid": `workflow-thread-step-${step.id}-menu`,
|
|
6653
|
-
children: [
|
|
6654
|
-
/* @__PURE__ */ jsx("p", { className: "px-1 text-xs font-medium text-muted-foreground", children: happened.length ? l.happened.replace("{count}", String(happened.length)) : l.nothingYet }),
|
|
6655
|
-
happened.map((item) => /* @__PURE__ */ jsx(Entry, { item }, item.id)),
|
|
6656
|
-
renderStepAction?.(step, phase),
|
|
6657
|
-
onSkip && ["ready", "blocked", "failed"].includes(phase) && /* @__PURE__ */ jsx(
|
|
6658
|
-
"button",
|
|
6659
|
-
{
|
|
6660
|
-
type: "button",
|
|
6661
|
-
onClick: () => onSkip(step.id),
|
|
6662
|
-
className: "w-full rounded-md px-1 py-1 text-left text-xs text-muted-foreground hover:bg-accent",
|
|
6663
|
-
"data-testid": `workflow-thread-step-${step.id}-skip`,
|
|
6664
|
-
children: l.skip
|
|
6665
|
-
}
|
|
6666
|
-
)
|
|
6667
|
-
]
|
|
6668
|
-
}
|
|
6669
|
-
)
|
|
6670
|
-
] }),
|
|
6671
|
-
signals.filter((s) => s.step === step.id).map((s) => /* @__PURE__ */ jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`)),
|
|
6672
|
-
(i < steps.length - 1 || grouped.after.length > 0 || strays.length > 0) && chevron
|
|
6673
|
-
] }, step.id);
|
|
6674
|
-
}),
|
|
6675
|
-
grouped.after.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6676
|
-
/* @__PURE__ */ jsx(Entry, { item }),
|
|
6677
|
-
(i < grouped.after.length - 1 || strays.length > 0) && chevron
|
|
6678
|
-
] }, item.id)),
|
|
6679
|
-
strays.map((s) => /* @__PURE__ */ jsx("li", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ jsx(SignalPill, { signal: s, l }) }, `${s.step}-${s.signal}`))
|
|
6680
|
-
] })
|
|
6727
|
+
levels: stepLevels(steps),
|
|
6728
|
+
phaseOf,
|
|
6729
|
+
current: selected,
|
|
6730
|
+
onSelect: (id) => {
|
|
6731
|
+
setSelected(id);
|
|
6732
|
+
setOpen(id);
|
|
6733
|
+
},
|
|
6734
|
+
renderStep: (step, _level, win, narrow) => pill(
|
|
6735
|
+
step,
|
|
6736
|
+
step.id === win.levels[win.currentLevel]?.primary.id || step.id === selected,
|
|
6737
|
+
narrow
|
|
6738
|
+
),
|
|
6739
|
+
noteOf: waitingOf,
|
|
6740
|
+
renderAfter: (level) => signals.filter((s) => level.steps.some((step) => step.id === s.step)).map((s) => /* @__PURE__ */ jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`)),
|
|
6741
|
+
leading,
|
|
6742
|
+
trailing,
|
|
6743
|
+
icon: iconOf,
|
|
6744
|
+
labels: { waitingFor: l.waitingFor, ...barLabels },
|
|
6745
|
+
tid: (suffix) => `workflow-thread-${suffix}`
|
|
6681
6746
|
}
|
|
6682
|
-
);
|
|
6747
|
+
) });
|
|
6683
6748
|
}
|
|
6684
6749
|
|
|
6685
6750
|
// src/agents/tasks/linkedRuns.ts
|
|
@@ -6717,7 +6782,10 @@ var STEP_LABELS = {
|
|
|
6717
6782
|
step_started: "Step started",
|
|
6718
6783
|
step_done: "Step done",
|
|
6719
6784
|
step_skipped: "Step skipped",
|
|
6720
|
-
step_failed: "Step failed"
|
|
6785
|
+
step_failed: "Step failed",
|
|
6786
|
+
step_waiting: "Waiting",
|
|
6787
|
+
step_progress: "Signed",
|
|
6788
|
+
step_sent_back: "Sent back"
|
|
6721
6789
|
};
|
|
6722
6790
|
function compactThreadActivity(events) {
|
|
6723
6791
|
const result = [];
|
|
@@ -10006,5 +10074,5 @@ function AgentCreateView({
|
|
|
10006
10074
|
}
|
|
10007
10075
|
|
|
10008
10076
|
export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskActivityTimeline, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen };
|
|
10009
|
-
//# sourceMappingURL=chunk-
|
|
10010
|
-
//# sourceMappingURL=chunk-
|
|
10077
|
+
//# sourceMappingURL=chunk-5OC5CGYX.js.map
|
|
10078
|
+
//# sourceMappingURL=chunk-5OC5CGYX.js.map
|