@arbidocs/blocks 0.4.89 → 0.4.91
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 +283 -282
- package/dist/agents/index.js +7 -6
- package/dist/agents/workflows/types.d.ts +6 -0
- package/dist/{chunk-2CFW2ELM.cjs → chunk-2EI7NCUA.cjs} +2 -8
- package/dist/chunk-2EI7NCUA.cjs.map +1 -0
- package/dist/chunk-32HW2Q33.cjs +59 -0
- package/dist/chunk-32HW2Q33.cjs.map +1 -0
- package/dist/{chunk-MOJ5JQDN.cjs → chunk-3US5OIDQ.cjs} +69 -34
- package/dist/chunk-3US5OIDQ.cjs.map +1 -0
- package/dist/{chunk-DPLRHEJZ.js → chunk-5LXQPP2K.js} +4 -33
- package/dist/chunk-5LXQPP2K.js.map +1 -0
- package/dist/{chunk-QLHW7JGN.js → chunk-5NQIBJPP.js} +7 -7
- package/dist/{chunk-QLHW7JGN.js.map → chunk-5NQIBJPP.js.map} +1 -1
- package/dist/{chunk-3D5MDCQ7.js → chunk-5RQOVALO.js} +3 -3
- package/dist/{chunk-3D5MDCQ7.js.map → chunk-5RQOVALO.js.map} +1 -1
- package/dist/chunk-AUS3KBHJ.js +52 -0
- package/dist/chunk-AUS3KBHJ.js.map +1 -0
- package/dist/{chunk-CNI5QJ5B.cjs → chunk-DDYXFALG.cjs} +50 -50
- package/dist/{chunk-CNI5QJ5B.cjs.map → chunk-DDYXFALG.cjs.map} +1 -1
- package/dist/chunk-DVUZTGVL.cjs +52 -0
- package/dist/chunk-DVUZTGVL.cjs.map +1 -0
- package/dist/{chunk-TF6YMDZL.cjs → chunk-EHF63UYP.cjs} +5 -5
- package/dist/{chunk-TF6YMDZL.cjs.map → chunk-EHF63UYP.cjs.map} +1 -1
- package/dist/{chunk-I44NX2ZB.js → chunk-PGDL26TQ.js} +69 -34
- package/dist/chunk-PGDL26TQ.js.map +1 -0
- package/dist/{chunk-ZX2VPMBJ.js → chunk-YU2KUMGE.js} +2 -8
- package/dist/chunk-YU2KUMGE.js.map +1 -0
- package/dist/components/tones.d.ts +5 -0
- package/dist/connect/index.cjs +26 -25
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +5 -4
- package/dist/connect/index.js.map +1 -1
- package/dist/facts/FactSourceGroup.d.ts +2 -1
- package/dist/facts/index.cjs +6 -6
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +3 -3
- package/dist/facts/index.js.map +1 -1
- package/dist/files/cells/LabelMultiSelect.d.ts +11 -3
- package/dist/files/index.cjs +23 -16
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +20 -13
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +371 -358
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +54 -49
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +6 -5
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +2 -1
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/FilterInput.d.ts +1 -3
- package/dist/shell/index.cjs +4 -4
- package/dist/shell/index.js +1 -1
- package/dist/site/index.cjs +4 -3
- package/dist/site/index.js +2 -1
- package/dist/tags/TagDetail.d.ts +10 -1
- package/dist/workflow-canvas/FieldOptionsEditor.d.ts +25 -0
- package/dist/workflow-canvas/StepInspector.d.ts +6 -2
- package/dist/workflow-canvas/index.cjs +179 -50
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.d.ts +1 -0
- package/dist/workflow-canvas/index.js +136 -9
- package/dist/workflow-canvas/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-2CFW2ELM.cjs.map +0 -1
- package/dist/chunk-DPLRHEJZ.js.map +0 -1
- package/dist/chunk-I44NX2ZB.js.map +0 -1
- package/dist/chunk-MOJ5JQDN.cjs.map +0 -1
- package/dist/chunk-VFUWWH52.cjs +0 -83
- package/dist/chunk-VFUWWH52.cjs.map +0 -1
- package/dist/chunk-ZX2VPMBJ.js.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/components/tones.ts
|
|
3
|
+
var TONES = [
|
|
4
|
+
"neutral",
|
|
5
|
+
"info",
|
|
6
|
+
"success",
|
|
7
|
+
"warning",
|
|
8
|
+
"danger",
|
|
9
|
+
"accent",
|
|
10
|
+
"ai"
|
|
11
|
+
];
|
|
12
|
+
var isTone = (v) => TONES.includes(v);
|
|
13
|
+
var TONE_SURFACE = {
|
|
14
|
+
neutral: "bg-gray-bg text-gray-text",
|
|
15
|
+
info: "bg-blue-bg text-blue-text",
|
|
16
|
+
success: "bg-green-bg text-green-text",
|
|
17
|
+
warning: "bg-yellow-bg text-yellow-text",
|
|
18
|
+
danger: "bg-red-bg text-red-text",
|
|
19
|
+
accent: "bg-purple-bg text-purple-text",
|
|
20
|
+
ai: "bg-ai-soft text-ai-ink"
|
|
21
|
+
};
|
|
22
|
+
var TONE_BORDER = {
|
|
23
|
+
neutral: "border-gray-border",
|
|
24
|
+
info: "border-blue-border",
|
|
25
|
+
success: "border-green-border",
|
|
26
|
+
warning: "border-yellow-border",
|
|
27
|
+
danger: "border-red-border",
|
|
28
|
+
accent: "border-purple-border",
|
|
29
|
+
ai: "border-transparent"
|
|
30
|
+
};
|
|
31
|
+
var TONE_DOT = {
|
|
32
|
+
neutral: "bg-gray-text",
|
|
33
|
+
info: "bg-blue-solid",
|
|
34
|
+
success: "bg-green-solid",
|
|
35
|
+
warning: "bg-yellow-solid",
|
|
36
|
+
danger: "bg-red-solid",
|
|
37
|
+
accent: "bg-purple-solid",
|
|
38
|
+
ai: "bg-ai-ink"
|
|
39
|
+
};
|
|
40
|
+
var TONE_SOLID_BORDER = {
|
|
41
|
+
neutral: "border-gray-text",
|
|
42
|
+
info: "border-blue-solid",
|
|
43
|
+
success: "border-green-solid",
|
|
44
|
+
warning: "border-yellow-solid",
|
|
45
|
+
danger: "border-red-solid",
|
|
46
|
+
accent: "border-purple-solid",
|
|
47
|
+
ai: "border-ai-ink"
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { TONES, TONE_BORDER, TONE_DOT, TONE_SOLID_BORDER, TONE_SURFACE, isTone };
|
|
51
|
+
//# sourceMappingURL=chunk-AUS3KBHJ.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-AUS3KBHJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tones.ts"],"names":[],"mappings":";AAWO,IAAM,KAAA,GAAyB;AAAA,EACpC,SAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF;AAEO,IAAM,MAAA,GAAS,CAAC,CAAA,KAA2B,KAAA,CAA6B,SAAS,CAAC;AAGlF,IAAM,YAAA,GAAqC;AAAA,EAChD,OAAA,EAAS,2BAAA;AAAA,EACT,IAAA,EAAM,2BAAA;AAAA,EACN,OAAA,EAAS,6BAAA;AAAA,EACT,OAAA,EAAS,+BAAA;AAAA,EACT,MAAA,EAAQ,yBAAA;AAAA,EACR,MAAA,EAAQ,+BAAA;AAAA,EACR,EAAA,EAAI;AACN;AAGO,IAAM,WAAA,GAAoC;AAAA,EAC/C,OAAA,EAAS,oBAAA;AAAA,EACT,IAAA,EAAM,oBAAA;AAAA,EACN,OAAA,EAAS,qBAAA;AAAA,EACT,OAAA,EAAS,sBAAA;AAAA,EACT,MAAA,EAAQ,mBAAA;AAAA,EACR,MAAA,EAAQ,sBAAA;AAAA,EACR,EAAA,EAAI;AACN;AAGO,IAAM,QAAA,GAAiC;AAAA,EAC5C,OAAA,EAAS,cAAA;AAAA,EACT,IAAA,EAAM,eAAA;AAAA,EACN,OAAA,EAAS,gBAAA;AAAA,EACT,OAAA,EAAS,iBAAA;AAAA,EACT,MAAA,EAAQ,cAAA;AAAA,EACR,MAAA,EAAQ,iBAAA;AAAA,EACR,EAAA,EAAI;AACN;AAGO,IAAM,iBAAA,GAA0C;AAAA,EACrD,OAAA,EAAS,kBAAA;AAAA,EACT,IAAA,EAAM,mBAAA;AAAA,EACN,OAAA,EAAS,oBAAA;AAAA,EACT,OAAA,EAAS,qBAAA;AAAA,EACT,MAAA,EAAQ,kBAAA;AAAA,EACR,MAAA,EAAQ,qBAAA;AAAA,EACR,EAAA,EAAI;AACN","file":"chunk-AUS3KBHJ.js","sourcesContent":["/**\n * The ONE status/tone vocabulary of the blocks. `StatusPill`, `ToneBadge`, `Dot` and the plan,\n * connection and tag chips all read these maps, so a tone looks the same wherever it appears and\n * a new tone is added in one place. Every pair is a token pair checked by\n * `tokens.contrast.test.ts` (`--{hue}-text` on `--{hue}-bg`).\n */\n\n/** Semantic tones, mapped to the token palette (`--{hue}-bg|text|border`, `--ai-*`). */\nexport type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'accent' | 'ai'\n\n/** Every tone, e.g. to check a tone read from a file or offer them in a picker. */\nexport const TONES: readonly Tone[] = [\n 'neutral',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'accent',\n 'ai',\n]\n\nexport const isTone = (v: unknown): v is Tone => (TONES as readonly unknown[]).includes(v)\n\n/** Background + text of a tinted chip. */\nexport const TONE_SURFACE: Record<Tone, string> = {\n neutral: 'bg-gray-bg text-gray-text',\n info: 'bg-blue-bg text-blue-text',\n success: 'bg-green-bg text-green-text',\n warning: 'bg-yellow-bg text-yellow-text',\n danger: 'bg-red-bg text-red-text',\n accent: 'bg-purple-bg text-purple-text',\n ai: 'bg-ai-soft text-ai-ink',\n}\n\n/** Border of a tinted chip (the AI tint has none). */\nexport const TONE_BORDER: Record<Tone, string> = {\n neutral: 'border-gray-border',\n info: 'border-blue-border',\n success: 'border-green-border',\n warning: 'border-yellow-border',\n danger: 'border-red-border',\n accent: 'border-purple-border',\n ai: 'border-transparent',\n}\n\n/** Solid fill of a status dot. */\nexport const TONE_DOT: Record<Tone, string> = {\n neutral: 'bg-gray-text',\n info: 'bg-blue-solid',\n success: 'bg-green-solid',\n warning: 'bg-yellow-solid',\n danger: 'bg-red-solid',\n accent: 'bg-purple-solid',\n ai: 'bg-ai-ink',\n}\n\n/** Strong border of a chosen toned control (its fill is `TONE_SURFACE`). */\nexport const TONE_SOLID_BORDER: Record<Tone, string> = {\n neutral: 'border-gray-text',\n info: 'border-blue-solid',\n success: 'border-green-solid',\n warning: 'border-yellow-solid',\n danger: 'border-red-solid',\n accent: 'border-purple-solid',\n ai: 'border-ai-ink',\n}\n"]}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkS5HZBXZA_cjs = require('./chunk-S5HZBXZA.cjs');
|
|
5
5
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunk3US5OIDQ_cjs = require('./chunk-3US5OIDQ.cjs');
|
|
7
7
|
var chunkN26CXGXC_cjs = require('./chunk-N26CXGXC.cjs');
|
|
8
8
|
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
9
|
-
var chunkZ5VUZ6YD_cjs = require('./chunk-Z5VUZ6YD.cjs');
|
|
10
|
-
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
11
9
|
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
12
|
-
var
|
|
10
|
+
var chunkDVUZTGVL_cjs = require('./chunk-DVUZTGVL.cjs');
|
|
13
11
|
var chunkV4ISCZJ7_cjs = require('./chunk-V4ISCZJ7.cjs');
|
|
14
|
-
var
|
|
12
|
+
var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
|
|
13
|
+
var chunkZ5VUZ6YD_cjs = require('./chunk-Z5VUZ6YD.cjs');
|
|
14
|
+
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
15
15
|
var chunkOB5F4577_cjs = require('./chunk-OB5F4577.cjs');
|
|
16
16
|
var chunkB4SRYJLM_cjs = require('./chunk-B4SRYJLM.cjs');
|
|
17
17
|
var chunk7UTB4PHM_cjs = require('./chunk-7UTB4PHM.cjs');
|
|
@@ -146,7 +146,7 @@ function WorkflowConfigDialog({
|
|
|
146
146
|
}) {
|
|
147
147
|
const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
|
|
148
148
|
const initialKey = JSON.stringify(initialInputs ?? {});
|
|
149
|
-
const seedKey = JSON.stringify({ ...
|
|
149
|
+
const seedKey = JSON.stringify({ ...chunk3US5OIDQ_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
|
|
150
150
|
const seed = react.useMemo(() => JSON.parse(seedKey), [seedKey]);
|
|
151
151
|
const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
|
|
152
152
|
const [agentId, setAgentId] = useControllableState(
|
|
@@ -158,7 +158,7 @@ function WorkflowConfigDialog({
|
|
|
158
158
|
if (open && inputsProp === void 0) setInputs(seed);
|
|
159
159
|
}, [open, seed]);
|
|
160
160
|
const setField = (name, value) => setInputs({ ...inputs, [name]: value });
|
|
161
|
-
const errors =
|
|
161
|
+
const errors = chunk3US5OIDQ_cjs.validateInputs(workflow, inputs);
|
|
162
162
|
const valid = Object.keys(errors).length === 0;
|
|
163
163
|
const visibleErrors = Object.fromEntries(
|
|
164
164
|
Object.entries(errors).filter(([, e]) => e !== "required")
|
|
@@ -171,7 +171,7 @@ function WorkflowConfigDialog({
|
|
|
171
171
|
const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
|
|
172
172
|
const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
|
|
173
173
|
const launch = (values) => {
|
|
174
|
-
Promise.resolve(onLaunch(
|
|
174
|
+
Promise.resolve(onLaunch(chunk3US5OIDQ_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
|
|
175
175
|
});
|
|
176
176
|
};
|
|
177
177
|
const submit = () => {
|
|
@@ -249,7 +249,7 @@ function WorkflowConfigDialog({
|
|
|
249
249
|
}
|
|
250
250
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
251
251
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
252
|
-
|
|
252
|
+
chunk3US5OIDQ_cjs.SchemaForm,
|
|
253
253
|
{
|
|
254
254
|
fields,
|
|
255
255
|
values: inputs,
|
|
@@ -327,7 +327,7 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
|
|
|
327
327
|
for (const field of workflow.inputs) {
|
|
328
328
|
if (field.type !== "scope") continue;
|
|
329
329
|
const raw = inputs[field.name];
|
|
330
|
-
const scope =
|
|
330
|
+
const scope = chunk3US5OIDQ_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
|
|
331
331
|
next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
|
|
332
332
|
}
|
|
333
333
|
return next;
|
|
@@ -369,9 +369,9 @@ function WorkflowLauncher({
|
|
|
369
369
|
};
|
|
370
370
|
const select = (workflow) => {
|
|
371
371
|
if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
|
|
372
|
-
const inputs =
|
|
373
|
-
if (Object.keys(
|
|
374
|
-
Promise.resolve(onLaunch(
|
|
372
|
+
const inputs = chunk3US5OIDQ_cjs.defaultInputs(workflow);
|
|
373
|
+
if (Object.keys(chunk3US5OIDQ_cjs.validateInputs(workflow, inputs)).length === 0) {
|
|
374
|
+
Promise.resolve(onLaunch(chunk3US5OIDQ_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
|
|
375
375
|
});
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
@@ -521,7 +521,7 @@ function workflowToSkillMarkdown(workflow) {
|
|
|
521
521
|
if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
|
|
522
522
|
if (workflow.requiresFiles) lines.push("requires_files: true");
|
|
523
523
|
if (workflow.inputs.length > 0) {
|
|
524
|
-
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(
|
|
524
|
+
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunk3US5OIDQ_cjs.fieldToFrontmatter))}`);
|
|
525
525
|
}
|
|
526
526
|
lines.push("---", "", run.promptTemplate.trim(), "");
|
|
527
527
|
return lines.join("\n");
|
|
@@ -543,11 +543,11 @@ function workflowFromSkillMarkdown(id, text2) {
|
|
|
543
543
|
} else if (value === "true" || value === "false") frontmatter[key] = value === "true";
|
|
544
544
|
else frontmatter[key] = value;
|
|
545
545
|
}
|
|
546
|
-
return
|
|
546
|
+
return chunk3US5OIDQ_cjs.workflowFromFrontmatter(id, frontmatter, body);
|
|
547
547
|
}
|
|
548
548
|
function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
|
|
549
|
-
const steps =
|
|
550
|
-
const [inputs, setInputs] = react.useState(() =>
|
|
549
|
+
const steps = chunk3US5OIDQ_cjs.workflowSteps(workflow);
|
|
550
|
+
const [inputs, setInputs] = react.useState(() => chunk3US5OIDQ_cjs.initialRunInputs(workflow));
|
|
551
551
|
const [states, setStates] = react.useState({});
|
|
552
552
|
const set = (id, state) => setStates((s) => ({ ...s, [id]: state }));
|
|
553
553
|
const timers = react.useRef(/* @__PURE__ */ new Map());
|
|
@@ -569,10 +569,10 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
569
569
|
react.useEffect(() => {
|
|
570
570
|
if (Object.values(states).some((s) => s.status === "running")) return;
|
|
571
571
|
const next = steps.find(
|
|
572
|
-
(s) => (s.kind === "agent" || s.kind === "action") &&
|
|
572
|
+
(s) => (s.kind === "agent" || s.kind === "action") && chunk3US5OIDQ_cjs.stepPhase(steps, states, s.id) === "ready"
|
|
573
573
|
);
|
|
574
574
|
if (!next || next.kind !== "agent" && next.kind !== "action") return;
|
|
575
|
-
const prompt = next.kind === "agent" ?
|
|
575
|
+
const prompt = next.kind === "agent" ? chunk3US5OIDQ_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
|
|
576
576
|
set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
577
577
|
timers.current.set(
|
|
578
578
|
next.id,
|
|
@@ -585,7 +585,7 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
585
585
|
}, delayMs)
|
|
586
586
|
);
|
|
587
587
|
}, [states, steps, workflow]);
|
|
588
|
-
return
|
|
588
|
+
return chunk3US5OIDQ_cjs.useWorkflowView({
|
|
589
589
|
steps,
|
|
590
590
|
states,
|
|
591
591
|
inputs,
|
|
@@ -2991,7 +2991,7 @@ function TaskStatusPill({
|
|
|
2991
2991
|
const elapsed = generating && !Number.isNaN(started) ? formatElapsed(started, now) : null;
|
|
2992
2992
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5", "data-slot": "task-status", title: hint, children: [
|
|
2993
2993
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2994
|
-
|
|
2994
|
+
chunkDVUZTGVL_cjs.ToneBadge,
|
|
2995
2995
|
{
|
|
2996
2996
|
tone,
|
|
2997
2997
|
icon: /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { status: key }),
|
|
@@ -3572,7 +3572,7 @@ function TaskTable(props) {
|
|
|
3572
3572
|
}
|
|
3573
3573
|
),
|
|
3574
3574
|
goal && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3575
|
-
|
|
3575
|
+
chunkDVUZTGVL_cjs.ToneBadge,
|
|
3576
3576
|
{
|
|
3577
3577
|
tone: goal.done ? "success" : "neutral",
|
|
3578
3578
|
"data-testid": `task-goal-progress-${id}`,
|
|
@@ -4186,7 +4186,7 @@ function TaskInbox(p) {
|
|
|
4186
4186
|
onTabChange: () => {
|
|
4187
4187
|
},
|
|
4188
4188
|
firstTabContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4189
|
-
|
|
4189
|
+
chunk2EI7NCUA_cjs.FilterInput,
|
|
4190
4190
|
{
|
|
4191
4191
|
value: filterText,
|
|
4192
4192
|
onChange: p.onFilterTextChange ?? setLocalQuery,
|
|
@@ -4570,7 +4570,7 @@ function ConversationListView(p) {
|
|
|
4570
4570
|
onTabChange: () => {
|
|
4571
4571
|
},
|
|
4572
4572
|
firstTabContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4573
|
-
|
|
4573
|
+
chunk2EI7NCUA_cjs.FilterInput,
|
|
4574
4574
|
{
|
|
4575
4575
|
value: query,
|
|
4576
4576
|
hideFieldPicker: true,
|
|
@@ -4998,7 +4998,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
4998
4998
|
}
|
|
4999
4999
|
const typed = name?.trim();
|
|
5000
5000
|
if (workflow.options?.agent === false) {
|
|
5001
|
-
const message =
|
|
5001
|
+
const message = chunk3US5OIDQ_cjs.composeWorkflowPrompt(workflow, inputs, context);
|
|
5002
5002
|
return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
|
|
5003
5003
|
}
|
|
5004
5004
|
const derived = typed || deriveWorkflowName(workflow, inputs);
|
|
@@ -5012,7 +5012,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
5012
5012
|
}
|
|
5013
5013
|
return {
|
|
5014
5014
|
name: derived,
|
|
5015
|
-
prompt:
|
|
5015
|
+
prompt: chunk3US5OIDQ_cjs.composeWorkflowPrompt(workflow, inputs, context),
|
|
5016
5016
|
skill_ref: null,
|
|
5017
5017
|
// The files a run is bound to travel in the saved inputs, whatever the template: the server binds
|
|
5018
5018
|
// the run to the ids listed under any input's `documents`.
|
|
@@ -6059,7 +6059,7 @@ function WorkflowsTable(props) {
|
|
|
6059
6059
|
onTabChange: props.onTabChange ?? (() => {
|
|
6060
6060
|
}),
|
|
6061
6061
|
firstTabContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6062
|
-
|
|
6062
|
+
chunk2EI7NCUA_cjs.FilterInput,
|
|
6063
6063
|
{
|
|
6064
6064
|
value: query,
|
|
6065
6065
|
onChange: setQuery,
|
|
@@ -6192,7 +6192,7 @@ function TaskActivityDialog({
|
|
|
6192
6192
|
testId,
|
|
6193
6193
|
...timeline
|
|
6194
6194
|
}) {
|
|
6195
|
-
const l = { ...
|
|
6195
|
+
const l = { ...chunk3US5OIDQ_cjs.DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
|
|
6196
6196
|
const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "task-activity" });
|
|
6197
6197
|
const count = events?.length ?? 0;
|
|
6198
6198
|
const scrollToEnd = react.useCallback(
|
|
@@ -6207,7 +6207,7 @@ function TaskActivityDialog({
|
|
|
6207
6207
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "truncate", children: taskName })
|
|
6208
6208
|
] }),
|
|
6209
6209
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-h-[55dvh] overflow-y-auto pr-1", "data-testid": `${id}-scroll`, children: [
|
|
6210
|
-
isLoading && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.loading }) : isError && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: l.error }) : count === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.empty }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6210
|
+
isLoading && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.loading }) : isError && !events ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: l.error }) : count === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.empty }) : /* @__PURE__ */ jsxRuntime.jsx(chunk3US5OIDQ_cjs.TaskActivityTimeline, { events: events ?? [], labels, testId: id, ...timeline }),
|
|
6211
6211
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollToEnd })
|
|
6212
6212
|
] })
|
|
6213
6213
|
] }) });
|
|
@@ -6334,7 +6334,7 @@ function groupThreadActivity(steps, items) {
|
|
|
6334
6334
|
continue;
|
|
6335
6335
|
}
|
|
6336
6336
|
if (current === void 0) out.before.push(item);
|
|
6337
|
-
else if (
|
|
6337
|
+
else if (chunk3US5OIDQ_cjs.isRunFinished(steps, states)) out.after.push(item);
|
|
6338
6338
|
else {
|
|
6339
6339
|
const status = states[current]?.status;
|
|
6340
6340
|
const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
|
|
@@ -6452,13 +6452,13 @@ function WorkflowThreadStrip({
|
|
|
6452
6452
|
const chevron = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-3 shrink-0 text-muted-foreground" });
|
|
6453
6453
|
const [selected, setSelected] = react.useState(null);
|
|
6454
6454
|
const [open, setOpen] = react.useState(null);
|
|
6455
|
-
const phaseOf = (id) =>
|
|
6455
|
+
const phaseOf = (id) => chunk3US5OIDQ_cjs.stepPhase(steps, states, id);
|
|
6456
6456
|
const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
|
|
6457
6457
|
const waitingOf = (id) => {
|
|
6458
6458
|
const step = steps.find((s) => s.id === id);
|
|
6459
6459
|
const phase = phaseOf(id);
|
|
6460
|
-
const documents =
|
|
6461
|
-
if (documents.length) return
|
|
6460
|
+
const documents = chunk3US5OIDQ_cjs.waitingDocuments(states[id]);
|
|
6461
|
+
if (documents.length) return chunk3US5OIDQ_cjs.waitingForDocumentsText(documents.length);
|
|
6462
6462
|
const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
|
|
6463
6463
|
return name ? l.waitingFor.replace("{name}", name) : void 0;
|
|
6464
6464
|
};
|
|
@@ -6473,14 +6473,14 @@ function WorkflowThreadStrip({
|
|
|
6473
6473
|
"button",
|
|
6474
6474
|
{
|
|
6475
6475
|
type: "button",
|
|
6476
|
-
className: ui.cn(
|
|
6476
|
+
className: ui.cn(chunk3US5OIDQ_cjs.STEP_PILL, "py-0.5", chunk3US5OIDQ_cjs.stepPillTone(phase, isCurrent)),
|
|
6477
6477
|
"aria-current": isCurrent ? "step" : void 0,
|
|
6478
6478
|
title: waiting ? `${step.title} \xB7 ${waiting}` : step.title,
|
|
6479
6479
|
"data-phase": phase,
|
|
6480
6480
|
"data-testid": `workflow-thread-step-${step.id}`,
|
|
6481
6481
|
children: [
|
|
6482
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6483
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: isCurrent ?
|
|
6482
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk3US5OIDQ_cjs.PhaseMark, { phase, icon: iconOf(step) }),
|
|
6483
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: isCurrent ? chunk3US5OIDQ_cjs.STEP_LABEL_CURRENT : ui.cn(chunk3US5OIDQ_cjs.STEP_LABEL, chunk3US5OIDQ_cjs.STEP_LABEL_MAX), children: step.title }),
|
|
6484
6484
|
sentBack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6485
6485
|
lucideReact.CornerUpLeft,
|
|
6486
6486
|
{
|
|
@@ -6492,7 +6492,7 @@ function WorkflowThreadStrip({
|
|
|
6492
6492
|
assignee && isCurrent && !narrow && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6493
6493
|
"span",
|
|
6494
6494
|
{
|
|
6495
|
-
className: ui.cn(
|
|
6495
|
+
className: ui.cn(chunk3US5OIDQ_cjs.STEP_EXTRA, "flex max-w-[12rem] items-center gap-0.5"),
|
|
6496
6496
|
title: waiting,
|
|
6497
6497
|
"data-testid": `workflow-thread-step-${step.id}-assignee`,
|
|
6498
6498
|
children: [
|
|
@@ -6551,9 +6551,9 @@ function WorkflowThreadStrip({
|
|
|
6551
6551
|
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}`))
|
|
6552
6552
|
] }) : null;
|
|
6553
6553
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6554
|
-
|
|
6554
|
+
chunk3US5OIDQ_cjs.StepBarFrame,
|
|
6555
6555
|
{
|
|
6556
|
-
levels:
|
|
6556
|
+
levels: chunk3US5OIDQ_cjs.stepLevels(steps),
|
|
6557
6557
|
phaseOf,
|
|
6558
6558
|
current: selected,
|
|
6559
6559
|
onSelect: (id) => {
|
|
@@ -6638,10 +6638,10 @@ function compactThreadActivity(events) {
|
|
|
6638
6638
|
const count = Math.max(1, entry.recipients.length);
|
|
6639
6639
|
entry.label = `Notified ${count} ${count === 1 ? "user" : "users"}`;
|
|
6640
6640
|
} else if (STEP_LABELS[event.kind]) {
|
|
6641
|
-
const documents =
|
|
6641
|
+
const documents = chunk3US5OIDQ_cjs.eventWaitingDocuments(event.detail);
|
|
6642
6642
|
result.push({
|
|
6643
6643
|
event,
|
|
6644
|
-
label: documents ?
|
|
6644
|
+
label: documents ? chunk3US5OIDQ_cjs.waitingForDocumentsText(documents.length) : STEP_LABELS[event.kind],
|
|
6645
6645
|
recipients: []
|
|
6646
6646
|
});
|
|
6647
6647
|
} else if (["artifact_created", "artifact_edited", "document_added", "document_removed"].includes(
|
|
@@ -7040,7 +7040,7 @@ function defaultTaskComposerValues(workflows, initial) {
|
|
|
7040
7040
|
return {
|
|
7041
7041
|
assignee: "me",
|
|
7042
7042
|
workflowId,
|
|
7043
|
-
inputs: workflow ? { ...
|
|
7043
|
+
inputs: workflow ? { ...chunk3US5OIDQ_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
|
|
7044
7044
|
when: "manual",
|
|
7045
7045
|
runAt: "",
|
|
7046
7046
|
rrule: "",
|
|
@@ -7149,7 +7149,7 @@ function WorkflowComposer({
|
|
|
7149
7149
|
return !docs?.length;
|
|
7150
7150
|
})
|
|
7151
7151
|
);
|
|
7152
|
-
const whatMissing = !workflow || Object.keys(
|
|
7152
|
+
const whatMissing = !workflow || Object.keys(chunk3US5OIDQ_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
|
|
7153
7153
|
const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
|
|
7154
7154
|
const whenMissing = missingWhen(values, runAtPast);
|
|
7155
7155
|
const scheduled = values.when !== "now" && values.when !== "manual";
|
|
@@ -7161,7 +7161,7 @@ function WorkflowComposer({
|
|
|
7161
7161
|
setValues({
|
|
7162
7162
|
...values,
|
|
7163
7163
|
workflowId: next,
|
|
7164
|
-
inputs: def ?
|
|
7164
|
+
inputs: def ? chunk3US5OIDQ_cjs.defaultInputs(def) : {},
|
|
7165
7165
|
...def?.documentAction ? { access: "standing" } : {}
|
|
7166
7166
|
});
|
|
7167
7167
|
};
|
|
@@ -7299,7 +7299,7 @@ function WorkflowComposer({
|
|
|
7299
7299
|
}
|
|
7300
7300
|
),
|
|
7301
7301
|
!noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7302
|
-
|
|
7302
|
+
chunk3US5OIDQ_cjs.SchemaForm,
|
|
7303
7303
|
{
|
|
7304
7304
|
fields,
|
|
7305
7305
|
values: values.inputs,
|
|
@@ -7738,7 +7738,7 @@ function WorkTaskComposer({
|
|
|
7738
7738
|
}, [open]);
|
|
7739
7739
|
const workflow = workflows.find((w) => w.id === values.workflowId);
|
|
7740
7740
|
const fields = workflow?.inputs ?? [];
|
|
7741
|
-
const errors = workflow ?
|
|
7741
|
+
const errors = workflow ? chunk3US5OIDQ_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
|
|
7742
7742
|
const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
|
|
7743
7743
|
const unattended = hasWork && values.when !== "now" && values.when !== "manual";
|
|
7744
7744
|
const canConfigure = !isEdit || seed.assignee === "agent";
|
|
@@ -7746,7 +7746,7 @@ function WorkTaskComposer({
|
|
|
7746
7746
|
const set = (key, value) => setValues({ ...values, [key]: value });
|
|
7747
7747
|
const pickWorkflow = (id2) => {
|
|
7748
7748
|
const next = workflows.find((w) => w.id === id2);
|
|
7749
|
-
setValues({ ...values, workflowId: id2, inputs: next ?
|
|
7749
|
+
setValues({ ...values, workflowId: id2, inputs: next ? chunk3US5OIDQ_cjs.defaultInputs(next) : {} });
|
|
7750
7750
|
};
|
|
7751
7751
|
const openConfigure = () => {
|
|
7752
7752
|
setConfigOpen(true);
|
|
@@ -7932,7 +7932,7 @@ function WorkTaskComposer({
|
|
|
7932
7932
|
)
|
|
7933
7933
|
] }),
|
|
7934
7934
|
workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7935
|
-
|
|
7935
|
+
chunk3US5OIDQ_cjs.SchemaForm,
|
|
7936
7936
|
{
|
|
7937
7937
|
fields,
|
|
7938
7938
|
values: values.inputs,
|
|
@@ -10113,5 +10113,5 @@ exports.workflowToComposerValues = workflowToComposerValues;
|
|
|
10113
10113
|
exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
|
|
10114
10114
|
exports.workflowTriggerType = workflowTriggerType;
|
|
10115
10115
|
exports.workflowWhen = workflowWhen;
|
|
10116
|
-
//# sourceMappingURL=chunk-
|
|
10117
|
-
//# sourceMappingURL=chunk-
|
|
10116
|
+
//# sourceMappingURL=chunk-DDYXFALG.cjs.map
|
|
10117
|
+
//# sourceMappingURL=chunk-DDYXFALG.cjs.map
|