@arbidocs/blocks 0.4.74 → 0.4.76
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/README.md +2 -1
- package/dist/agents/index.cjs +267 -254
- package/dist/agents/index.js +5 -4
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
- package/dist/agents/tasks/WorkflowThreadStrip.d.ts +38 -1
- package/dist/agents/tasks/index.d.ts +2 -1
- package/dist/agents/tasks/linkedRuns.d.ts +31 -0
- package/dist/agents/workflows/index.d.ts +1 -1
- package/dist/agents/workflows/planSteps.d.ts +3 -1
- package/dist/agents/workflows/types.d.ts +27 -0
- package/dist/{chunk-YWYVIQ7T.js → chunk-22P5KNIM.js} +24 -4
- package/dist/chunk-22P5KNIM.js.map +1 -0
- package/dist/{chunk-5LP54CWR.cjs → chunk-7FKARMA3.cjs} +175 -69
- package/dist/chunk-7FKARMA3.cjs.map +1 -0
- package/dist/{chunk-IA7RTPT3.cjs → chunk-IXALYQT7.cjs} +2 -200
- package/dist/chunk-IXALYQT7.cjs.map +1 -0
- package/dist/chunk-NUNKSZKU.js +203 -0
- package/dist/chunk-NUNKSZKU.js.map +1 -0
- package/dist/{chunk-6OL5S7MJ.cjs → chunk-NYBIKDWI.cjs} +5 -2
- package/dist/chunk-NYBIKDWI.cjs.map +1 -0
- package/dist/{chunk-D46ZAPEE.js → chunk-R3PDNQYT.js} +5 -2
- package/dist/chunk-R3PDNQYT.js.map +1 -0
- package/dist/{chunk-KOSGX3UK.js → chunk-TKB7TVMW.js} +134 -30
- package/dist/chunk-TKB7TVMW.js.map +1 -0
- package/dist/chunk-V4ISCZJ7.cjs +207 -0
- package/dist/chunk-V4ISCZJ7.cjs.map +1 -0
- package/dist/{chunk-P2RBE3FD.cjs → chunk-VYRKO3XU.cjs} +24 -3
- package/dist/chunk-VYRKO3XU.cjs.map +1 -0
- package/dist/{chunk-BUHKUKKB.js → chunk-ZPLG7QYF.js} +4 -199
- package/dist/chunk-ZPLG7QYF.js.map +1 -0
- package/dist/connect/index.cjs +9 -9
- package/dist/connect/index.js +2 -2
- package/dist/databases/DatabaseColumnDialog.d.ts +43 -0
- package/dist/databases/DatabaseList.d.ts +28 -0
- package/dist/databases/DatabaseTable.d.ts +38 -0
- package/dist/databases/DatabaseToolbar.d.ts +38 -0
- package/dist/databases/NewDatabaseDialog.d.ts +25 -0
- package/dist/databases/SelectCellEditor.d.ts +6 -0
- package/dist/databases/SelectChip.d.ts +4 -0
- package/dist/databases/column-types.d.ts +58 -0
- package/dist/databases/databaseColumns.d.ts +28 -0
- package/dist/databases/index.cjs +1081 -0
- package/dist/databases/index.cjs.map +1 -0
- package/dist/databases/index.d.ts +13 -0
- package/dist/databases/index.js +1055 -0
- package/dist/databases/index.js.map +1 -0
- package/dist/facts/index.cjs +8 -7
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +4 -3
- package/dist/facts/index.js.map +1 -1
- package/dist/files/index.cjs +15 -14
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +5 -3
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +508 -495
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/shell/ActionCluster.d.ts +3 -1
- package/dist/shell/index.cjs +46 -46
- package/dist/shell/index.js +2 -2
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/workflow-canvas/SignalsEditor.d.ts +41 -0
- package/dist/workflow-canvas/StepInspector.d.ts +4 -1
- package/dist/workflow-canvas/TriggerInspector.d.ts +11 -2
- package/dist/workflow-canvas/WorkflowBuilder.d.ts +7 -2
- package/dist/workflow-canvas/index.cjs +445 -150
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.d.ts +2 -1
- package/dist/workflow-canvas/index.js +412 -124
- package/dist/workflow-canvas/index.js.map +1 -1
- package/dist/workflow-canvas/trigger.d.ts +20 -1
- package/package.json +9 -4
- package/dist/chunk-5LP54CWR.cjs.map +0 -1
- package/dist/chunk-6OL5S7MJ.cjs.map +0 -1
- package/dist/chunk-BUHKUKKB.js.map +0 -1
- package/dist/chunk-D46ZAPEE.js.map +0 -1
- package/dist/chunk-IA7RTPT3.cjs.map +0 -1
- package/dist/chunk-KOSGX3UK.js.map +0 -1
- package/dist/chunk-P2RBE3FD.cjs.map +0 -1
- package/dist/chunk-YWYVIQ7T.js.map +0 -1
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkYJQVLVBJ_cjs = require('./chunk-YJQVLVBJ.cjs');
|
|
5
5
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkVYRKO3XU_cjs = require('./chunk-VYRKO3XU.cjs');
|
|
7
7
|
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
8
8
|
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
9
9
|
var chunkVFUWWH52_cjs = require('./chunk-VFUWWH52.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkV4ISCZJ7_cjs = require('./chunk-V4ISCZJ7.cjs');
|
|
11
11
|
var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
|
|
12
|
+
var chunkIXALYQT7_cjs = require('./chunk-IXALYQT7.cjs');
|
|
12
13
|
var chunkZ5VUZ6YD_cjs = require('./chunk-Z5VUZ6YD.cjs');
|
|
13
14
|
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
14
15
|
var chunkOB5F4577_cjs = require('./chunk-OB5F4577.cjs');
|
|
16
|
+
var chunkC54XEN5T_cjs = require('./chunk-C54XEN5T.cjs');
|
|
15
17
|
var chunkB4SRYJLM_cjs = require('./chunk-B4SRYJLM.cjs');
|
|
16
18
|
var chunk7UTB4PHM_cjs = require('./chunk-7UTB4PHM.cjs');
|
|
17
19
|
var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
|
|
18
|
-
var chunkC54XEN5T_cjs = require('./chunk-C54XEN5T.cjs');
|
|
19
20
|
var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
|
|
20
21
|
var chunkULWRNGGE_cjs = require('./chunk-ULWRNGGE.cjs');
|
|
21
22
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
@@ -144,7 +145,7 @@ function WorkflowConfigDialog({
|
|
|
144
145
|
}) {
|
|
145
146
|
const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
|
|
146
147
|
const initialKey = JSON.stringify(initialInputs ?? {});
|
|
147
|
-
const seedKey = JSON.stringify({ ...
|
|
148
|
+
const seedKey = JSON.stringify({ ...chunkVYRKO3XU_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
|
|
148
149
|
const seed = react.useMemo(() => JSON.parse(seedKey), [seedKey]);
|
|
149
150
|
const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
|
|
150
151
|
const [agentId, setAgentId] = useControllableState(
|
|
@@ -156,7 +157,7 @@ function WorkflowConfigDialog({
|
|
|
156
157
|
if (open && inputsProp === void 0) setInputs(seed);
|
|
157
158
|
}, [open, seed]);
|
|
158
159
|
const setField = (name, value) => setInputs({ ...inputs, [name]: value });
|
|
159
|
-
const errors =
|
|
160
|
+
const errors = chunkVYRKO3XU_cjs.validateInputs(workflow, inputs);
|
|
160
161
|
const valid = Object.keys(errors).length === 0;
|
|
161
162
|
const visibleErrors = Object.fromEntries(
|
|
162
163
|
Object.entries(errors).filter(([, e]) => e !== "required")
|
|
@@ -169,7 +170,7 @@ function WorkflowConfigDialog({
|
|
|
169
170
|
const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
|
|
170
171
|
const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
|
|
171
172
|
const launch = (values) => {
|
|
172
|
-
Promise.resolve(onLaunch(
|
|
173
|
+
Promise.resolve(onLaunch(chunkVYRKO3XU_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
|
|
173
174
|
});
|
|
174
175
|
};
|
|
175
176
|
const submit = () => {
|
|
@@ -247,7 +248,7 @@ function WorkflowConfigDialog({
|
|
|
247
248
|
}
|
|
248
249
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
249
250
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
250
|
-
|
|
251
|
+
chunkVYRKO3XU_cjs.SchemaForm,
|
|
251
252
|
{
|
|
252
253
|
fields,
|
|
253
254
|
values: inputs,
|
|
@@ -325,7 +326,7 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
|
|
|
325
326
|
for (const field of workflow.inputs) {
|
|
326
327
|
if (field.type !== "scope") continue;
|
|
327
328
|
const raw = inputs[field.name];
|
|
328
|
-
const scope =
|
|
329
|
+
const scope = chunkVYRKO3XU_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
|
|
329
330
|
next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
|
|
330
331
|
}
|
|
331
332
|
return next;
|
|
@@ -367,9 +368,9 @@ function WorkflowLauncher({
|
|
|
367
368
|
};
|
|
368
369
|
const select = (workflow) => {
|
|
369
370
|
if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
|
|
370
|
-
const inputs =
|
|
371
|
-
if (Object.keys(
|
|
372
|
-
Promise.resolve(onLaunch(
|
|
371
|
+
const inputs = chunkVYRKO3XU_cjs.defaultInputs(workflow);
|
|
372
|
+
if (Object.keys(chunkVYRKO3XU_cjs.validateInputs(workflow, inputs)).length === 0) {
|
|
373
|
+
Promise.resolve(onLaunch(chunkVYRKO3XU_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
|
|
373
374
|
});
|
|
374
375
|
return;
|
|
375
376
|
}
|
|
@@ -505,7 +506,7 @@ function WorkflowDocumentsField({
|
|
|
505
506
|
|
|
506
507
|
// src/agents/workflows/skillMarkdown.ts
|
|
507
508
|
var JSON_KEYS = /* @__PURE__ */ new Set(["inputs"]);
|
|
508
|
-
var oneLine = (
|
|
509
|
+
var oneLine = (text2) => text2.replace(/\s*\n\s*/g, " ").trim();
|
|
509
510
|
var skillSlug = (raw) => raw.toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
510
511
|
function workflowToSkillMarkdown(workflow) {
|
|
511
512
|
const { run } = workflow;
|
|
@@ -519,15 +520,15 @@ function workflowToSkillMarkdown(workflow) {
|
|
|
519
520
|
if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
|
|
520
521
|
if (workflow.requiresFiles) lines.push("requires_files: true");
|
|
521
522
|
if (workflow.inputs.length > 0) {
|
|
522
|
-
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(
|
|
523
|
+
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkVYRKO3XU_cjs.fieldToFrontmatter))}`);
|
|
523
524
|
}
|
|
524
525
|
lines.push("---", "", run.promptTemplate.trim(), "");
|
|
525
526
|
return lines.join("\n");
|
|
526
527
|
}
|
|
527
|
-
function workflowFromSkillMarkdown(id,
|
|
528
|
-
const match = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(
|
|
528
|
+
function workflowFromSkillMarkdown(id, text2) {
|
|
529
|
+
const match = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(text2);
|
|
529
530
|
const frontmatter = {};
|
|
530
|
-
const body = match ? match[2] :
|
|
531
|
+
const body = match ? match[2] : text2;
|
|
531
532
|
for (const line of (match ? match[1] : "").split("\n")) {
|
|
532
533
|
const i = line.indexOf(":");
|
|
533
534
|
if (i < 1) continue;
|
|
@@ -541,11 +542,11 @@ function workflowFromSkillMarkdown(id, text) {
|
|
|
541
542
|
} else if (value === "true" || value === "false") frontmatter[key] = value === "true";
|
|
542
543
|
else frontmatter[key] = value;
|
|
543
544
|
}
|
|
544
|
-
return
|
|
545
|
+
return chunkVYRKO3XU_cjs.workflowFromFrontmatter(id, frontmatter, body);
|
|
545
546
|
}
|
|
546
547
|
function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
|
|
547
|
-
const steps =
|
|
548
|
-
const [inputs, setInputs] = react.useState(() =>
|
|
548
|
+
const steps = chunkVYRKO3XU_cjs.workflowSteps(workflow);
|
|
549
|
+
const [inputs, setInputs] = react.useState(() => chunkVYRKO3XU_cjs.initialRunInputs(workflow));
|
|
549
550
|
const [states, setStates] = react.useState({});
|
|
550
551
|
const set = (id, state) => setStates((s) => ({ ...s, [id]: state }));
|
|
551
552
|
const timers = react.useRef(/* @__PURE__ */ new Map());
|
|
@@ -566,9 +567,9 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
566
567
|
}, []);
|
|
567
568
|
react.useEffect(() => {
|
|
568
569
|
if (Object.values(states).some((s) => s.status === "running")) return;
|
|
569
|
-
const next = steps.find((s) => s.kind === "agent" &&
|
|
570
|
+
const next = steps.find((s) => s.kind === "agent" && chunkVYRKO3XU_cjs.stepPhase(steps, states, s.id) === "ready");
|
|
570
571
|
if (!next || next.kind !== "agent") return;
|
|
571
|
-
const prompt =
|
|
572
|
+
const prompt = chunkVYRKO3XU_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose });
|
|
572
573
|
set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
573
574
|
timers.current.set(
|
|
574
575
|
next.id,
|
|
@@ -578,7 +579,7 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
578
579
|
}, delayMs)
|
|
579
580
|
);
|
|
580
581
|
}, [states, steps, workflow]);
|
|
581
|
-
return
|
|
582
|
+
return chunkVYRKO3XU_cjs.useWorkflowView({
|
|
582
583
|
steps,
|
|
583
584
|
states,
|
|
584
585
|
inputs,
|
|
@@ -2029,7 +2030,7 @@ function TaskPlan({
|
|
|
2029
2030
|
);
|
|
2030
2031
|
}
|
|
2031
2032
|
const patch = (fields) => onChange({ ...plan, ...fields });
|
|
2032
|
-
const setCriterion = (idx,
|
|
2033
|
+
const setCriterion = (idx, text2) => patch({ criteria: plan.criteria.map((c, i) => i === idx ? { ...c, text: text2 } : c) });
|
|
2033
2034
|
const addCriterion = () => patch({ criteria: [...plan.criteria, { id: nextCriterionId(plan.criteria), text: "" }] });
|
|
2034
2035
|
const removeCriterion = (idx) => patch({ criteria: plan.criteria.filter((_, i) => i !== idx) });
|
|
2035
2036
|
const count = plan.criteria.length;
|
|
@@ -2975,10 +2976,10 @@ function TaskStatusPill({
|
|
|
2975
2976
|
const generating = key === "generating";
|
|
2976
2977
|
const now = useNow(generating && Boolean(runStartedAt));
|
|
2977
2978
|
const started = runStartedAt ? Date.parse(runStartedAt) : NaN;
|
|
2978
|
-
let
|
|
2979
|
+
let text2 = STATUS_LABELS[key];
|
|
2979
2980
|
let tone = STATUS_TONE[key];
|
|
2980
2981
|
if (awaitingAccess) {
|
|
2981
|
-
|
|
2982
|
+
text2 = l.waitingForAccess;
|
|
2982
2983
|
tone = "danger";
|
|
2983
2984
|
}
|
|
2984
2985
|
const elapsed = generating && !Number.isNaN(started) ? formatElapsed(started, now) : null;
|
|
@@ -2991,7 +2992,7 @@ function TaskStatusPill({
|
|
|
2991
2992
|
"data-status": key,
|
|
2992
2993
|
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: `task-status-${id}` }),
|
|
2993
2994
|
children: [
|
|
2994
|
-
|
|
2995
|
+
text2,
|
|
2995
2996
|
elapsed && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "tabular-nums opacity-70", children: [
|
|
2996
2997
|
"\xB7 ",
|
|
2997
2998
|
elapsed
|
|
@@ -3397,8 +3398,8 @@ function TaskTable(props) {
|
|
|
3397
3398
|
const map = new Map(STATUS_ORDER.map((s) => [s, 0]));
|
|
3398
3399
|
let all = 0;
|
|
3399
3400
|
for (const task of tasks) {
|
|
3400
|
-
const
|
|
3401
|
-
if (q && !
|
|
3401
|
+
const text2 = `${nameOf(task)} ${task.description ?? ""}`.toLowerCase();
|
|
3402
|
+
if (q && !text2.includes(q)) continue;
|
|
3402
3403
|
all += 1;
|
|
3403
3404
|
const s = asTaskStatus(task.status);
|
|
3404
3405
|
map.set(s, (map.get(s) ?? 0) + 1);
|
|
@@ -3882,7 +3883,7 @@ function TaskTable(props) {
|
|
|
3882
3883
|
testId: "task-list-empty"
|
|
3883
3884
|
}
|
|
3884
3885
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3885
|
-
|
|
3886
|
+
chunkIXALYQT7_cjs.GridView,
|
|
3886
3887
|
{
|
|
3887
3888
|
testId: "task-grid",
|
|
3888
3889
|
gridId: props.gridId ?? "tasks-grid-v4",
|
|
@@ -3908,7 +3909,7 @@ function TaskTable(props) {
|
|
|
3908
3909
|
}
|
|
3909
3910
|
) }),
|
|
3910
3911
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3911
|
-
|
|
3912
|
+
chunkV4ISCZJ7_cjs.SelectionBar,
|
|
3912
3913
|
{
|
|
3913
3914
|
count: selectedTasks.length,
|
|
3914
3915
|
onClear: clearSelection,
|
|
@@ -3916,7 +3917,7 @@ function TaskTable(props) {
|
|
|
3916
3917
|
children: (isCompact) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3917
3918
|
props.selectionActions?.(selectedTasks, isCompact, clearSelection),
|
|
3918
3919
|
props.onMarkDoneMany && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3919
|
-
|
|
3920
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
3920
3921
|
{
|
|
3921
3922
|
icon: lucideReact.CheckCheck,
|
|
3922
3923
|
label: l.markDoneMany,
|
|
@@ -3931,7 +3932,7 @@ function TaskTable(props) {
|
|
|
3931
3932
|
}
|
|
3932
3933
|
),
|
|
3933
3934
|
props.onDeleteMany && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3934
|
-
|
|
3935
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
3935
3936
|
{
|
|
3936
3937
|
icon: lucideReact.Trash2,
|
|
3937
3938
|
label: l.deleteMany,
|
|
@@ -4308,10 +4309,10 @@ function TaskInbox(p) {
|
|
|
4308
4309
|
}),
|
|
4309
4310
|
roots.filter((t) => !t.workflow_ext_id || !workflowIds.has(t.workflow_ext_id)).sort(order).map((t) => renderTask(t))
|
|
4310
4311
|
] }) }),
|
|
4311
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4312
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkV4ISCZJ7_cjs.SelectionBar, { count: selectedTasks.length, onClear: clearSelection, children: (isCompact) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4312
4313
|
p.selectionActions?.(selectedTasks, isCompact, clearSelection),
|
|
4313
4314
|
p.onMarkDoneMany && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4314
|
-
|
|
4315
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
4315
4316
|
{
|
|
4316
4317
|
icon: lucideReact.CheckCheck,
|
|
4317
4318
|
label: l.markDoneMany,
|
|
@@ -4325,7 +4326,7 @@ function TaskInbox(p) {
|
|
|
4325
4326
|
}
|
|
4326
4327
|
),
|
|
4327
4328
|
p.onDeleteMany && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4328
|
-
|
|
4329
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
4329
4330
|
{
|
|
4330
4331
|
icon: lucideReact.Trash2,
|
|
4331
4332
|
label: l.deleteMany,
|
|
@@ -4583,7 +4584,7 @@ function ConversationListView(p) {
|
|
|
4583
4584
|
}
|
|
4584
4585
|
),
|
|
4585
4586
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4586
|
-
|
|
4587
|
+
chunkIXALYQT7_cjs.GridView,
|
|
4587
4588
|
{
|
|
4588
4589
|
testId: "threads-grid",
|
|
4589
4590
|
items: rows,
|
|
@@ -4613,7 +4614,7 @@ function ConversationListView(p) {
|
|
|
4613
4614
|
}
|
|
4614
4615
|
}
|
|
4615
4616
|
) }),
|
|
4616
|
-
p.selectionActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4617
|
+
p.selectionActions && /* @__PURE__ */ jsxRuntime.jsx(chunkV4ISCZJ7_cjs.SelectionBar, { count: selectedRows.length, onClear: () => setSelected(/* @__PURE__ */ new Set()), children: (compact) => p.selectionActions?.(selectedRows, compact, () => setSelected(/* @__PURE__ */ new Set())) })
|
|
4617
4618
|
] });
|
|
4618
4619
|
}
|
|
4619
4620
|
var NO_PEOPLE = [];
|
|
@@ -4943,8 +4944,8 @@ function isoToLocalInput(iso) {
|
|
|
4943
4944
|
return new Date(d.getTime() - d.getTimezoneOffset() * 6e4).toISOString().slice(0, 16);
|
|
4944
4945
|
}
|
|
4945
4946
|
var DERIVED_NAME_WORDS = 6;
|
|
4946
|
-
function firstWords(
|
|
4947
|
-
const words =
|
|
4947
|
+
function firstWords(text2, count = DERIVED_NAME_WORDS) {
|
|
4948
|
+
const words = text2.trim().split(/\s+/).filter(Boolean);
|
|
4948
4949
|
if (words.length <= count) return words.join(" ");
|
|
4949
4950
|
return `${words.slice(0, count).join(" ")}\u2026`;
|
|
4950
4951
|
}
|
|
@@ -4991,7 +4992,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
4991
4992
|
}
|
|
4992
4993
|
const typed = name?.trim();
|
|
4993
4994
|
if (workflow.options?.agent === false) {
|
|
4994
|
-
const message =
|
|
4995
|
+
const message = chunkVYRKO3XU_cjs.composeWorkflowPrompt(workflow, inputs, context);
|
|
4995
4996
|
return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
|
|
4996
4997
|
}
|
|
4997
4998
|
const derived = typed || deriveWorkflowName(workflow, inputs);
|
|
@@ -5005,7 +5006,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
5005
5006
|
}
|
|
5006
5007
|
return {
|
|
5007
5008
|
name: derived,
|
|
5008
|
-
prompt:
|
|
5009
|
+
prompt: chunkVYRKO3XU_cjs.composeWorkflowPrompt(workflow, inputs, context),
|
|
5009
5010
|
skill_ref: null,
|
|
5010
5011
|
// The files a run is bound to travel in the saved inputs, whatever the template: the server binds
|
|
5011
5012
|
// the run to the ids listed under any input's `documents`.
|
|
@@ -5538,7 +5539,7 @@ function TaskTriggerChip({
|
|
|
5538
5539
|
}) {
|
|
5539
5540
|
const l = { ...DEFAULT_TASK_TRIGGER_CHIP_LABELS, ...labels };
|
|
5540
5541
|
const chained = Boolean(afterTaskId);
|
|
5541
|
-
const
|
|
5542
|
+
const text2 = chained ? afterTaskName ? l.after(afterTaskName) : l.afterUnknown : triggerType === "on_demand" ? l.onDemand : summary;
|
|
5542
5543
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5543
5544
|
"span",
|
|
5544
5545
|
{
|
|
@@ -5547,7 +5548,7 @@ function TaskTriggerChip({
|
|
|
5547
5548
|
"data-trigger": chained ? "task" : triggerType,
|
|
5548
5549
|
children: [
|
|
5549
5550
|
/* @__PURE__ */ jsxRuntime.jsx(TriggerIcon, { type: triggerType, chained }),
|
|
5550
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children:
|
|
5551
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: text2 })
|
|
5551
5552
|
]
|
|
5552
5553
|
}
|
|
5553
5554
|
);
|
|
@@ -5780,9 +5781,9 @@ function WorkflowsTable(props) {
|
|
|
5780
5781
|
renderName: (w) => {
|
|
5781
5782
|
const { l: lb } = latest.current;
|
|
5782
5783
|
const skill = isSkillRow(w);
|
|
5783
|
-
const
|
|
5784
|
+
const text2 = skill ? latest.current.actionText(w) : w.description || latest.current.actionText(w);
|
|
5784
5785
|
const stem = w.name.replace(/…$/, "").trim();
|
|
5785
|
-
const about =
|
|
5786
|
+
const about = text2 && text2.trim() !== w.name.trim() && text2.trim() !== stem ? text2 : "";
|
|
5786
5787
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 leading-tight", children: [
|
|
5787
5788
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
5788
5789
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6101,7 +6102,7 @@ function WorkflowsTable(props) {
|
|
|
6101
6102
|
testId: "workflow-list-empty"
|
|
6102
6103
|
}
|
|
6103
6104
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6104
|
-
|
|
6105
|
+
chunkIXALYQT7_cjs.GridView,
|
|
6105
6106
|
{
|
|
6106
6107
|
testId: "workflow-grid",
|
|
6107
6108
|
gridId: props.gridId ?? "workflows-grid-v2",
|
|
@@ -6122,10 +6123,10 @@ function WorkflowsTable(props) {
|
|
|
6122
6123
|
gridOptions: GRID_OPTIONS
|
|
6123
6124
|
}
|
|
6124
6125
|
) }),
|
|
6125
|
-
!props.content && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6126
|
+
!props.content && /* @__PURE__ */ jsxRuntime.jsx(chunkV4ISCZJ7_cjs.SelectionBar, { count: selected.length, onClear: clearSelection, children: (isCompact) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6126
6127
|
props.onToggleActiveMany && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6127
6128
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6128
|
-
|
|
6129
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
6129
6130
|
{
|
|
6130
6131
|
icon: lucideReact.Play,
|
|
6131
6132
|
label: l.makeActive,
|
|
@@ -6139,7 +6140,7 @@ function WorkflowsTable(props) {
|
|
|
6139
6140
|
}
|
|
6140
6141
|
),
|
|
6141
6142
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6142
|
-
|
|
6143
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
6143
6144
|
{
|
|
6144
6145
|
icon: lucideReact.Workflow,
|
|
6145
6146
|
label: l.makePaused,
|
|
@@ -6154,7 +6155,7 @@ function WorkflowsTable(props) {
|
|
|
6154
6155
|
)
|
|
6155
6156
|
] }),
|
|
6156
6157
|
props.onDeleteMany && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6157
|
-
|
|
6158
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
6158
6159
|
{
|
|
6159
6160
|
icon: lucideReact.Trash2,
|
|
6160
6161
|
label: l.delete,
|
|
@@ -6211,7 +6212,9 @@ var ICONS = {
|
|
|
6211
6212
|
step_started: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "size-3.5", "aria-hidden": true }),
|
|
6212
6213
|
step_done: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "size-3.5", "aria-hidden": true }),
|
|
6213
6214
|
step_skipped: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "size-3.5", "aria-hidden": true }),
|
|
6214
|
-
step_failed: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "size-3.5", "aria-hidden": true })
|
|
6215
|
+
step_failed: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "size-3.5", "aria-hidden": true }),
|
|
6216
|
+
step_signal: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Flag, { className: "size-3.5", "aria-hidden": true }),
|
|
6217
|
+
linked_run: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { className: "size-3.5", "aria-hidden": true })
|
|
6215
6218
|
};
|
|
6216
6219
|
var asString = (v) => typeof v === "string" && v.trim() ? v : null;
|
|
6217
6220
|
function summarizeError(error) {
|
|
@@ -6256,6 +6259,12 @@ function TaskActivityTimeline({
|
|
|
6256
6259
|
return { headline: "Step done" };
|
|
6257
6260
|
case "step_skipped":
|
|
6258
6261
|
return { headline: "Step skipped" };
|
|
6262
|
+
case "step_signal":
|
|
6263
|
+
return { headline: `Signalled \u201C${asString(detail.signal) ?? "a signal"}\u201D` };
|
|
6264
|
+
case "linked_run":
|
|
6265
|
+
return {
|
|
6266
|
+
headline: `Started a linked workflow on \u201C${asString(detail.signal) ?? "a signal"}\u201D`
|
|
6267
|
+
};
|
|
6259
6268
|
case "step_failed":
|
|
6260
6269
|
return {
|
|
6261
6270
|
headline: "Step failed",
|
|
@@ -6474,7 +6483,7 @@ function groupThreadActivity(steps, items) {
|
|
|
6474
6483
|
continue;
|
|
6475
6484
|
}
|
|
6476
6485
|
if (current === void 0) out.before.push(item);
|
|
6477
|
-
else if (
|
|
6486
|
+
else if (chunkVYRKO3XU_cjs.isRunFinished(steps, states)) out.after.push(item);
|
|
6478
6487
|
else {
|
|
6479
6488
|
const status = states[current]?.status;
|
|
6480
6489
|
const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
|
|
@@ -6486,8 +6495,64 @@ function groupThreadActivity(steps, items) {
|
|
|
6486
6495
|
var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
|
|
6487
6496
|
happened: "{count} in this step",
|
|
6488
6497
|
nothingYet: "Nothing here yet.",
|
|
6489
|
-
skip: "Skip this step"
|
|
6498
|
+
skip: "Skip this step",
|
|
6499
|
+
startedBy: "Started by {step} in {thread}",
|
|
6500
|
+
signalled: "This step signalled \u201C{signal}\u201D",
|
|
6501
|
+
linkedRun: "Started on \u201C{signal}\u201D: open its thread"
|
|
6490
6502
|
};
|
|
6503
|
+
function WorkflowThreadStartedBy({
|
|
6504
|
+
origin,
|
|
6505
|
+
labels
|
|
6506
|
+
}) {
|
|
6507
|
+
const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
|
|
6508
|
+
const text2 = l.startedBy.replace("{step}", origin.stepTitle).replace("{thread}", origin.threadTitle);
|
|
6509
|
+
const className = "flex max-w-64 shrink-0 items-center gap-1 truncate rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground";
|
|
6510
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6511
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerLeftUp, { className: "size-3 shrink-0" }),
|
|
6512
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: text2 })
|
|
6513
|
+
] });
|
|
6514
|
+
return origin.onSelect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6515
|
+
"button",
|
|
6516
|
+
{
|
|
6517
|
+
type: "button",
|
|
6518
|
+
onClick: origin.onSelect,
|
|
6519
|
+
title: origin.signal ? `${text2} (${origin.signal})` : text2,
|
|
6520
|
+
className: ui.cn(className, "hover:border-primary/40 hover:text-primary"),
|
|
6521
|
+
"data-testid": "workflow-thread-started-by",
|
|
6522
|
+
children: content
|
|
6523
|
+
}
|
|
6524
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className, title: text2, "data-testid": "workflow-thread-started-by", children: content });
|
|
6525
|
+
}
|
|
6526
|
+
function SignalPill({ signal, l }) {
|
|
6527
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6528
|
+
"span",
|
|
6529
|
+
{
|
|
6530
|
+
className: "flex shrink-0 items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[11px] text-amber-700 dark:text-amber-300",
|
|
6531
|
+
title: l.signalled.replace("{signal}", signal.signal),
|
|
6532
|
+
"data-testid": `workflow-thread-signal-${signal.step}-${signal.signal}`,
|
|
6533
|
+
children: [
|
|
6534
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Flag, { className: "size-3 shrink-0" }),
|
|
6535
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono", children: signal.signal }),
|
|
6536
|
+
signal.runs.map((run) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6537
|
+
"button",
|
|
6538
|
+
{
|
|
6539
|
+
type: "button",
|
|
6540
|
+
onClick: run.onSelect,
|
|
6541
|
+
disabled: !run.onSelect,
|
|
6542
|
+
title: l.linkedRun.replace("{signal}", signal.signal),
|
|
6543
|
+
className: "flex max-w-40 items-center gap-0.5 truncate rounded-full bg-background/80 px-1.5 text-foreground hover:text-primary disabled:cursor-default",
|
|
6544
|
+
"data-testid": `workflow-thread-linked-${run.id}`,
|
|
6545
|
+
children: [
|
|
6546
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { className: "size-3 shrink-0" }),
|
|
6547
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: run.label })
|
|
6548
|
+
]
|
|
6549
|
+
},
|
|
6550
|
+
run.id
|
|
6551
|
+
))
|
|
6552
|
+
]
|
|
6553
|
+
}
|
|
6554
|
+
);
|
|
6555
|
+
}
|
|
6491
6556
|
function Mark({ phase, icon }) {
|
|
6492
6557
|
if (phase === "done") return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-3.5" });
|
|
6493
6558
|
if (phase === "running") return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-3.5 animate-spin" });
|
|
@@ -6528,11 +6593,14 @@ function WorkflowThreadStrip({
|
|
|
6528
6593
|
renderIcon,
|
|
6529
6594
|
onSkip,
|
|
6530
6595
|
renderStepAction,
|
|
6596
|
+
signals = [],
|
|
6597
|
+
startedBy,
|
|
6531
6598
|
labels,
|
|
6532
6599
|
className
|
|
6533
6600
|
}) {
|
|
6534
6601
|
const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
|
|
6535
6602
|
const grouped = groupThreadActivity(steps, items);
|
|
6603
|
+
const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
|
|
6536
6604
|
const chevron = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-3 shrink-0 text-muted-foreground" });
|
|
6537
6605
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6538
6606
|
"div",
|
|
@@ -6542,12 +6610,16 @@ function WorkflowThreadStrip({
|
|
|
6542
6610
|
"aria-label": "Workflow steps",
|
|
6543
6611
|
"data-testid": "workflow-thread-strip",
|
|
6544
6612
|
children: /* @__PURE__ */ jsxRuntime.jsxs("ol", { className: "flex w-max min-w-full items-center gap-1", children: [
|
|
6613
|
+
startedBy && /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6614
|
+
/* @__PURE__ */ jsxRuntime.jsx(WorkflowThreadStartedBy, { origin: startedBy, labels }),
|
|
6615
|
+
chevron
|
|
6616
|
+
] }),
|
|
6545
6617
|
grouped.before.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6546
6618
|
/* @__PURE__ */ jsxRuntime.jsx(Entry, { item }),
|
|
6547
6619
|
chevron
|
|
6548
6620
|
] }, item.id)),
|
|
6549
6621
|
steps.map((step, i) => {
|
|
6550
|
-
const phase =
|
|
6622
|
+
const phase = chunkVYRKO3XU_cjs.stepPhase(steps, states, step.id);
|
|
6551
6623
|
const happened = grouped.byStep[step.id] ?? [];
|
|
6552
6624
|
const chip = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6553
6625
|
"span",
|
|
@@ -6598,18 +6670,50 @@ function WorkflowThreadStrip({
|
|
|
6598
6670
|
}
|
|
6599
6671
|
)
|
|
6600
6672
|
] }),
|
|
6601
|
-
(
|
|
6673
|
+
signals.filter((s) => s.step === step.id).map((s) => /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`)),
|
|
6674
|
+
(i < steps.length - 1 || grouped.after.length > 0 || strays.length > 0) && chevron
|
|
6602
6675
|
] }, step.id);
|
|
6603
6676
|
}),
|
|
6604
6677
|
grouped.after.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
|
|
6605
6678
|
/* @__PURE__ */ jsxRuntime.jsx(Entry, { item }),
|
|
6606
|
-
i < grouped.after.length - 1 && chevron
|
|
6607
|
-
] }, item.id))
|
|
6679
|
+
(i < grouped.after.length - 1 || strays.length > 0) && chevron
|
|
6680
|
+
] }, item.id)),
|
|
6681
|
+
strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }) }, `${s.step}-${s.signal}`))
|
|
6608
6682
|
] })
|
|
6609
6683
|
}
|
|
6610
6684
|
);
|
|
6611
6685
|
}
|
|
6612
6686
|
|
|
6687
|
+
// src/agents/tasks/linkedRuns.ts
|
|
6688
|
+
var text = (v) => typeof v === "string" && v ? v : void 0;
|
|
6689
|
+
function linkedRunsFromActivity(events) {
|
|
6690
|
+
const raised = [];
|
|
6691
|
+
let startedBy;
|
|
6692
|
+
const entry = (step, signal) => {
|
|
6693
|
+
let found = raised.find((r) => r.step === step && r.signal === signal);
|
|
6694
|
+
if (!found) raised.push(found = { step, signal, runs: [] });
|
|
6695
|
+
return found;
|
|
6696
|
+
};
|
|
6697
|
+
for (const e of events ?? []) {
|
|
6698
|
+
const d = e.detail ?? {};
|
|
6699
|
+
const step = text(d.step);
|
|
6700
|
+
const signal = text(d.signal);
|
|
6701
|
+
if (e.kind === "step_signal" && step && signal) entry(step, signal);
|
|
6702
|
+
else if (e.kind === "linked_run" && step && signal) {
|
|
6703
|
+
const conversationId = text(d.conversation_ext_id);
|
|
6704
|
+
const runs = entry(step, signal).runs;
|
|
6705
|
+
if (conversationId && !runs.some((r) => r.conversationId === conversationId))
|
|
6706
|
+
runs.push({ conversationId, workflowId: text(d.workflow_ext_id) });
|
|
6707
|
+
} else if (e.kind === "created" && d.linked_from && typeof d.linked_from === "object") {
|
|
6708
|
+
const from = d.linked_from;
|
|
6709
|
+
const conversationId = text(from.conversation_ext_id);
|
|
6710
|
+
if (conversationId)
|
|
6711
|
+
startedBy = { conversationId, step: text(from.step), signal: text(from.signal) };
|
|
6712
|
+
}
|
|
6713
|
+
}
|
|
6714
|
+
return startedBy ? { raised, startedBy } : { raised };
|
|
6715
|
+
}
|
|
6716
|
+
|
|
6613
6717
|
// src/agents/tasks/compact-thread-activity.ts
|
|
6614
6718
|
var STEP_LABELS = {
|
|
6615
6719
|
step_started: "Step started",
|
|
@@ -6834,7 +6938,7 @@ function TaskRunsDialog({
|
|
|
6834
6938
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: l.description })
|
|
6835
6939
|
] }),
|
|
6836
6940
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6837
|
-
|
|
6941
|
+
chunkIXALYQT7_cjs.GridView,
|
|
6838
6942
|
{
|
|
6839
6943
|
testId: chunkMHVNT4J3_cjs.testIdOr(testIds?.list, { testId: "task-runs-list" }),
|
|
6840
6944
|
gridId: "workflow-runs",
|
|
@@ -7036,7 +7140,7 @@ function defaultTaskComposerValues(workflows, initial) {
|
|
|
7036
7140
|
return {
|
|
7037
7141
|
assignee: "me",
|
|
7038
7142
|
workflowId,
|
|
7039
|
-
inputs: workflow ? { ...
|
|
7143
|
+
inputs: workflow ? { ...chunkVYRKO3XU_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
|
|
7040
7144
|
when: "manual",
|
|
7041
7145
|
runAt: "",
|
|
7042
7146
|
rrule: "",
|
|
@@ -7145,7 +7249,7 @@ function WorkflowComposer({
|
|
|
7145
7249
|
return !docs?.length;
|
|
7146
7250
|
})
|
|
7147
7251
|
);
|
|
7148
|
-
const whatMissing = !workflow || Object.keys(
|
|
7252
|
+
const whatMissing = !workflow || Object.keys(chunkVYRKO3XU_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
|
|
7149
7253
|
const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
|
|
7150
7254
|
const whenMissing = missingWhen(values, runAtPast);
|
|
7151
7255
|
const scheduled = values.when !== "now" && values.when !== "manual";
|
|
@@ -7157,7 +7261,7 @@ function WorkflowComposer({
|
|
|
7157
7261
|
setValues({
|
|
7158
7262
|
...values,
|
|
7159
7263
|
workflowId: next,
|
|
7160
|
-
inputs: def ?
|
|
7264
|
+
inputs: def ? chunkVYRKO3XU_cjs.defaultInputs(def) : {},
|
|
7161
7265
|
...def?.documentAction ? { access: "standing" } : {}
|
|
7162
7266
|
});
|
|
7163
7267
|
};
|
|
@@ -7295,7 +7399,7 @@ function WorkflowComposer({
|
|
|
7295
7399
|
}
|
|
7296
7400
|
),
|
|
7297
7401
|
!noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7298
|
-
|
|
7402
|
+
chunkVYRKO3XU_cjs.SchemaForm,
|
|
7299
7403
|
{
|
|
7300
7404
|
fields,
|
|
7301
7405
|
values: values.inputs,
|
|
@@ -7734,7 +7838,7 @@ function WorkTaskComposer({
|
|
|
7734
7838
|
}, [open]);
|
|
7735
7839
|
const workflow = workflows.find((w) => w.id === values.workflowId);
|
|
7736
7840
|
const fields = workflow?.inputs ?? [];
|
|
7737
|
-
const errors = workflow ?
|
|
7841
|
+
const errors = workflow ? chunkVYRKO3XU_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
|
|
7738
7842
|
const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
|
|
7739
7843
|
const unattended = hasWork && values.when !== "now" && values.when !== "manual";
|
|
7740
7844
|
const canConfigure = !isEdit || seed.assignee === "agent";
|
|
@@ -7742,7 +7846,7 @@ function WorkTaskComposer({
|
|
|
7742
7846
|
const set = (key, value) => setValues({ ...values, [key]: value });
|
|
7743
7847
|
const pickWorkflow = (id2) => {
|
|
7744
7848
|
const next = workflows.find((w) => w.id === id2);
|
|
7745
|
-
setValues({ ...values, workflowId: id2, inputs: next ?
|
|
7849
|
+
setValues({ ...values, workflowId: id2, inputs: next ? chunkVYRKO3XU_cjs.defaultInputs(next) : {} });
|
|
7746
7850
|
};
|
|
7747
7851
|
const openConfigure = () => {
|
|
7748
7852
|
setConfigOpen(true);
|
|
@@ -7928,7 +8032,7 @@ function WorkTaskComposer({
|
|
|
7928
8032
|
)
|
|
7929
8033
|
] }),
|
|
7930
8034
|
workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7931
|
-
|
|
8035
|
+
chunkVYRKO3XU_cjs.SchemaForm,
|
|
7932
8036
|
{
|
|
7933
8037
|
fields,
|
|
7934
8038
|
values: values.inputs,
|
|
@@ -9020,7 +9124,7 @@ function AgentBarNotes({
|
|
|
9020
9124
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("mx-3 mb-2 space-y-1.5", className), children });
|
|
9021
9125
|
}
|
|
9022
9126
|
function AgentBarQueuedNote({
|
|
9023
|
-
text,
|
|
9127
|
+
text: text2,
|
|
9024
9128
|
isAcknowledged,
|
|
9025
9129
|
labels,
|
|
9026
9130
|
testId = "agent-queued-message"
|
|
@@ -9042,7 +9146,7 @@ function AgentBarQueuedNote({
|
|
|
9042
9146
|
children: l.queuedMessage
|
|
9043
9147
|
}
|
|
9044
9148
|
),
|
|
9045
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-2 whitespace-pre-line text-sm text-foreground", title:
|
|
9149
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-2 whitespace-pre-line text-sm text-foreground", title: text2, children: text2 })
|
|
9046
9150
|
] })
|
|
9047
9151
|
]
|
|
9048
9152
|
}
|
|
@@ -10042,6 +10146,7 @@ exports.WORKFLOW_COLUMN_ORDER = WORKFLOW_COLUMN_ORDER;
|
|
|
10042
10146
|
exports.WorkflowConfigDialog = WorkflowConfigDialog;
|
|
10043
10147
|
exports.WorkflowDocumentsField = WorkflowDocumentsField;
|
|
10044
10148
|
exports.WorkflowLauncher = WorkflowLauncher;
|
|
10149
|
+
exports.WorkflowThreadStartedBy = WorkflowThreadStartedBy;
|
|
10045
10150
|
exports.WorkflowThreadStrip = WorkflowThreadStrip;
|
|
10046
10151
|
exports.WorkflowsTable = WorkflowsTable;
|
|
10047
10152
|
exports.WorkflowsToolbar = WorkflowsToolbar;
|
|
@@ -10084,6 +10189,7 @@ exports.isPlainTodo = isPlainTodo;
|
|
|
10084
10189
|
exports.isSkillRow = isSkillRow;
|
|
10085
10190
|
exports.isValidAgentName = isValidAgentName;
|
|
10086
10191
|
exports.isoToLocalInput = isoToLocalInput;
|
|
10192
|
+
exports.linkedRunsFromActivity = linkedRunsFromActivity;
|
|
10087
10193
|
exports.localInputToIso = localInputToIso;
|
|
10088
10194
|
exports.matchWorkflowScope = matchWorkflowScope;
|
|
10089
10195
|
exports.moveTargets = moveTargets;
|
|
@@ -10109,5 +10215,5 @@ exports.workflowToComposerValues = workflowToComposerValues;
|
|
|
10109
10215
|
exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
|
|
10110
10216
|
exports.workflowTriggerType = workflowTriggerType;
|
|
10111
10217
|
exports.workflowWhen = workflowWhen;
|
|
10112
|
-
//# sourceMappingURL=chunk-
|
|
10113
|
-
//# sourceMappingURL=chunk-
|
|
10218
|
+
//# sourceMappingURL=chunk-7FKARMA3.cjs.map
|
|
10219
|
+
//# sourceMappingURL=chunk-7FKARMA3.cjs.map
|