@arbidocs/blocks 0.4.135 → 0.4.137
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 +422 -367
- package/dist/agents/index.js +8 -9
- package/dist/agents/skills/index.d.ts +2 -0
- package/dist/agents/skills/skillFiles.d.ts +65 -0
- package/dist/agents/skills/skillImport.d.ts +36 -0
- package/dist/agents/workflows/WorkflowDocumentsField.d.ts +42 -5
- package/dist/agents/workflows/index.d.ts +3 -3
- package/dist/agents/workflows/workflow.d.ts +19 -0
- package/dist/agents/workflows/workspaceScope.d.ts +12 -0
- package/dist/chat/index.cjs +138 -138
- package/dist/chat/index.js +3 -3
- package/dist/chunk-2KUCVSFF.js +51 -0
- package/dist/chunk-2KUCVSFF.js.map +1 -0
- package/dist/{chunk-GDBDHOI4.js → chunk-3RJN2VTL.js} +36 -6
- package/dist/chunk-3RJN2VTL.js.map +1 -0
- package/dist/{chunk-6AALMYPS.cjs → chunk-6F7SZCVL.cjs} +23 -2
- package/dist/chunk-6F7SZCVL.cjs.map +1 -0
- package/dist/{chunk-PUCY3UXN.js → chunk-7M4C6CK7.js} +3 -3
- package/dist/{chunk-PUCY3UXN.js.map → chunk-7M4C6CK7.js.map} +1 -1
- package/dist/{chunk-2PNNCEPH.js → chunk-ATJUVHVB.js} +1545 -8
- package/dist/chunk-ATJUVHVB.js.map +1 -0
- package/dist/{chunk-4S5IDT5F.cjs → chunk-BUNZWOPX.cjs} +5 -5
- package/dist/{chunk-4S5IDT5F.cjs.map → chunk-BUNZWOPX.cjs.map} +1 -1
- package/dist/{chunk-KYDRUFWT.cjs → chunk-C3ZRLULA.cjs} +5 -5
- package/dist/{chunk-KYDRUFWT.cjs.map → chunk-C3ZRLULA.cjs.map} +1 -1
- package/dist/{chunk-SARREDFP.cjs → chunk-CHVCTKF4.cjs} +1620 -47
- package/dist/chunk-CHVCTKF4.cjs.map +1 -0
- package/dist/chunk-CQCC7LE7.js +210 -0
- package/dist/chunk-CQCC7LE7.js.map +1 -0
- package/dist/{chunk-4UMXQPNA.js → chunk-E5OYHJMU.js} +3 -3
- package/dist/{chunk-4UMXQPNA.js.map → chunk-E5OYHJMU.js.map} +1 -1
- package/dist/{chunk-PJJY6CYL.cjs → chunk-EHOPZBAX.cjs} +11 -11
- package/dist/{chunk-PJJY6CYL.cjs.map → chunk-EHOPZBAX.cjs.map} +1 -1
- package/dist/{chunk-4QIIDXLF.cjs → chunk-HDYWXEQU.cjs} +8 -8
- package/dist/{chunk-4QIIDXLF.cjs.map → chunk-HDYWXEQU.cjs.map} +1 -1
- package/dist/{chunk-GZPTWHP5.cjs → chunk-HLB4DIYV.cjs} +5 -5
- package/dist/{chunk-GZPTWHP5.cjs.map → chunk-HLB4DIYV.cjs.map} +1 -1
- package/dist/{chunk-TT6XV6WM.cjs → chunk-JY73DJOS.cjs} +78 -1274
- package/dist/chunk-JY73DJOS.cjs.map +1 -0
- package/dist/{chunk-ARDHLU73.cjs → chunk-KDUGTKVI.cjs} +21 -2
- package/dist/chunk-KDUGTKVI.cjs.map +1 -0
- package/dist/{chunk-UMIY4SQS.js → chunk-KMNZ2RVO.js} +17 -1191
- package/dist/chunk-KMNZ2RVO.js.map +1 -0
- package/dist/{chunk-6S5FLMWG.js → chunk-KSHKTOY2.js} +203 -7
- package/dist/chunk-KSHKTOY2.js.map +1 -0
- package/dist/{chunk-4RLCRFZS.js → chunk-L2PAPOZ5.js} +21 -3
- package/dist/chunk-L2PAPOZ5.js.map +1 -0
- package/dist/{chunk-QYTYW74G.js → chunk-L3T7OJRX.js} +4 -4
- package/dist/{chunk-QYTYW74G.js.map → chunk-L3T7OJRX.js.map} +1 -1
- package/dist/{chunk-ENDP7JER.js → chunk-M33QUNFH.js} +3 -3
- package/dist/{chunk-ENDP7JER.js.map → chunk-M33QUNFH.js.map} +1 -1
- package/dist/chunk-RFIBUWLF.cjs +232 -0
- package/dist/chunk-RFIBUWLF.cjs.map +1 -0
- package/dist/{chunk-N26CXGXC.cjs → chunk-RQ2Y7USX.cjs} +201 -3
- package/dist/chunk-RQ2Y7USX.cjs.map +1 -0
- package/dist/chunk-UUHUQHXR.cjs +56 -0
- package/dist/chunk-UUHUQHXR.cjs.map +1 -0
- package/dist/{chunk-SZX44LCT.js → chunk-VMESMX7N.js} +3 -3
- package/dist/{chunk-SZX44LCT.js.map → chunk-VMESMX7N.js.map} +1 -1
- package/dist/{chunk-QDEODGXE.cjs → chunk-WS5EX7DN.cjs} +37 -6
- package/dist/chunk-WS5EX7DN.cjs.map +1 -0
- package/dist/{chunk-2DFDFOM7.js → chunk-YOMPLCP6.js} +22 -3
- package/dist/chunk-YOMPLCP6.js.map +1 -0
- package/dist/connect/docx.cjs +4 -4
- package/dist/connect/docx.js +3 -3
- package/dist/connect/index.cjs +463 -97
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +5 -2
- package/dist/connect/index.js +387 -49
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedSkillUpload.d.ts +26 -2
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +24 -12
- package/dist/connection/ConnectedWorkflowLauncher.d.ts +35 -0
- package/dist/connection/ConnectedWorkflowsTable.d.ts +62 -0
- package/dist/connection/ConnectionProvider.d.ts +17 -0
- package/dist/connection/workspaceData.d.ts +45 -0
- 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 +20 -21
- package/dist/home/index.cjs.map +1 -1
- package/dist/home/index.js +2 -3
- package/dist/home/index.js.map +1 -1
- package/dist/index.cjs +610 -555
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -15
- package/dist/index.js.map +1 -1
- package/dist/settings/index.cjs +11 -11
- package/dist/settings/index.js +2 -2
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +7 -7
- package/dist/studio/index.js +5 -5
- package/dist/workflow-canvas/index.cjs +122 -96
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.d.ts +1 -1
- package/dist/workflow-canvas/index.js +73 -48
- package/dist/workflow-canvas/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-2DFDFOM7.js.map +0 -1
- package/dist/chunk-2PNNCEPH.js.map +0 -1
- package/dist/chunk-4RLCRFZS.js.map +0 -1
- package/dist/chunk-4XJZ6AAY.js +0 -407
- package/dist/chunk-4XJZ6AAY.js.map +0 -1
- package/dist/chunk-6AALMYPS.cjs.map +0 -1
- package/dist/chunk-6S5FLMWG.js.map +0 -1
- package/dist/chunk-7D737FLE.cjs +0 -43
- package/dist/chunk-7D737FLE.cjs.map +0 -1
- package/dist/chunk-ARDHLU73.cjs.map +0 -1
- package/dist/chunk-GDBDHOI4.js.map +0 -1
- package/dist/chunk-N26CXGXC.cjs.map +0 -1
- package/dist/chunk-QDEODGXE.cjs.map +0 -1
- package/dist/chunk-S5HZBXZA.cjs +0 -430
- package/dist/chunk-S5HZBXZA.cjs.map +0 -1
- package/dist/chunk-SARREDFP.cjs.map +0 -1
- package/dist/chunk-TT6XV6WM.cjs.map +0 -1
- package/dist/chunk-UMIY4SQS.js.map +0 -1
- package/dist/chunk-XD2M6LIG.js +0 -41
- package/dist/chunk-XD2M6LIG.js.map +0 -1
|
@@ -2,313 +2,34 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkRFIBUWLF_cjs = require('./chunk-RFIBUWLF.cjs');
|
|
6
6
|
var chunkDVUZTGVL_cjs = require('./chunk-DVUZTGVL.cjs');
|
|
7
|
+
var chunkCHVCTKF4_cjs = require('./chunk-CHVCTKF4.cjs');
|
|
8
|
+
var chunkRQ2Y7USX_cjs = require('./chunk-RQ2Y7USX.cjs');
|
|
7
9
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
+
var chunkWS5EX7DN_cjs = require('./chunk-WS5EX7DN.cjs');
|
|
11
|
+
var chunkR26BK7YL_cjs = require('./chunk-R26BK7YL.cjs');
|
|
10
12
|
var chunkV4ISCZJ7_cjs = require('./chunk-V4ISCZJ7.cjs');
|
|
11
13
|
var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
|
|
12
14
|
var chunkC2CWWEHO_cjs = require('./chunk-C2CWWEHO.cjs');
|
|
13
|
-
var chunkQDEODGXE_cjs = require('./chunk-QDEODGXE.cjs');
|
|
14
|
-
var chunkR26BK7YL_cjs = require('./chunk-R26BK7YL.cjs');
|
|
15
|
-
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
16
15
|
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
17
|
-
var
|
|
16
|
+
var chunk6F7SZCVL_cjs = require('./chunk-6F7SZCVL.cjs');
|
|
18
17
|
var chunk7UTB4PHM_cjs = require('./chunk-7UTB4PHM.cjs');
|
|
19
18
|
var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
|
|
20
19
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
21
20
|
var chunkC4WSHRR6_cjs = require('./chunk-C4WSHRR6.cjs');
|
|
22
21
|
var chunkULWRNGGE_cjs = require('./chunk-ULWRNGGE.cjs');
|
|
23
22
|
var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
|
|
24
|
-
var react = require('react');
|
|
25
|
-
var ui = require('@arbidocs/react/ui');
|
|
26
23
|
var jsxRuntime = require('react/jsx-runtime');
|
|
24
|
+
var react = require('react');
|
|
27
25
|
var lucideReact = require('lucide-react');
|
|
26
|
+
var ui = require('@arbidocs/react/ui');
|
|
28
27
|
|
|
29
|
-
function useControllableState(value, defaultValue, onChange) {
|
|
30
|
-
const [inner, setInner] = react.useState(defaultValue);
|
|
31
|
-
const isControlled = value !== void 0;
|
|
32
|
-
const current = isControlled ? value : inner;
|
|
33
|
-
const onChangeRef = react.useRef(onChange);
|
|
34
|
-
onChangeRef.current = onChange;
|
|
35
|
-
const set = react.useCallback(
|
|
36
|
-
(next) => {
|
|
37
|
-
if (!isControlled) setInner(next);
|
|
38
|
-
onChangeRef.current?.(next);
|
|
39
|
-
},
|
|
40
|
-
[isControlled]
|
|
41
|
-
);
|
|
42
|
-
return [current, set];
|
|
43
|
-
}
|
|
44
|
-
var DEFAULT_AGENT_SELECT_LABELS = {
|
|
45
|
-
label: "Run as",
|
|
46
|
-
myAssistant: "My assistant"
|
|
47
|
-
};
|
|
48
|
-
var ME = "__me__";
|
|
49
|
-
function AgentSelect({
|
|
50
|
-
agents,
|
|
51
|
-
value,
|
|
52
|
-
defaultValue = "",
|
|
53
|
-
onValueChange,
|
|
54
|
-
hideLabel,
|
|
55
|
-
disabled,
|
|
56
|
-
className,
|
|
57
|
-
labels,
|
|
58
|
-
testId,
|
|
59
|
-
optionTestId
|
|
60
|
-
}) {
|
|
61
|
-
const l = { ...DEFAULT_AGENT_SELECT_LABELS, ...labels };
|
|
62
|
-
const triggerId = react.useId();
|
|
63
|
-
const [current, setCurrent] = useControllableState(value, defaultValue, onValueChange);
|
|
64
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("flex flex-col gap-1.5", className), "data-slot": "agent-select", children: [
|
|
65
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: triggerId, className: hideLabel ? "sr-only" : void 0, children: l.label }),
|
|
66
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
67
|
-
ui.Select,
|
|
68
|
-
{
|
|
69
|
-
value: current === "" ? ME : current,
|
|
70
|
-
onValueChange: (v) => setCurrent(v === ME ? "" : v),
|
|
71
|
-
disabled,
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
74
|
-
ui.SelectTrigger,
|
|
75
|
-
{
|
|
76
|
-
id: triggerId,
|
|
77
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "agent-select" }),
|
|
78
|
-
className: "pointer-coarse:min-h-11",
|
|
79
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ui.SelectValue, {})
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.SelectContent, { children: [
|
|
83
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84
|
-
ui.SelectItem,
|
|
85
|
-
{
|
|
86
|
-
value: ME,
|
|
87
|
-
"data-testid": chunkMHVNT4J3_cjs.prefixedTestId(optionTestId, "me", {
|
|
88
|
-
testId: "agent-select-option-me"
|
|
89
|
-
}),
|
|
90
|
-
children: l.myAssistant
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
agents.map((agent) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
94
|
-
ui.SelectItem,
|
|
95
|
-
{
|
|
96
|
-
value: agent.id,
|
|
97
|
-
"data-testid": chunkMHVNT4J3_cjs.prefixedTestId(optionTestId, agent.id, {
|
|
98
|
-
testId: `agent-select-option-${agent.id}`
|
|
99
|
-
}),
|
|
100
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
|
|
101
|
-
agent.avatar,
|
|
102
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: agent.label }),
|
|
103
|
-
agent.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: agent.description })
|
|
104
|
-
] })
|
|
105
|
-
},
|
|
106
|
-
agent.id
|
|
107
|
-
))
|
|
108
|
-
] })
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
)
|
|
112
|
-
] });
|
|
113
|
-
}
|
|
114
|
-
var DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS = {
|
|
115
|
-
start: "Start",
|
|
116
|
-
starting: "Starting\u2026",
|
|
117
|
-
addFilesReason: "This reads your files, and there is nothing to read yet.",
|
|
118
|
-
agentLabel: "Run as"
|
|
119
|
-
};
|
|
120
|
-
function WorkflowConfigDialog({
|
|
121
|
-
workflow,
|
|
122
|
-
open,
|
|
123
|
-
onOpenChange,
|
|
124
|
-
onLaunch,
|
|
125
|
-
initialInputs,
|
|
126
|
-
inputs: inputsProp,
|
|
127
|
-
onInputsChange,
|
|
128
|
-
scopeSource,
|
|
129
|
-
renderScope,
|
|
130
|
-
renderDocuments,
|
|
131
|
-
renderIcon,
|
|
132
|
-
addFilesAction,
|
|
133
|
-
agents,
|
|
134
|
-
agentId: agentIdProp,
|
|
135
|
-
onAgentChange,
|
|
136
|
-
isLaunching,
|
|
137
|
-
submitLabel,
|
|
138
|
-
fieldPlaceholder,
|
|
139
|
-
renderNotice,
|
|
140
|
-
labels,
|
|
141
|
-
formLabels,
|
|
142
|
-
agentLabels,
|
|
143
|
-
testId,
|
|
144
|
-
startTestId,
|
|
145
|
-
className
|
|
146
|
-
}) {
|
|
147
|
-
const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
|
|
148
|
-
const initialKey = JSON.stringify(initialInputs ?? {});
|
|
149
|
-
const seedKey = JSON.stringify({ ...chunk6AALMYPS_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
|
|
150
|
-
const seed = react.useMemo(() => JSON.parse(seedKey), [seedKey]);
|
|
151
|
-
const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
|
|
152
|
-
const [agentId, setAgentId] = useControllableState(
|
|
153
|
-
agentIdProp,
|
|
154
|
-
workflow.defaultAgentId ?? "",
|
|
155
|
-
onAgentChange
|
|
156
|
-
);
|
|
157
|
-
react.useEffect(() => {
|
|
158
|
-
if (open && inputsProp === void 0) setInputs(seed);
|
|
159
|
-
}, [open, seed]);
|
|
160
|
-
const setField = (name, value) => setInputs({ ...inputs, [name]: value });
|
|
161
|
-
const errors = chunk6AALMYPS_cjs.validateInputs(workflow, inputs);
|
|
162
|
-
const valid = Object.keys(errors).length === 0;
|
|
163
|
-
const visibleErrors = Object.fromEntries(
|
|
164
|
-
Object.entries(errors).filter(([, e]) => e !== "required")
|
|
165
|
-
);
|
|
166
|
-
const scopeField = workflow.inputs.find((f) => f.type === "scope");
|
|
167
|
-
const rawScope = scopeField ? inputs[scopeField.name] : void 0;
|
|
168
|
-
const scopeValue = rawScope && typeof rawScope === "object" ? rawScope : { folders: [], labels: [] };
|
|
169
|
-
const matchedCount = scopeSource && scopeField ? scopeSource.countMatching(scopeValue) : null;
|
|
170
|
-
const noFiles = Boolean(workflow.requiresFiles && scopeSource && scopeSource.totalCount === 0);
|
|
171
|
-
const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
|
|
172
|
-
const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
|
|
173
|
-
const launch = (values) => {
|
|
174
|
-
Promise.resolve(onLaunch(chunk6AALMYPS_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
const submit = () => {
|
|
178
|
-
if (!valid || noFiles || blockedByScope || isLaunching) return;
|
|
179
|
-
launch(inputs);
|
|
180
|
-
};
|
|
181
|
-
const fields = react.useMemo(
|
|
182
|
-
() => workflow.inputs.map((f) => {
|
|
183
|
-
const placeholder = fieldPlaceholder?.(f, inputs, workflow);
|
|
184
|
-
return placeholder === void 0 ? f : { ...f, placeholder };
|
|
185
|
-
}),
|
|
186
|
-
[workflow, fieldPlaceholder, inputs]
|
|
187
|
-
);
|
|
188
|
-
const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "workflow-dialog" });
|
|
189
|
-
const formRef = react.useRef(null);
|
|
190
|
-
const firstField = workflow.inputs.find((f) => !f.advanced);
|
|
191
|
-
const focusPromptFirst = firstField?.type === "text" || firstField?.type === "longtext";
|
|
192
|
-
const defaultScopeRender = scopeSource ? (_field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
193
|
-
chunkQDEODGXE_cjs.ScopePicker,
|
|
194
|
-
{
|
|
195
|
-
folders: scopeSource.folders,
|
|
196
|
-
unfiledCount: scopeSource.unfiledCount,
|
|
197
|
-
labels: scopeSource.labels,
|
|
198
|
-
totalCount: scopeSource.totalCount,
|
|
199
|
-
matchedCount: scopeSource.countMatching(value),
|
|
200
|
-
scope: value,
|
|
201
|
-
onScopeChange: onChange
|
|
202
|
-
}
|
|
203
|
-
) : void 0;
|
|
204
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
205
|
-
ui.DialogContent,
|
|
206
|
-
{
|
|
207
|
-
presentation: "sheet",
|
|
208
|
-
className: `max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-xl ${className ?? ""}`,
|
|
209
|
-
"data-testid": id,
|
|
210
|
-
"data-workflow": workflow.id,
|
|
211
|
-
onOpenAutoFocus: (event) => {
|
|
212
|
-
if (!focusPromptFirst || !firstField) return;
|
|
213
|
-
const control = formRef.current?.querySelector(
|
|
214
|
-
`[data-testid="${id}-field-${firstField.name}"]`
|
|
215
|
-
);
|
|
216
|
-
if (!control) return;
|
|
217
|
-
event.preventDefault();
|
|
218
|
-
control.focus();
|
|
219
|
-
if (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) {
|
|
220
|
-
const end = control.value.length;
|
|
221
|
-
control.setSelectionRange(end, end);
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
children: [
|
|
225
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
226
|
-
chunkQDEODGXE_cjs.QuickActionDialogHeader,
|
|
227
|
-
{
|
|
228
|
-
icon: workflow.icon && renderIcon ? renderIcon(workflow.icon) : null,
|
|
229
|
-
title: workflow.title,
|
|
230
|
-
description: workflow.details ?? workflow.description,
|
|
231
|
-
descriptionTestId: `${id}-description`
|
|
232
|
-
}
|
|
233
|
-
),
|
|
234
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
235
|
-
"form",
|
|
236
|
-
{
|
|
237
|
-
ref: formRef,
|
|
238
|
-
className: "mt-2 flex flex-col gap-4",
|
|
239
|
-
onSubmit: (event) => {
|
|
240
|
-
event.preventDefault();
|
|
241
|
-
submit();
|
|
242
|
-
},
|
|
243
|
-
children: noFiles ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
244
|
-
chunkQDEODGXE_cjs.AddFilesFirst,
|
|
245
|
-
{
|
|
246
|
-
reason: l.addFilesReason,
|
|
247
|
-
action: addFilesAction,
|
|
248
|
-
testId: `${id}-empty-state`
|
|
249
|
-
}
|
|
250
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
251
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
252
|
-
chunkSARREDFP_cjs.SchemaForm,
|
|
253
|
-
{
|
|
254
|
-
fields,
|
|
255
|
-
values: inputs,
|
|
256
|
-
onChange: setField,
|
|
257
|
-
errors: visibleErrors,
|
|
258
|
-
renderScope: renderScope ?? defaultScopeRender,
|
|
259
|
-
renderDocuments,
|
|
260
|
-
renderIcon,
|
|
261
|
-
labels: formLabels,
|
|
262
|
-
onEnterSubmit: submit,
|
|
263
|
-
testIdPrefix: `${id}-field`
|
|
264
|
-
}
|
|
265
|
-
),
|
|
266
|
-
renderNotice?.({ workflow, inputs }),
|
|
267
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
268
|
-
"div",
|
|
269
|
-
{
|
|
270
|
-
className: "flex flex-col gap-3 border-t border-border pt-3 sm:flex-row sm:items-end sm:justify-between",
|
|
271
|
-
"data-slot": "workflow-footer",
|
|
272
|
-
children: [
|
|
273
|
-
showAgent ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
274
|
-
AgentSelect,
|
|
275
|
-
{
|
|
276
|
-
agents: agents ?? [],
|
|
277
|
-
value: agentId,
|
|
278
|
-
onValueChange: setAgentId,
|
|
279
|
-
labels: { label: l.agentLabel, ...agentLabels },
|
|
280
|
-
testId: `${id}-agent`,
|
|
281
|
-
className: "sm:w-56"
|
|
282
|
-
}
|
|
283
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
284
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
285
|
-
ui.Button,
|
|
286
|
-
{
|
|
287
|
-
type: "submit",
|
|
288
|
-
className: "gap-1.5 px-5 pointer-coarse:min-h-11",
|
|
289
|
-
disabled: !valid || blockedByScope || isLaunching,
|
|
290
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(startTestId, { testId: "workflow-start-button" }),
|
|
291
|
-
children: [
|
|
292
|
-
isLaunching ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "size-4" }),
|
|
293
|
-
isLaunching ? l.starting : submitLabel?.({ workflow, inputs, matchedCount }) ?? workflow.startLabel ?? l.start
|
|
294
|
-
]
|
|
295
|
-
}
|
|
296
|
-
)
|
|
297
|
-
]
|
|
298
|
-
}
|
|
299
|
-
)
|
|
300
|
-
] })
|
|
301
|
-
}
|
|
302
|
-
)
|
|
303
|
-
]
|
|
304
|
-
}
|
|
305
|
-
) });
|
|
306
|
-
}
|
|
307
28
|
function defaultScopeRenderer(scopeSource) {
|
|
308
29
|
if (!scopeSource) return void 0;
|
|
309
30
|
return function renderScope(_field, value, onChange) {
|
|
310
31
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
311
|
-
|
|
32
|
+
chunkWS5EX7DN_cjs.ScopePicker,
|
|
312
33
|
{
|
|
313
34
|
folders: scopeSource.folders,
|
|
314
35
|
unfiledCount: scopeSource.unfiledCount,
|
|
@@ -327,227 +48,14 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
|
|
|
327
48
|
for (const field of workflow.inputs) {
|
|
328
49
|
if (field.type !== "scope") continue;
|
|
329
50
|
const raw = inputs[field.name];
|
|
330
|
-
const scope =
|
|
51
|
+
const scope = chunk6F7SZCVL_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
|
|
331
52
|
next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
|
|
332
53
|
}
|
|
333
54
|
return next;
|
|
334
55
|
}
|
|
335
|
-
function WorkflowLauncher({
|
|
336
|
-
workflows,
|
|
337
|
-
tileWorkflows,
|
|
338
|
-
onLaunch,
|
|
339
|
-
showTiles = true,
|
|
340
|
-
caption,
|
|
341
|
-
captionTestId,
|
|
342
|
-
tileTestId,
|
|
343
|
-
disabledReason,
|
|
344
|
-
activeId: activeIdProp,
|
|
345
|
-
onActiveIdChange,
|
|
346
|
-
initialInputsFor,
|
|
347
|
-
testId,
|
|
348
|
-
extraTiles = [],
|
|
349
|
-
className,
|
|
350
|
-
children,
|
|
351
|
-
renderIcon,
|
|
352
|
-
...dialog
|
|
353
|
-
}) {
|
|
354
|
-
const [activeId, setActiveId] = useControllableState(
|
|
355
|
-
activeIdProp,
|
|
356
|
-
null,
|
|
357
|
-
onActiveIdChange
|
|
358
|
-
);
|
|
359
|
-
const [isLaunching, setIsLaunching] = react.useState(false);
|
|
360
|
-
const active = workflows.find((w) => w.id === activeId) ?? null;
|
|
361
|
-
const run = async (launch) => {
|
|
362
|
-
setIsLaunching(true);
|
|
363
|
-
try {
|
|
364
|
-
await onLaunch(launch);
|
|
365
|
-
setActiveId(null);
|
|
366
|
-
} finally {
|
|
367
|
-
setIsLaunching(false);
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
|
-
const select = (workflow) => {
|
|
371
|
-
if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
|
|
372
|
-
const inputs = chunk6AALMYPS_cjs.defaultInputs(workflow);
|
|
373
|
-
if (Object.keys(chunk6AALMYPS_cjs.validateInputs(workflow, inputs)).length === 0) {
|
|
374
|
-
Promise.resolve(onLaunch(chunk6AALMYPS_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
|
|
375
|
-
});
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
setActiveId(workflow.id);
|
|
380
|
-
};
|
|
381
|
-
const tiles = (tileWorkflows ?? workflows).map((workflow) => {
|
|
382
|
-
const reason = disabledReason?.(workflow);
|
|
383
|
-
return {
|
|
384
|
-
id: workflow.id,
|
|
385
|
-
iconNode: workflow.icon && renderIcon ? renderIcon(workflow.icon) : void 0,
|
|
386
|
-
title: workflow.title,
|
|
387
|
-
description: workflow.description,
|
|
388
|
-
onSelect: () => select(workflow),
|
|
389
|
-
disabled: reason !== void 0,
|
|
390
|
-
disabledReason: reason,
|
|
391
|
-
testId: tileTestId?.(workflow) ?? `workflow-tile-${workflow.id}`
|
|
392
|
-
};
|
|
393
|
-
});
|
|
394
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, "data-slot": "workflow-launcher", children: [
|
|
395
|
-
showTiles && /* @__PURE__ */ jsxRuntime.jsx(
|
|
396
|
-
chunkQDEODGXE_cjs.StartTiles,
|
|
397
|
-
{
|
|
398
|
-
items: [...tiles, ...extraTiles],
|
|
399
|
-
caption,
|
|
400
|
-
captionTestId,
|
|
401
|
-
testId
|
|
402
|
-
}
|
|
403
|
-
),
|
|
404
|
-
children,
|
|
405
|
-
active && /* @__PURE__ */ jsxRuntime.jsx(
|
|
406
|
-
WorkflowConfigDialog,
|
|
407
|
-
{
|
|
408
|
-
...dialog,
|
|
409
|
-
renderIcon,
|
|
410
|
-
workflow: active,
|
|
411
|
-
open: true,
|
|
412
|
-
onOpenChange: (open) => !open && setActiveId(null),
|
|
413
|
-
onLaunch: run,
|
|
414
|
-
isLaunching,
|
|
415
|
-
initialInputs: initialInputsFor?.(active)
|
|
416
|
-
}
|
|
417
|
-
)
|
|
418
|
-
] });
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
// src/agents/workflows/workspaceScope.ts
|
|
422
|
-
var canonical = (path) => (path ?? "").split("/").map((part) => part.trim()).filter(Boolean).join("/");
|
|
423
|
-
function matchWorkflowScope(docs, scope) {
|
|
424
|
-
if (scope.documents?.length) {
|
|
425
|
-
const ids = new Set(scope.documents);
|
|
426
|
-
return docs.filter((doc) => ids.has(doc.external_id));
|
|
427
|
-
}
|
|
428
|
-
if (!scope.folders.length && !scope.labels.length) return docs;
|
|
429
|
-
const folders = scope.folders.map(canonical);
|
|
430
|
-
const labels = new Set(scope.labels);
|
|
431
|
-
return docs.filter((doc) => {
|
|
432
|
-
const folder = canonical(doc.folder);
|
|
433
|
-
return folders.some(
|
|
434
|
-
(path) => path === "" ? folder === "" : folder === path || folder.startsWith(`${path}/`)
|
|
435
|
-
) || doc.doctags?.some((tag) => labels.has(tag.tag_ext_id));
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
function buildWorkflowScopeSource(docs, labels = []) {
|
|
439
|
-
const counts = /* @__PURE__ */ new Map();
|
|
440
|
-
for (const doc of docs) {
|
|
441
|
-
const parts = canonical(doc.folder).split("/").filter(Boolean);
|
|
442
|
-
for (let i = 1; i <= parts.length; i++) {
|
|
443
|
-
const path = parts.slice(0, i).join("/");
|
|
444
|
-
counts.set(path, (counts.get(path) ?? 0) + 1);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
return {
|
|
448
|
-
folders: [...counts].sort(([a], [b]) => a.localeCompare(b)).map(([path, count]) => ({
|
|
449
|
-
path,
|
|
450
|
-
count,
|
|
451
|
-
label: path.split("/").at(-1),
|
|
452
|
-
depth: path.split("/").length - 1
|
|
453
|
-
})),
|
|
454
|
-
unfiledCount: docs.filter((doc) => !canonical(doc.folder)).length,
|
|
455
|
-
labels: labels.map((label) => ({
|
|
456
|
-
id: label.external_id,
|
|
457
|
-
name: label.name,
|
|
458
|
-
color: label.color ?? "currentColor",
|
|
459
|
-
count: docs.filter((doc) => doc.doctags?.some((tag) => tag.tag_ext_id === label.external_id)).length
|
|
460
|
-
})),
|
|
461
|
-
totalCount: docs.length,
|
|
462
|
-
countMatching: (scope) => matchWorkflowScope(docs, scope).length,
|
|
463
|
-
resolveDocuments: (scope) => matchWorkflowScope(docs, scope).map((doc) => doc.external_id)
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
function WorkflowDocumentsField({
|
|
467
|
-
field,
|
|
468
|
-
value,
|
|
469
|
-
onChange,
|
|
470
|
-
documents,
|
|
471
|
-
addFilesAction
|
|
472
|
-
}) {
|
|
473
|
-
const ids = value.documents ?? [];
|
|
474
|
-
const max = field.max ?? 1;
|
|
475
|
-
const set = (documents2) => onChange({ ...value, documents: documents2 });
|
|
476
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `workflow-documents-${field.name}`, className: "space-y-2", children: [
|
|
477
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
478
|
-
chunkS5HZBXZA_cjs.DocumentPicker,
|
|
479
|
-
{
|
|
480
|
-
groups: [{ id: "workspace", docs: documents }],
|
|
481
|
-
value: ids[0] ?? "",
|
|
482
|
-
selected: documents.find((doc) => doc.id === ids[0]),
|
|
483
|
-
selectedIds: max > 1 ? ids : void 0,
|
|
484
|
-
onValueChange: (id) => set(
|
|
485
|
-
ids.includes(id) ? ids.filter((selected) => selected !== id) : [...ids, id].slice(-max)
|
|
486
|
-
)
|
|
487
|
-
}
|
|
488
|
-
),
|
|
489
|
-
ids.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: ids.map((id) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
490
|
-
ui.Button,
|
|
491
|
-
{
|
|
492
|
-
type: "button",
|
|
493
|
-
variant: "outline",
|
|
494
|
-
size: "sm",
|
|
495
|
-
onClick: () => set(ids.filter((selected) => selected !== id)),
|
|
496
|
-
"aria-label": `Remove ${documents.find((doc) => doc.id === id)?.title ?? id}`,
|
|
497
|
-
children: [
|
|
498
|
-
documents.find((doc) => doc.id === id)?.title ?? id,
|
|
499
|
-
" \xD7"
|
|
500
|
-
]
|
|
501
|
-
},
|
|
502
|
-
id
|
|
503
|
-
)) }),
|
|
504
|
-
addFilesAction
|
|
505
|
-
] });
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
// src/agents/workflows/skillMarkdown.ts
|
|
509
|
-
var JSON_KEYS = /* @__PURE__ */ new Set(["inputs"]);
|
|
510
|
-
var oneLine = (text2) => text2.replace(/\s*\n\s*/g, " ").trim();
|
|
511
|
-
var skillSlug = (raw) => raw.toLowerCase().replace(/[^a-z0-9-]/g, "");
|
|
512
|
-
function workflowToSkillMarkdown(workflow) {
|
|
513
|
-
const { run } = workflow;
|
|
514
|
-
if (run.kind !== "prompt") throw new Error("Only skills that start a chat can be copied");
|
|
515
|
-
const lines = [
|
|
516
|
-
"---",
|
|
517
|
-
`name: ${skillSlug(workflow.id)}`,
|
|
518
|
-
`description: ${oneLine(workflow.description)}`
|
|
519
|
-
];
|
|
520
|
-
if (workflow.icon) lines.push(`icon: ${workflow.icon}`);
|
|
521
|
-
if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
|
|
522
|
-
if (workflow.requiresFiles) lines.push("requires_files: true");
|
|
523
|
-
if (workflow.inputs.length > 0) {
|
|
524
|
-
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunk6AALMYPS_cjs.fieldToFrontmatter))}`);
|
|
525
|
-
}
|
|
526
|
-
lines.push("---", "", run.promptTemplate.trim(), "");
|
|
527
|
-
return lines.join("\n");
|
|
528
|
-
}
|
|
529
|
-
function workflowFromSkillMarkdown(id, text2) {
|
|
530
|
-
const match = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(text2);
|
|
531
|
-
const frontmatter = {};
|
|
532
|
-
const body = match ? match[2] : text2;
|
|
533
|
-
for (const line of (match ? match[1] : "").split("\n")) {
|
|
534
|
-
const i = line.indexOf(":");
|
|
535
|
-
if (i < 1) continue;
|
|
536
|
-
const key = line.slice(0, i).trim();
|
|
537
|
-
const value = line.slice(i + 1).trim();
|
|
538
|
-
if (JSON_KEYS.has(key)) {
|
|
539
|
-
try {
|
|
540
|
-
frontmatter[key] = JSON.parse(value);
|
|
541
|
-
} catch {
|
|
542
|
-
}
|
|
543
|
-
} else if (value === "true" || value === "false") frontmatter[key] = value === "true";
|
|
544
|
-
else frontmatter[key] = value;
|
|
545
|
-
}
|
|
546
|
-
return chunk6AALMYPS_cjs.workflowFromFrontmatter(id, frontmatter, body);
|
|
547
|
-
}
|
|
548
56
|
function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
|
|
549
|
-
const steps =
|
|
550
|
-
const [inputs, setInputs] = react.useState(() =>
|
|
57
|
+
const steps = chunk6F7SZCVL_cjs.workflowSteps(workflow);
|
|
58
|
+
const [inputs, setInputs] = react.useState(() => chunk6F7SZCVL_cjs.initialRunInputs(workflow));
|
|
551
59
|
const [states, setStates] = react.useState({});
|
|
552
60
|
const set = (id, state) => setStates((s) => ({ ...s, [id]: state }));
|
|
553
61
|
const timers = react.useRef(/* @__PURE__ */ new Map());
|
|
@@ -569,10 +77,10 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
569
77
|
react.useEffect(() => {
|
|
570
78
|
if (Object.values(states).some((s) => s.status === "running")) return;
|
|
571
79
|
const next = steps.find(
|
|
572
|
-
(s) => (s.kind === "agent" || s.kind === "action") &&
|
|
80
|
+
(s) => (s.kind === "agent" || s.kind === "action") && chunk6F7SZCVL_cjs.stepPhase(steps, states, s.id) === "ready"
|
|
573
81
|
);
|
|
574
82
|
if (!next || next.kind !== "agent" && next.kind !== "action") return;
|
|
575
|
-
const prompt = next.kind === "agent" ?
|
|
83
|
+
const prompt = next.kind === "agent" ? chunk6F7SZCVL_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
|
|
576
84
|
set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
577
85
|
timers.current.set(
|
|
578
86
|
next.id,
|
|
@@ -585,7 +93,7 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
585
93
|
}, delayMs)
|
|
586
94
|
);
|
|
587
95
|
}, [states, steps, workflow]);
|
|
588
|
-
return
|
|
96
|
+
return chunkCHVCTKF4_cjs.useWorkflowView({
|
|
589
97
|
steps,
|
|
590
98
|
states,
|
|
591
99
|
inputs,
|
|
@@ -1073,7 +581,7 @@ function AgentCreator({
|
|
|
1073
581
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1074
582
|
[open]
|
|
1075
583
|
);
|
|
1076
|
-
const [values, setValues] = useControllableState(
|
|
584
|
+
const [values, setValues] = chunkCHVCTKF4_cjs.useControllableState(
|
|
1077
585
|
valuesProp,
|
|
1078
586
|
seed,
|
|
1079
587
|
onValuesChange
|
|
@@ -1201,7 +709,7 @@ function AgentCreator({
|
|
|
1201
709
|
] })
|
|
1202
710
|
] }),
|
|
1203
711
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1204
|
-
|
|
712
|
+
chunkWS5EX7DN_cjs.FoldSection,
|
|
1205
713
|
{
|
|
1206
714
|
label: l.advanced,
|
|
1207
715
|
open: advancedOpen,
|
|
@@ -2485,13 +1993,13 @@ function describeRRule(rrule) {
|
|
|
2485
1993
|
if (!rrule) return "Recurring";
|
|
2486
1994
|
const preset = parseRRule(rrule);
|
|
2487
1995
|
if (!preset) return rrule;
|
|
2488
|
-
const
|
|
2489
|
-
if (preset.frequency === "daily") return `Daily at ${
|
|
1996
|
+
const time = `${pad2(preset.hour)}:${pad2(preset.minute)}`;
|
|
1997
|
+
if (preset.frequency === "daily") return `Daily at ${time}`;
|
|
2490
1998
|
if (preset.frequency === "weekly") {
|
|
2491
1999
|
const days = preset.weekdays.map((d) => WEEKDAY_LABELS[d]).join(", ");
|
|
2492
|
-
return `Weekly on ${days} at ${
|
|
2000
|
+
return `Weekly on ${days} at ${time}`;
|
|
2493
2001
|
}
|
|
2494
|
-
return `Monthly on the ${ordinal(preset.monthDay)} at ${
|
|
2002
|
+
return `Monthly on the ${ordinal(preset.monthDay)} at ${time}`;
|
|
2495
2003
|
}
|
|
2496
2004
|
var DEFAULT_RECURRENCE_BUILDER_LABELS = {
|
|
2497
2005
|
rruleLabel: "Custom schedule (iCalendar rule)",
|
|
@@ -2689,22 +2197,6 @@ function goalProgress(task) {
|
|
|
2689
2197
|
if (!gs || gs.criteria_total == null) return null;
|
|
2690
2198
|
return { met: gs.criteria_met ?? 0, total: gs.criteria_total, done: gs.done === true };
|
|
2691
2199
|
}
|
|
2692
|
-
function PersonPill({ person, size = "sm", testId }) {
|
|
2693
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": testId, className: "inline-flex min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2694
|
-
ui.UserEntity,
|
|
2695
|
-
{
|
|
2696
|
-
variant: "pill",
|
|
2697
|
-
size,
|
|
2698
|
-
interactive: false,
|
|
2699
|
-
showTooltip: false,
|
|
2700
|
-
initials: chunkKDG6FER6_cjs.initials(person.label),
|
|
2701
|
-
displayName: person.label,
|
|
2702
|
-
avatarStyle: person.id ? ui.getEntityColorStyles(person.id) : void 0,
|
|
2703
|
-
isAgent: person.isAgent,
|
|
2704
|
-
isMe: person.isMe
|
|
2705
|
-
}
|
|
2706
|
-
) });
|
|
2707
|
-
}
|
|
2708
2200
|
var DEFAULT_TASK_OUTPUTS_CELL_LABELS = {
|
|
2709
2201
|
none: "\u2014",
|
|
2710
2202
|
open: (count) => `${count} ${count === 1 ? "output" : "outputs"}`,
|
|
@@ -3398,7 +2890,7 @@ function TaskTable(props) {
|
|
|
3398
2890
|
isMe: mine
|
|
3399
2891
|
};
|
|
3400
2892
|
};
|
|
3401
|
-
const renderPerson = props.renderPerson ?? ((person) => /* @__PURE__ */ jsxRuntime.jsx(PersonPill, { person }));
|
|
2893
|
+
const renderPerson = props.renderPerson ?? ((person) => /* @__PURE__ */ jsxRuntime.jsx(chunkCHVCTKF4_cjs.PersonPill, { person }));
|
|
3402
2894
|
const q = (query.trim() || (props.filterText ?? "").trim()).toLowerCase();
|
|
3403
2895
|
const counts = react.useMemo(() => {
|
|
3404
2896
|
const map = new Map(STATUS_ORDER.map((s) => [s, 0]));
|
|
@@ -4012,7 +3504,7 @@ function TaskInbox(p) {
|
|
|
4012
3504
|
else next.add(id);
|
|
4013
3505
|
return next;
|
|
4014
3506
|
});
|
|
4015
|
-
p.renderPerson ?? ((value) => /* @__PURE__ */ jsxRuntime.jsx(PersonPill, { person: value }));
|
|
3507
|
+
p.renderPerson ?? ((value) => /* @__PURE__ */ jsxRuntime.jsx(chunkCHVCTKF4_cjs.PersonPill, { person: value }));
|
|
4016
3508
|
const taskById = new Map(all.map((t) => [t.external_id, t]));
|
|
4017
3509
|
const visible = new Set(rows.map((t) => t.external_id));
|
|
4018
3510
|
for (const task of rows) {
|
|
@@ -4200,7 +3692,7 @@ function TaskInbox(p) {
|
|
|
4200
3692
|
fieldsButton: "tasks-filter-fields"
|
|
4201
3693
|
},
|
|
4202
3694
|
filter: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4203
|
-
|
|
3695
|
+
chunkRQ2Y7USX_cjs.TriStateFilterMenu,
|
|
4204
3696
|
{
|
|
4205
3697
|
testId: "tasks-status-filter",
|
|
4206
3698
|
open: filterOpen,
|
|
@@ -4710,7 +4202,7 @@ function TaskStartDialog({
|
|
|
4710
4202
|
setSourceOpen(false);
|
|
4711
4203
|
}, [open]);
|
|
4712
4204
|
const textareaRef = react.useRef(null);
|
|
4713
|
-
const mention =
|
|
4205
|
+
const mention = chunk6F7SZCVL_cjs.useMentionAutocomplete({
|
|
4714
4206
|
value: prompt,
|
|
4715
4207
|
onValueChange: setPrompt,
|
|
4716
4208
|
candidates: people,
|
|
@@ -5061,7 +4553,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
5061
4553
|
}
|
|
5062
4554
|
const typed = name?.trim();
|
|
5063
4555
|
if (workflow.options?.agent === false) {
|
|
5064
|
-
const message =
|
|
4556
|
+
const message = chunk6F7SZCVL_cjs.composeWorkflowPrompt(workflow, inputs, context);
|
|
5065
4557
|
return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
|
|
5066
4558
|
}
|
|
5067
4559
|
const derived = typed || deriveWorkflowName(workflow, inputs);
|
|
@@ -5075,7 +4567,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
5075
4567
|
}
|
|
5076
4568
|
return {
|
|
5077
4569
|
name: derived,
|
|
5078
|
-
prompt:
|
|
4570
|
+
prompt: chunk6F7SZCVL_cjs.composeWorkflowPrompt(workflow, inputs, context),
|
|
5079
4571
|
skill_ref: null,
|
|
5080
4572
|
// The files a run is bound to travel in the saved inputs, whatever the template: the server binds
|
|
5081
4573
|
// the run to the ids listed under any input's `documents`.
|
|
@@ -5578,672 +5070,6 @@ function NewThreadDialog({
|
|
|
5578
5070
|
}
|
|
5579
5071
|
) });
|
|
5580
5072
|
}
|
|
5581
|
-
var DEFAULT_TASK_TRIGGER_CHIP_LABELS = {
|
|
5582
|
-
after: (name) => `After \u201C${name}\u201D is done`,
|
|
5583
|
-
afterUnknown: "After another task is done",
|
|
5584
|
-
onDemand: "Manual"
|
|
5585
|
-
};
|
|
5586
|
-
function TriggerIcon({ type, chained }) {
|
|
5587
|
-
const cls = "size-3.5 shrink-0 text-muted-foreground";
|
|
5588
|
-
if (chained) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, { className: cls, "aria-hidden": true });
|
|
5589
|
-
switch (type) {
|
|
5590
|
-
case "on_demand":
|
|
5591
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MousePointerClick, { className: cls, "aria-hidden": true });
|
|
5592
|
-
case "recurring":
|
|
5593
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: cls, "aria-hidden": true });
|
|
5594
|
-
case "event":
|
|
5595
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: cls, "aria-hidden": true });
|
|
5596
|
-
default:
|
|
5597
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: cls, "aria-hidden": true });
|
|
5598
|
-
}
|
|
5599
|
-
}
|
|
5600
|
-
function TaskTriggerChip({
|
|
5601
|
-
id,
|
|
5602
|
-
triggerType,
|
|
5603
|
-
summary,
|
|
5604
|
-
afterTaskId,
|
|
5605
|
-
afterTaskName,
|
|
5606
|
-
testId,
|
|
5607
|
-
labels
|
|
5608
|
-
}) {
|
|
5609
|
-
const l = { ...DEFAULT_TASK_TRIGGER_CHIP_LABELS, ...labels };
|
|
5610
|
-
const chained = Boolean(afterTaskId);
|
|
5611
|
-
const text2 = chained ? afterTaskName ? l.after(afterTaskName) : l.afterUnknown : triggerType === "on_demand" ? l.onDemand : summary;
|
|
5612
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5613
|
-
"span",
|
|
5614
|
-
{
|
|
5615
|
-
className: "inline-flex min-w-0 max-w-full items-center gap-1.5 text-sm font-normal text-foreground",
|
|
5616
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: `task-trigger-${id}` }),
|
|
5617
|
-
"data-trigger": chained ? "task" : triggerType,
|
|
5618
|
-
children: [
|
|
5619
|
-
/* @__PURE__ */ jsxRuntime.jsx(TriggerIcon, { type: triggerType, chained }),
|
|
5620
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: text2 })
|
|
5621
|
-
]
|
|
5622
|
-
}
|
|
5623
|
-
);
|
|
5624
|
-
}
|
|
5625
|
-
|
|
5626
|
-
// src/agents/tasks/workflowRows.ts
|
|
5627
|
-
var isSkillRow = (row) => row.kind === "skill";
|
|
5628
|
-
var hasTrigger = (row) => !row.on_demand && Boolean(row.rrule || row.run_at || row.event_kind || row.after_conversation_ext_id);
|
|
5629
|
-
function workflowStatus(row) {
|
|
5630
|
-
if (isSkillRow(row) || !hasTrigger(row)) return "on_demand";
|
|
5631
|
-
return row.active ? "active" : "paused";
|
|
5632
|
-
}
|
|
5633
|
-
function workflowTriggerType(workflow) {
|
|
5634
|
-
if (workflow.on_demand) return "on_demand";
|
|
5635
|
-
if (workflow.after_conversation_ext_id) return "after";
|
|
5636
|
-
if (workflow.event_kind) return "event";
|
|
5637
|
-
if (workflow.rrule) return "recurring";
|
|
5638
|
-
if (workflow.run_at) return "one_time";
|
|
5639
|
-
return "on_demand";
|
|
5640
|
-
}
|
|
5641
|
-
function workflowRunStatusLabel(status) {
|
|
5642
|
-
if (!status) return "None";
|
|
5643
|
-
const labels = {
|
|
5644
|
-
completed: "Success",
|
|
5645
|
-
success: "Success",
|
|
5646
|
-
failed: "Failed",
|
|
5647
|
-
running: "In progress",
|
|
5648
|
-
awaiting_authorization: "Awaiting access"
|
|
5649
|
-
};
|
|
5650
|
-
return labels[status] ?? status.replaceAll("_", " ");
|
|
5651
|
-
}
|
|
5652
|
-
function listedRunStatus(status, threadStatus) {
|
|
5653
|
-
if (threadStatus === "done" && status === "running") return "completed";
|
|
5654
|
-
return status;
|
|
5655
|
-
}
|
|
5656
|
-
|
|
5657
|
-
// src/agents/tasks/workflowColumns.tsx
|
|
5658
|
-
var WORKFLOW_COLUMN_ORDER = [
|
|
5659
|
-
"name",
|
|
5660
|
-
"trigger",
|
|
5661
|
-
"last_run",
|
|
5662
|
-
"result",
|
|
5663
|
-
"status",
|
|
5664
|
-
"shared",
|
|
5665
|
-
"actions"
|
|
5666
|
-
];
|
|
5667
|
-
function cell2(render) {
|
|
5668
|
-
return (params) => params.data ? render(params.data) : null;
|
|
5669
|
-
}
|
|
5670
|
-
var time = (iso) => iso ? Date.parse(iso) : Number.POSITIVE_INFINITY;
|
|
5671
|
-
function createWorkflowColumns(o) {
|
|
5672
|
-
const l = o.labels;
|
|
5673
|
-
const base = {
|
|
5674
|
-
sortable: false,
|
|
5675
|
-
cellStyle: { display: "flex", alignItems: "center" }
|
|
5676
|
-
};
|
|
5677
|
-
return [
|
|
5678
|
-
{
|
|
5679
|
-
...base,
|
|
5680
|
-
colId: "name",
|
|
5681
|
-
sortable: true,
|
|
5682
|
-
headerName: l.colName,
|
|
5683
|
-
flex: 3,
|
|
5684
|
-
minWidth: 210,
|
|
5685
|
-
valueGetter: (p) => p.data?.name.toLowerCase() ?? "",
|
|
5686
|
-
cellRenderer: cell2(o.renderName)
|
|
5687
|
-
},
|
|
5688
|
-
{
|
|
5689
|
-
...base,
|
|
5690
|
-
colId: "trigger",
|
|
5691
|
-
headerName: l.colTrigger,
|
|
5692
|
-
flex: 2.4,
|
|
5693
|
-
minWidth: 185,
|
|
5694
|
-
valueGetter: (p) => p.data ? o.getTriggerText(p.data) : "",
|
|
5695
|
-
cellRenderer: cell2(o.renderTrigger)
|
|
5696
|
-
},
|
|
5697
|
-
{
|
|
5698
|
-
...base,
|
|
5699
|
-
colId: "last_run",
|
|
5700
|
-
sortable: true,
|
|
5701
|
-
headerName: l.colLastRun,
|
|
5702
|
-
flex: 1.4,
|
|
5703
|
-
minWidth: 140,
|
|
5704
|
-
cellStyle: { display: "flex", alignItems: "center", padding: 0 },
|
|
5705
|
-
valueGetter: (p) => time(p.data?.last_fired_at),
|
|
5706
|
-
cellRenderer: cell2(o.renderLastRun)
|
|
5707
|
-
},
|
|
5708
|
-
{
|
|
5709
|
-
...base,
|
|
5710
|
-
colId: "result",
|
|
5711
|
-
headerName: "Result",
|
|
5712
|
-
width: 130,
|
|
5713
|
-
valueGetter: (p) => p.data?.last_run_status ?? "",
|
|
5714
|
-
cellStyle: { display: "flex", alignItems: "center", padding: 0 },
|
|
5715
|
-
cellRenderer: cell2(o.renderResult)
|
|
5716
|
-
},
|
|
5717
|
-
{
|
|
5718
|
-
...base,
|
|
5719
|
-
colId: "status",
|
|
5720
|
-
sortable: true,
|
|
5721
|
-
headerName: l.colStatus,
|
|
5722
|
-
width: 120,
|
|
5723
|
-
valueGetter: (p) => p.data ? workflowStatus(p.data) : "",
|
|
5724
|
-
cellRenderer: cell2(o.renderStatus)
|
|
5725
|
-
},
|
|
5726
|
-
{
|
|
5727
|
-
...base,
|
|
5728
|
-
colId: "shared",
|
|
5729
|
-
headerName: l.colShared,
|
|
5730
|
-
headerTooltip: l.shared,
|
|
5731
|
-
width: 96,
|
|
5732
|
-
cellStyle: { display: "flex", alignItems: "center", justifyContent: "center" },
|
|
5733
|
-
valueGetter: (p) => p.data?.shared ?? false,
|
|
5734
|
-
cellRenderer: cell2(o.renderShared)
|
|
5735
|
-
},
|
|
5736
|
-
{
|
|
5737
|
-
...base,
|
|
5738
|
-
colId: "actions",
|
|
5739
|
-
headerName: "",
|
|
5740
|
-
width: 180,
|
|
5741
|
-
minWidth: 180,
|
|
5742
|
-
cellStyle: { display: "flex", alignItems: "center", justifyContent: "flex-end" },
|
|
5743
|
-
cellRenderer: cell2(o.renderActions)
|
|
5744
|
-
}
|
|
5745
|
-
];
|
|
5746
|
-
}
|
|
5747
|
-
|
|
5748
|
-
// src/agents/tasks/workflowTableLabels.ts
|
|
5749
|
-
var DEFAULT_WORKFLOW_LIST_LABELS = {
|
|
5750
|
-
colName: "Name",
|
|
5751
|
-
colType: "Type",
|
|
5752
|
-
colTrigger: "When",
|
|
5753
|
-
colAction: "What it does",
|
|
5754
|
-
colAgent: "Agent",
|
|
5755
|
-
colStatus: "Active",
|
|
5756
|
-
colShared: "Shared",
|
|
5757
|
-
colLastRun: "Last run",
|
|
5758
|
-
colNextRun: "Next run",
|
|
5759
|
-
shared: "Shared with the workspace",
|
|
5760
|
-
sharedOwnerOnly: "Only the creator can change who can see this",
|
|
5761
|
-
deleteOwnerOnly: "Only the creator or workspace owner can delete this",
|
|
5762
|
-
typeSkill: "Skill",
|
|
5763
|
-
typeWorkflow: "Workflow",
|
|
5764
|
-
statusActive: "Active",
|
|
5765
|
-
statusPaused: "Inactive",
|
|
5766
|
-
statusOnDemand: "On demand",
|
|
5767
|
-
activeSwitch: (name) => `Active: \u201C${name}\u201D`,
|
|
5768
|
-
agent: "Agent",
|
|
5769
|
-
myAssistant: "My assistant",
|
|
5770
|
-
me: "Me",
|
|
5771
|
-
someone: "Someone",
|
|
5772
|
-
never: "Never",
|
|
5773
|
-
none: "\u2014",
|
|
5774
|
-
reminder: "Reminder",
|
|
5775
|
-
failed: "Failed",
|
|
5776
|
-
lastRunFailed: "Last run failed",
|
|
5777
|
-
openLastRun: "Open the task this run created",
|
|
5778
|
-
editWorkflow: "Edit",
|
|
5779
|
-
run: "Run",
|
|
5780
|
-
runLater: "Run later",
|
|
5781
|
-
runNow: "Run now",
|
|
5782
|
-
runs: "Runs",
|
|
5783
|
-
delete: "Delete",
|
|
5784
|
-
moreActions: "More actions",
|
|
5785
|
-
searchLabel: "Search workflows",
|
|
5786
|
-
searchPlaceholder: "Search workflows and skills\u2026",
|
|
5787
|
-
emptyTitle: "Nothing to run yet",
|
|
5788
|
-
emptyMessage: "Skills and workflows you can run will appear here.",
|
|
5789
|
-
firstRun: "Run a skill now, or choose Run later to save it as a workflow that runs on its own.",
|
|
5790
|
-
noMatches: "Nothing in this view.",
|
|
5791
|
-
filterAll: "All",
|
|
5792
|
-
filterSkills: "Skills",
|
|
5793
|
-
filterWorkflows: "Workflows",
|
|
5794
|
-
filterActive: "Active",
|
|
5795
|
-
filterPaused: "Inactive",
|
|
5796
|
-
makeActive: "Make active",
|
|
5797
|
-
makePaused: "Deactivate",
|
|
5798
|
-
selectAll: "Select all",
|
|
5799
|
-
selectWorkflow: (name) => `Select ${name}`
|
|
5800
|
-
};
|
|
5801
|
-
var ROW_HEIGHT2 = 40;
|
|
5802
|
-
function WorkflowsTable(props) {
|
|
5803
|
-
const { workflows, isLoading, busyId, header, testId } = props;
|
|
5804
|
-
const l = { ...DEFAULT_WORKFLOW_LIST_LABELS, ...props.labels };
|
|
5805
|
-
const [filterStates, setFilterStates] = react.useState(/* @__PURE__ */ new Map());
|
|
5806
|
-
const [filterOpen, setFilterOpen] = react.useState(false);
|
|
5807
|
-
const [query, setQuery] = react.useState("");
|
|
5808
|
-
const [selected, setSelected] = react.useState([]);
|
|
5809
|
-
const apiRef = react.useRef(null);
|
|
5810
|
-
const q = query.trim().toLowerCase();
|
|
5811
|
-
const matches = (w) => !q || `${w.name} ${w.description ?? ""} ${w.prompt ?? ""} ${w.skill_ref ?? ""}`.toLowerCase().includes(q);
|
|
5812
|
-
const inFilter = (w, f) => f === "all" || f === "skills" && isSkillRow(w) || f === "workflows" && !isSkillRow(w) || f === "active" && workflowStatus(w) === "active" || f === "paused" && workflowStatus(w) === "paused";
|
|
5813
|
-
const counts = react.useMemo(() => {
|
|
5814
|
-
const out = { all: 0, skills: 0, workflows: 0, active: 0, paused: 0 };
|
|
5815
|
-
for (const w of workflows) {
|
|
5816
|
-
if (!matches(w)) continue;
|
|
5817
|
-
for (const f of Object.keys(out)) if (inFilter(w, f)) out[f] += 1;
|
|
5818
|
-
}
|
|
5819
|
-
return out;
|
|
5820
|
-
}, [workflows, q]);
|
|
5821
|
-
const shown = react.useMemo(
|
|
5822
|
-
() => workflows.filter((w) => {
|
|
5823
|
-
if (!matches(w)) return false;
|
|
5824
|
-
for (const group of [
|
|
5825
|
-
["skills", "workflows"],
|
|
5826
|
-
["active", "paused"]
|
|
5827
|
-
]) {
|
|
5828
|
-
const included = group.filter((f) => filterStates.get(f) === "include");
|
|
5829
|
-
if (included.length && !included.some((f) => inFilter(w, f))) return false;
|
|
5830
|
-
if (group.some((f) => filterStates.get(f) === "exclude" && inFilter(w, f))) return false;
|
|
5831
|
-
}
|
|
5832
|
-
return true;
|
|
5833
|
-
}),
|
|
5834
|
-
[workflows, filterStates, q]
|
|
5835
|
-
);
|
|
5836
|
-
const renderPerson = props.renderPerson ?? ((p) => /* @__PURE__ */ jsxRuntime.jsx(PersonPill, { person: p }));
|
|
5837
|
-
const actionText = (w) => {
|
|
5838
|
-
if (w.action)
|
|
5839
|
-
return w.action.type === "email_documents" ? "Email latest documents" : "AI Review";
|
|
5840
|
-
if (isSkillRow(w))
|
|
5841
|
-
return w.description || w.skill_ref && props.skillNames?.[w.skill_ref] || w.name;
|
|
5842
|
-
return w.skill_ref ? props.skillNames?.[w.skill_ref] ?? w.skill_ref : w.prompt?.trim() || l.reminder;
|
|
5843
|
-
};
|
|
5844
|
-
const latest = react.useRef({ props, l, renderPerson, actionText });
|
|
5845
|
-
latest.current = { props, l, renderPerson, actionText };
|
|
5846
|
-
const columnDefs = react.useMemo(
|
|
5847
|
-
() => createWorkflowColumns({
|
|
5848
|
-
labels: l,
|
|
5849
|
-
getTriggerText: (w) => isSkillRow(w) ? l.statusOnDemand : latest.current.props.describeTrigger(w),
|
|
5850
|
-
renderName: (w) => {
|
|
5851
|
-
const { l: lb } = latest.current;
|
|
5852
|
-
const skill = isSkillRow(w);
|
|
5853
|
-
const text2 = skill ? latest.current.actionText(w) : w.description || latest.current.actionText(w);
|
|
5854
|
-
const stem = w.name.replace(/…$/, "").trim();
|
|
5855
|
-
const about = text2 && text2.trim() !== w.name.trim() && text2.trim() !== stem ? text2 : "";
|
|
5856
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 leading-tight", children: [
|
|
5857
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
5858
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5859
|
-
"span",
|
|
5860
|
-
{
|
|
5861
|
-
className: ui.cn(
|
|
5862
|
-
"truncate text-sm font-normal",
|
|
5863
|
-
workflowStatus(w) === "paused" && "text-muted-foreground"
|
|
5864
|
-
),
|
|
5865
|
-
"data-testid": `workflow-name-${w.external_id}`,
|
|
5866
|
-
children: w.name
|
|
5867
|
-
}
|
|
5868
|
-
),
|
|
5869
|
-
skill && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5870
|
-
"span",
|
|
5871
|
-
{
|
|
5872
|
-
className: "shrink-0 rounded-full border border-border px-1.5 text-[11px] text-muted-foreground",
|
|
5873
|
-
"data-testid": `workflow-type-${w.external_id}`,
|
|
5874
|
-
children: lb.typeSkill
|
|
5875
|
-
}
|
|
5876
|
-
)
|
|
5877
|
-
] }),
|
|
5878
|
-
about && !latest.current.props.automationsOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5879
|
-
"p",
|
|
5880
|
-
{
|
|
5881
|
-
className: "truncate text-xs text-muted-foreground",
|
|
5882
|
-
"data-testid": `workflow-action-${w.external_id}`,
|
|
5883
|
-
children: about
|
|
5884
|
-
}
|
|
5885
|
-
)
|
|
5886
|
-
] });
|
|
5887
|
-
},
|
|
5888
|
-
renderTrigger: (w) => {
|
|
5889
|
-
const { props: p } = latest.current;
|
|
5890
|
-
const after = w.after_conversation_ext_id;
|
|
5891
|
-
const skill = isSkillRow(w);
|
|
5892
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 leading-tight", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5893
|
-
TaskTriggerChip,
|
|
5894
|
-
{
|
|
5895
|
-
id: w.external_id,
|
|
5896
|
-
testId: `workflow-trigger-${w.external_id}`,
|
|
5897
|
-
triggerType: workflowTriggerType(w),
|
|
5898
|
-
summary: skill ? "" : p.describeTrigger(w),
|
|
5899
|
-
afterTaskId: after,
|
|
5900
|
-
afterTaskName: after ? p.taskNames?.[after] : void 0,
|
|
5901
|
-
labels: p.triggerChipLabels
|
|
5902
|
-
}
|
|
5903
|
-
) });
|
|
5904
|
-
},
|
|
5905
|
-
renderStatus: (w) => {
|
|
5906
|
-
const { props: p, l: lb } = latest.current;
|
|
5907
|
-
const canEdit = w.is_owner !== false || Boolean(p.canEditShared);
|
|
5908
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5909
|
-
ui.Switch,
|
|
5910
|
-
{
|
|
5911
|
-
checked: hasTrigger(w) && !isSkillRow(w) && Boolean(w.active),
|
|
5912
|
-
disabled: !hasTrigger(w) || isSkillRow(w) || !canEdit || p.busyId === w.external_id,
|
|
5913
|
-
onCheckedChange: (next) => p.onToggleActive(w, next),
|
|
5914
|
-
className: "disabled:data-[state=unchecked]:bg-muted dark:disabled:data-[state=unchecked]:bg-muted",
|
|
5915
|
-
"aria-label": lb.activeSwitch(w.name),
|
|
5916
|
-
"data-testid": `workflow-active-${w.external_id}`
|
|
5917
|
-
}
|
|
5918
|
-
);
|
|
5919
|
-
},
|
|
5920
|
-
renderShared: (w) => {
|
|
5921
|
-
const { props: p, l: lb } = latest.current;
|
|
5922
|
-
if (!p.onToggleShared || isSkillRow(w)) return null;
|
|
5923
|
-
const isCreator = w.is_owner !== false;
|
|
5924
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5925
|
-
ui.VisibilityToggle,
|
|
5926
|
-
{
|
|
5927
|
-
items: { shared: w.shared ?? false },
|
|
5928
|
-
onToggle: (share) => latest.current.props.onToggleShared?.(w, share),
|
|
5929
|
-
disabled: !isCreator || p.busyId === w.external_id,
|
|
5930
|
-
disabledTooltip: lb.sharedOwnerOnly,
|
|
5931
|
-
showLabel: false,
|
|
5932
|
-
"data-testid": `workflow-shared-${w.external_id}`
|
|
5933
|
-
}
|
|
5934
|
-
);
|
|
5935
|
-
},
|
|
5936
|
-
renderLastRun: (w) => {
|
|
5937
|
-
const { props: p, l: lb } = latest.current;
|
|
5938
|
-
const at = w.last_fired_at ?? p.lastRuns?.[w.external_id]?.at;
|
|
5939
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5940
|
-
"button",
|
|
5941
|
-
{
|
|
5942
|
-
type: "button",
|
|
5943
|
-
className: "h-full w-full truncate px-4 text-left text-sm hover:text-primary",
|
|
5944
|
-
onClick: () => p.onViewRuns?.(w),
|
|
5945
|
-
title: "View run history",
|
|
5946
|
-
"data-testid": `workflow-last-run-${w.external_id}`,
|
|
5947
|
-
children: at ? p.formatDate(at) : lb.never
|
|
5948
|
-
}
|
|
5949
|
-
);
|
|
5950
|
-
},
|
|
5951
|
-
renderResult: (w) => {
|
|
5952
|
-
const status = listedRunStatus(
|
|
5953
|
-
w.last_run_status,
|
|
5954
|
-
latest.current.props.lastRuns?.[w.external_id]?.threadStatus
|
|
5955
|
-
);
|
|
5956
|
-
const label = workflowRunStatusLabel(status);
|
|
5957
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5958
|
-
"button",
|
|
5959
|
-
{
|
|
5960
|
-
type: "button",
|
|
5961
|
-
onClick: () => latest.current.props.onViewRuns?.(w),
|
|
5962
|
-
title: "View run history",
|
|
5963
|
-
className: ui.cn(
|
|
5964
|
-
ui.badgeVariants({ variant: "outline" }),
|
|
5965
|
-
"mx-4 cursor-pointer text-xs font-medium",
|
|
5966
|
-
status === "failed" ? "border-red-border bg-red-bg text-red-text hover:bg-red-bg/80" : status === "completed" || status === "success" ? "border-green-border bg-green-bg text-green-text hover:bg-green-bg/80" : status ? "border-primary/20 bg-primary/10 text-primary hover:bg-primary/15" : "border-border bg-muted text-muted-foreground hover:bg-muted/80"
|
|
5967
|
-
),
|
|
5968
|
-
"data-testid": `workflow-result-${w.external_id}`,
|
|
5969
|
-
children: label
|
|
5970
|
-
}
|
|
5971
|
-
);
|
|
5972
|
-
},
|
|
5973
|
-
renderActions: (w) => {
|
|
5974
|
-
const { props: p, l: lb } = latest.current;
|
|
5975
|
-
const id = w.external_id;
|
|
5976
|
-
const skill = isSkillRow(w);
|
|
5977
|
-
const busy = p.busyId === id;
|
|
5978
|
-
const isOwner = w.is_owner !== false;
|
|
5979
|
-
const canEdit = isOwner || Boolean(p.canEditShared);
|
|
5980
|
-
const canAdmin = isOwner || Boolean(p.isWorkspaceOwner);
|
|
5981
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-1", children: [
|
|
5982
|
-
(skill || canEdit) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5983
|
-
ui.Button,
|
|
5984
|
-
{
|
|
5985
|
-
size: "sm",
|
|
5986
|
-
variant: "outline",
|
|
5987
|
-
className: "h-8 gap-1.5 pointer-coarse:h-11",
|
|
5988
|
-
disabled: busy,
|
|
5989
|
-
onClick: () => p.onRun(w),
|
|
5990
|
-
"data-testid": `workflow-run-btn-${id}`,
|
|
5991
|
-
children: [
|
|
5992
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "size-3.5", "aria-hidden": true }),
|
|
5993
|
-
lb.run
|
|
5994
|
-
]
|
|
5995
|
-
}
|
|
5996
|
-
),
|
|
5997
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenu, { children: [
|
|
5998
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5999
|
-
ui.Button,
|
|
6000
|
-
{
|
|
6001
|
-
variant: "ghost",
|
|
6002
|
-
size: "icon",
|
|
6003
|
-
className: "size-8 pointer-coarse:size-11",
|
|
6004
|
-
"aria-label": lb.moreActions,
|
|
6005
|
-
"data-testid": `workflow-menu-${id}`,
|
|
6006
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-4", "aria-hidden": true })
|
|
6007
|
-
}
|
|
6008
|
-
) }),
|
|
6009
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "end", children: [
|
|
6010
|
-
skill && p.onRunLater && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6011
|
-
ui.DropdownMenuItem,
|
|
6012
|
-
{
|
|
6013
|
-
onSelect: () => p.onRunLater?.(w),
|
|
6014
|
-
"data-testid": `workflow-run-later-${id}`,
|
|
6015
|
-
children: [
|
|
6016
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "mr-2 size-4", "aria-hidden": true }),
|
|
6017
|
-
lb.runLater
|
|
6018
|
-
]
|
|
6019
|
-
}
|
|
6020
|
-
),
|
|
6021
|
-
!skill && canEdit && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6022
|
-
ui.DropdownMenuItem,
|
|
6023
|
-
{
|
|
6024
|
-
onSelect: () => p.onEdit(w),
|
|
6025
|
-
"data-testid": `workflow-edit-${id}`,
|
|
6026
|
-
children: [
|
|
6027
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "mr-2 size-4", "aria-hidden": true }),
|
|
6028
|
-
lb.editWorkflow
|
|
6029
|
-
]
|
|
6030
|
-
}
|
|
6031
|
-
),
|
|
6032
|
-
!skill && p.onViewRuns && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6033
|
-
ui.DropdownMenuItem,
|
|
6034
|
-
{
|
|
6035
|
-
onSelect: () => p.onViewRuns?.(w),
|
|
6036
|
-
"data-testid": `workflow-runs-${id}`,
|
|
6037
|
-
children: [
|
|
6038
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "mr-2 size-4", "aria-hidden": true }),
|
|
6039
|
-
lb.runs
|
|
6040
|
-
]
|
|
6041
|
-
}
|
|
6042
|
-
),
|
|
6043
|
-
!skill && canEdit && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6044
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuSeparator, {}),
|
|
6045
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6046
|
-
ui.DropdownMenuItem,
|
|
6047
|
-
{
|
|
6048
|
-
disabled: busy || !canAdmin,
|
|
6049
|
-
onSelect: () => p.onDelete(w),
|
|
6050
|
-
title: canAdmin ? void 0 : lb.deleteOwnerOnly,
|
|
6051
|
-
className: "text-destructive focus:text-destructive",
|
|
6052
|
-
"data-testid": `workflow-delete-${id}`,
|
|
6053
|
-
children: [
|
|
6054
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "mr-2 size-4", "aria-hidden": true }),
|
|
6055
|
-
lb.delete
|
|
6056
|
-
]
|
|
6057
|
-
}
|
|
6058
|
-
)
|
|
6059
|
-
] })
|
|
6060
|
-
] })
|
|
6061
|
-
] })
|
|
6062
|
-
] });
|
|
6063
|
-
}
|
|
6064
|
-
}),
|
|
6065
|
-
// Stable on purpose: only the header texts rebuild the columns (see `latest`).
|
|
6066
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6067
|
-
[
|
|
6068
|
-
l.colName,
|
|
6069
|
-
l.colType,
|
|
6070
|
-
l.colTrigger,
|
|
6071
|
-
l.colAction,
|
|
6072
|
-
l.colAgent,
|
|
6073
|
-
l.colStatus,
|
|
6074
|
-
l.colShared,
|
|
6075
|
-
l.shared,
|
|
6076
|
-
l.colLastRun,
|
|
6077
|
-
l.colNextRun
|
|
6078
|
-
]
|
|
6079
|
-
);
|
|
6080
|
-
react.useEffect(() => {
|
|
6081
|
-
apiRef.current?.refreshCells({ force: true });
|
|
6082
|
-
}, [
|
|
6083
|
-
busyId,
|
|
6084
|
-
props.agentNames,
|
|
6085
|
-
props.skillNames,
|
|
6086
|
-
props.taskNames,
|
|
6087
|
-
props.lastRuns,
|
|
6088
|
-
props.renderPerson,
|
|
6089
|
-
props.labels,
|
|
6090
|
-
props.canEditShared,
|
|
6091
|
-
props.isWorkspaceOwner
|
|
6092
|
-
]);
|
|
6093
|
-
const mine = selected.filter((w) => !isSkillRow(w));
|
|
6094
|
-
const adminSelected = mine.filter((w) => w.is_owner !== false || props.isWorkspaceOwner);
|
|
6095
|
-
const editableSelected = mine.filter(
|
|
6096
|
-
(w) => hasTrigger(w) && (w.is_owner !== false || props.canEditShared)
|
|
6097
|
-
);
|
|
6098
|
-
const clearSelection = () => setSelected([]);
|
|
6099
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6100
|
-
"div",
|
|
6101
|
-
{
|
|
6102
|
-
className: "flex min-h-0 flex-1 flex-col",
|
|
6103
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "workflow-list" }),
|
|
6104
|
-
children: [
|
|
6105
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6106
|
-
chunk7RGLTF76_cjs.TabHeader,
|
|
6107
|
-
{
|
|
6108
|
-
testId: "automations-tab-header",
|
|
6109
|
-
tabs: [
|
|
6110
|
-
{
|
|
6111
|
-
id: "automations",
|
|
6112
|
-
label: "",
|
|
6113
|
-
count: shown.length,
|
|
6114
|
-
countIcon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Workflow, { className: "size-3.5" }),
|
|
6115
|
-
countPlacement: "leading",
|
|
6116
|
-
presentation: "count",
|
|
6117
|
-
hasActiveFilters: !!q || [...filterStates.values()].some(Boolean)
|
|
6118
|
-
},
|
|
6119
|
-
...props.tabs ?? []
|
|
6120
|
-
],
|
|
6121
|
-
activeTabId: props.activeTabId ?? "automations",
|
|
6122
|
-
onTabChange: props.onTabChange ?? (() => {
|
|
6123
|
-
}),
|
|
6124
|
-
firstTabContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6125
|
-
chunk2EI7NCUA_cjs.FilterInput,
|
|
6126
|
-
{
|
|
6127
|
-
value: query,
|
|
6128
|
-
onChange: setQuery,
|
|
6129
|
-
fields: ["text"],
|
|
6130
|
-
onFieldsChange: () => {
|
|
6131
|
-
},
|
|
6132
|
-
hideFieldPicker: true,
|
|
6133
|
-
ariaLabel: l.searchLabel,
|
|
6134
|
-
testIds: { input: "workflow-search" },
|
|
6135
|
-
filter: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6136
|
-
chunkN26CXGXC_cjs.TriStateFilterMenu,
|
|
6137
|
-
{
|
|
6138
|
-
testId: "automations-filter-button",
|
|
6139
|
-
open: filterOpen,
|
|
6140
|
-
onOpenChange: setFilterOpen,
|
|
6141
|
-
filterStates,
|
|
6142
|
-
onFiltersChange: setFilterStates,
|
|
6143
|
-
triggerClassName: "flex h-5 items-center gap-0.5 rounded px-1 text-muted-foreground hover:text-foreground pointer-coarse:h-11! pointer-coarse:min-w-11 pointer-coarse:justify-center",
|
|
6144
|
-
renderChevron: true,
|
|
6145
|
-
disableHoverOpen: true,
|
|
6146
|
-
options: [
|
|
6147
|
-
...!props.automationsOnly ? [
|
|
6148
|
-
{ id: "skills", label: l.filterSkills, count: counts.skills },
|
|
6149
|
-
{
|
|
6150
|
-
id: "workflows",
|
|
6151
|
-
label: l.filterWorkflows,
|
|
6152
|
-
count: counts.workflows
|
|
6153
|
-
}
|
|
6154
|
-
] : [],
|
|
6155
|
-
{ id: "active", label: l.filterActive, count: counts.active },
|
|
6156
|
-
{ id: "paused", label: l.filterPaused, count: counts.paused }
|
|
6157
|
-
]
|
|
6158
|
-
}
|
|
6159
|
-
)
|
|
6160
|
-
}
|
|
6161
|
-
),
|
|
6162
|
-
rightContent: header
|
|
6163
|
-
}
|
|
6164
|
-
),
|
|
6165
|
-
props.content ? props.content : workflows.length === 0 && !isLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6166
|
-
chunkZW6FPIFC_cjs.EmptyState,
|
|
6167
|
-
{
|
|
6168
|
-
icon: lucideReact.Workflow,
|
|
6169
|
-
title: l.emptyTitle,
|
|
6170
|
-
description: l.emptyMessage,
|
|
6171
|
-
testId: "workflow-list-empty"
|
|
6172
|
-
}
|
|
6173
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6174
|
-
chunkC2CWWEHO_cjs.GridView,
|
|
6175
|
-
{
|
|
6176
|
-
testId: "workflow-grid",
|
|
6177
|
-
gridId: props.gridId ?? "workflows-grid-v2",
|
|
6178
|
-
items: shown,
|
|
6179
|
-
columnDefs,
|
|
6180
|
-
getItemId: (w) => w.external_id,
|
|
6181
|
-
getRowTestId: (w) => `workflow-row-${w.external_id}`,
|
|
6182
|
-
isLoading,
|
|
6183
|
-
showEmpty: shown.length === 0,
|
|
6184
|
-
emptyState: { title: l.noMatches },
|
|
6185
|
-
rowHeight: ROW_HEIGHT2,
|
|
6186
|
-
height: "100%",
|
|
6187
|
-
onGridReady: ({ api }) => {
|
|
6188
|
-
apiRef.current = api;
|
|
6189
|
-
},
|
|
6190
|
-
onRowClick: (row) => props.onOpenRow?.(row),
|
|
6191
|
-
selection: { mode: "multiple", selected, onSelectionChange: setSelected },
|
|
6192
|
-
gridOptions: GRID_OPTIONS
|
|
6193
|
-
}
|
|
6194
|
-
) }),
|
|
6195
|
-
!props.content && /* @__PURE__ */ jsxRuntime.jsx(chunkV4ISCZJ7_cjs.SelectionBar, { count: selected.length, onClear: clearSelection, children: (isCompact) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6196
|
-
props.onToggleActiveMany && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6197
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6198
|
-
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
6199
|
-
{
|
|
6200
|
-
icon: lucideReact.Play,
|
|
6201
|
-
label: l.makeActive,
|
|
6202
|
-
onClick: () => {
|
|
6203
|
-
props.onToggleActiveMany?.(editableSelected, true);
|
|
6204
|
-
clearSelection();
|
|
6205
|
-
},
|
|
6206
|
-
disabled: editableSelected.length === 0,
|
|
6207
|
-
isCompact,
|
|
6208
|
-
testId: "workflow-bulk-activate"
|
|
6209
|
-
}
|
|
6210
|
-
),
|
|
6211
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6212
|
-
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
6213
|
-
{
|
|
6214
|
-
icon: lucideReact.Workflow,
|
|
6215
|
-
label: l.makePaused,
|
|
6216
|
-
onClick: () => {
|
|
6217
|
-
props.onToggleActiveMany?.(editableSelected, false);
|
|
6218
|
-
clearSelection();
|
|
6219
|
-
},
|
|
6220
|
-
disabled: editableSelected.length === 0,
|
|
6221
|
-
isCompact,
|
|
6222
|
-
testId: "workflow-bulk-pause"
|
|
6223
|
-
}
|
|
6224
|
-
)
|
|
6225
|
-
] }),
|
|
6226
|
-
props.onDeleteMany && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6227
|
-
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
6228
|
-
{
|
|
6229
|
-
icon: lucideReact.Trash2,
|
|
6230
|
-
label: l.delete,
|
|
6231
|
-
onClick: () => {
|
|
6232
|
-
props.onDeleteMany?.(adminSelected);
|
|
6233
|
-
clearSelection();
|
|
6234
|
-
},
|
|
6235
|
-
disabled: adminSelected.length === 0,
|
|
6236
|
-
isCompact,
|
|
6237
|
-
className: "border-red-border text-red-text hover:bg-red-bg hover:text-red-text",
|
|
6238
|
-
testId: "workflow-bulk-delete"
|
|
6239
|
-
}
|
|
6240
|
-
)
|
|
6241
|
-
] }) })
|
|
6242
|
-
]
|
|
6243
|
-
}
|
|
6244
|
-
);
|
|
6245
|
-
}
|
|
6246
|
-
var GRID_OPTIONS = { suppressClickEdit: true };
|
|
6247
5073
|
function TaskActivityDialog({
|
|
6248
5074
|
open,
|
|
6249
5075
|
onOpenChange,
|
|
@@ -6255,7 +5081,7 @@ function TaskActivityDialog({
|
|
|
6255
5081
|
testId,
|
|
6256
5082
|
...timeline
|
|
6257
5083
|
}) {
|
|
6258
|
-
const l = { ...
|
|
5084
|
+
const l = { ...chunkCHVCTKF4_cjs.DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
|
|
6259
5085
|
const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "task-activity" });
|
|
6260
5086
|
const count = events?.length ?? 0;
|
|
6261
5087
|
const scrollToEnd = react.useCallback(
|
|
@@ -6270,7 +5096,7 @@ function TaskActivityDialog({
|
|
|
6270
5096
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "truncate", children: taskName })
|
|
6271
5097
|
] }),
|
|
6272
5098
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-h-[55dvh] overflow-y-auto pr-1", "data-testid": `${id}-scroll`, children: [
|
|
6273
|
-
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(
|
|
5099
|
+
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(chunkCHVCTKF4_cjs.TaskActivityTimeline, { events: events ?? [], labels, testId: id, ...timeline }),
|
|
6274
5100
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollToEnd })
|
|
6275
5101
|
] })
|
|
6276
5102
|
] }) });
|
|
@@ -6308,7 +5134,7 @@ function TaskFlow({
|
|
|
6308
5134
|
},
|
|
6309
5135
|
children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex w-max min-w-full items-center gap-1 py-0.5", children: items.map((item, i) => {
|
|
6310
5136
|
const chip = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6311
|
-
|
|
5137
|
+
chunk6F7SZCVL_cjs.StepChip,
|
|
6312
5138
|
{
|
|
6313
5139
|
kind: "adhoc",
|
|
6314
5140
|
phase: "ready",
|
|
@@ -6362,7 +5188,7 @@ function ThreadActivity({ item, children }) {
|
|
|
6362
5188
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-xl items-center gap-2", children: [
|
|
6363
5189
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link", "data-done": done || void 0 }),
|
|
6364
5190
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6365
|
-
|
|
5191
|
+
chunk6F7SZCVL_cjs.StepChip,
|
|
6366
5192
|
{
|
|
6367
5193
|
inert: true,
|
|
6368
5194
|
kind,
|
|
@@ -6381,7 +5207,7 @@ function ThreadActivity({ item, children }) {
|
|
|
6381
5207
|
}
|
|
6382
5208
|
),
|
|
6383
5209
|
document && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6384
|
-
|
|
5210
|
+
chunk6F7SZCVL_cjs.StepDocumentButton,
|
|
6385
5211
|
{
|
|
6386
5212
|
kind,
|
|
6387
5213
|
name: document.name,
|
|
@@ -6448,7 +5274,7 @@ function ThreadLauncher({
|
|
|
6448
5274
|
const [shared, setShared] = react.useState(false);
|
|
6449
5275
|
const [started, setStarted] = react.useState(null);
|
|
6450
5276
|
const textareaRef = react.useRef(null);
|
|
6451
|
-
const mention =
|
|
5277
|
+
const mention = chunk6F7SZCVL_cjs.useMentionAutocomplete({
|
|
6452
5278
|
value: prompt,
|
|
6453
5279
|
onValueChange: setPrompt,
|
|
6454
5280
|
candidates: people,
|
|
@@ -6645,10 +5471,10 @@ function WorkflowRunStatus({
|
|
|
6645
5471
|
testId = "workflow-run-status"
|
|
6646
5472
|
}) {
|
|
6647
5473
|
const l = { ...DEFAULT_WORKFLOW_RUN_STATUS_LABELS, ...labels };
|
|
6648
|
-
const ordered =
|
|
6649
|
-
const phaseOf = (id) => isLoading ? "blocked" :
|
|
6650
|
-
const finished = !isLoading &&
|
|
6651
|
-
const atId = finished || isLoading ? void 0 :
|
|
5474
|
+
const ordered = chunk6F7SZCVL_cjs.stepLevels(steps).flat();
|
|
5475
|
+
const phaseOf = (id) => isLoading ? "blocked" : chunk6F7SZCVL_cjs.stepPhase(steps, states, id);
|
|
5476
|
+
const finished = !isLoading && chunk6F7SZCVL_cjs.isRunFinished(steps, states);
|
|
5477
|
+
const atId = finished || isLoading ? void 0 : chunkCHVCTKF4_cjs.activeStepId(chunk6F7SZCVL_cjs.stepLevels(steps), phaseOf);
|
|
6652
5478
|
const at = ordered.find((s) => s.id === atId);
|
|
6653
5479
|
const phase = at ? phaseOf(at.id) : "done";
|
|
6654
5480
|
const assignee = at && ["ready", "waiting"].includes(phase) ? assigneeOf?.(at) : void 0;
|
|
@@ -6680,7 +5506,7 @@ function WorkflowRunStatus({
|
|
|
6680
5506
|
"span",
|
|
6681
5507
|
{
|
|
6682
5508
|
className: ui.cn(
|
|
6683
|
-
`wf-kind-${
|
|
5509
|
+
`wf-kind-${chunk6F7SZCVL_cjs.stepKindOf(s)}`,
|
|
6684
5510
|
"h-1.5 w-3 shrink-0 rounded-full",
|
|
6685
5511
|
SEGMENT[phaseOf(s.id)],
|
|
6686
5512
|
s.id === atId && "w-5"
|
|
@@ -6726,7 +5552,7 @@ function groupThreadActivity(steps, items) {
|
|
|
6726
5552
|
continue;
|
|
6727
5553
|
}
|
|
6728
5554
|
if (current === void 0) out.before.push(item);
|
|
6729
|
-
else if (
|
|
5555
|
+
else if (chunk6F7SZCVL_cjs.isRunFinished(steps, states)) out.after.push(item);
|
|
6730
5556
|
else {
|
|
6731
5557
|
const status = states[current]?.status;
|
|
6732
5558
|
const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
|
|
@@ -6749,9 +5575,9 @@ var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
|
|
|
6749
5575
|
after: "After",
|
|
6750
5576
|
beforeSteps: "Before the first step",
|
|
6751
5577
|
afterSteps: "After the last step",
|
|
6752
|
-
kinds:
|
|
6753
|
-
documents:
|
|
6754
|
-
record:
|
|
5578
|
+
kinds: chunk6F7SZCVL_cjs.DEFAULT_STEP_KIND_LABELS,
|
|
5579
|
+
documents: chunk6F7SZCVL_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
|
|
5580
|
+
record: chunk6F7SZCVL_cjs.DEFAULT_STEP_RECORD_LABELS
|
|
6755
5581
|
};
|
|
6756
5582
|
function WorkflowThreadStartedBy({
|
|
6757
5583
|
origin,
|
|
@@ -6882,7 +5708,7 @@ function EntriesChip({
|
|
|
6882
5708
|
const latest = items.at(-1);
|
|
6883
5709
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
|
|
6884
5710
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6885
|
-
|
|
5711
|
+
chunk6F7SZCVL_cjs.StepChip,
|
|
6886
5712
|
{
|
|
6887
5713
|
kind,
|
|
6888
5714
|
phase: "ready",
|
|
@@ -6921,23 +5747,23 @@ function WorkflowThreadStrip({
|
|
|
6921
5747
|
className
|
|
6922
5748
|
}) {
|
|
6923
5749
|
const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
|
|
6924
|
-
const barL = { ...
|
|
5750
|
+
const barL = { ...chunkCHVCTKF4_cjs.DEFAULT_STEP_BAR_LABELS, ...barLabels };
|
|
6925
5751
|
const grouped = groupThreadActivity(steps, items);
|
|
6926
5752
|
const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
|
|
6927
5753
|
const link = /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link wf-kind-start max-w-6", "data-done": true });
|
|
6928
5754
|
const [selected, setSelected] = react.useState(null);
|
|
6929
5755
|
const [open, setOpen] = react.useState(null);
|
|
6930
|
-
const phaseOf = (id) =>
|
|
5756
|
+
const phaseOf = (id) => chunk6F7SZCVL_cjs.stepPhase(steps, states, id);
|
|
6931
5757
|
const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
|
|
6932
5758
|
const glyphOf = (step) => {
|
|
6933
|
-
const KindIcon =
|
|
5759
|
+
const KindIcon = chunk6F7SZCVL_cjs.STEP_KIND_ICONS[chunk6F7SZCVL_cjs.stepKindOf(step)];
|
|
6934
5760
|
return iconOf(step) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {});
|
|
6935
5761
|
};
|
|
6936
5762
|
const waitingOf = (id) => {
|
|
6937
5763
|
const step = steps.find((s) => s.id === id);
|
|
6938
5764
|
const phase = phaseOf(id);
|
|
6939
|
-
const documents =
|
|
6940
|
-
if (documents.length) return
|
|
5765
|
+
const documents = chunk6F7SZCVL_cjs.waitingDocuments(states[id]);
|
|
5766
|
+
if (documents.length) return chunk6F7SZCVL_cjs.waitingForDocumentsText(documents.length);
|
|
6941
5767
|
const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
|
|
6942
5768
|
return name ? l.waitingFor.replace("{name}", name) : void 0;
|
|
6943
5769
|
};
|
|
@@ -6947,8 +5773,8 @@ function WorkflowThreadStrip({
|
|
|
6947
5773
|
const assignee = phase === "ready" || phase === "waiting" ? assigneeOf?.(step) : void 0;
|
|
6948
5774
|
const waiting = waitingOf(step.id);
|
|
6949
5775
|
const sentBack = states[step.id]?.sentBack;
|
|
6950
|
-
const kind =
|
|
6951
|
-
const documents =
|
|
5776
|
+
const kind = chunk6F7SZCVL_cjs.stepKindOf(step);
|
|
5777
|
+
const documents = chunk6F7SZCVL_cjs.stepDocuments(steps, states, step.id);
|
|
6952
5778
|
const latestDoc = onOpenDocument ? documents.at(-1) : void 0;
|
|
6953
5779
|
const finished = ["done", "skipped", "failed"].includes(phase);
|
|
6954
5780
|
const chip = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6961,7 +5787,7 @@ function WorkflowThreadStrip({
|
|
|
6961
5787
|
},
|
|
6962
5788
|
children: [
|
|
6963
5789
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6964
|
-
|
|
5790
|
+
chunk6F7SZCVL_cjs.StepChip,
|
|
6965
5791
|
{
|
|
6966
5792
|
kind,
|
|
6967
5793
|
phase,
|
|
@@ -6975,7 +5801,7 @@ function WorkflowThreadStrip({
|
|
|
6975
5801
|
waiting
|
|
6976
5802
|
] })
|
|
6977
5803
|
] }),
|
|
6978
|
-
labelClassName: isCurrent ?
|
|
5804
|
+
labelClassName: isCurrent ? chunkCHVCTKF4_cjs.STEP_LABEL_CURRENT : ui.cn(chunkCHVCTKF4_cjs.STEP_LABEL, chunkCHVCTKF4_cjs.STEP_LABEL_MAX),
|
|
6979
5805
|
className: ui.cn(latestDoc && "rounded-r-none"),
|
|
6980
5806
|
title: waiting ? `${step.title} \xB7 ${waiting}` : step.title,
|
|
6981
5807
|
"data-testid": `workflow-thread-step-${step.id}`,
|
|
@@ -7010,7 +5836,7 @@ function WorkflowThreadStrip({
|
|
|
7010
5836
|
),
|
|
7011
5837
|
sentBack && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-xs text-amber-700 dark:text-amber-300", children: l.sentBack }),
|
|
7012
5838
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7013
|
-
|
|
5839
|
+
chunk6F7SZCVL_cjs.StepDocumentCards,
|
|
7014
5840
|
{
|
|
7015
5841
|
refs: documents,
|
|
7016
5842
|
heading: step.kind === "review" ? phase === "done" ? l.documents.approved : l.documents.toApprove : l.documents.produced,
|
|
@@ -7021,7 +5847,7 @@ function WorkflowThreadStrip({
|
|
|
7021
5847
|
}
|
|
7022
5848
|
),
|
|
7023
5849
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7024
|
-
|
|
5850
|
+
chunk6F7SZCVL_cjs.StepRecord,
|
|
7025
5851
|
{
|
|
7026
5852
|
step,
|
|
7027
5853
|
state: states[step.id],
|
|
@@ -7053,10 +5879,10 @@ function WorkflowThreadStrip({
|
|
|
7053
5879
|
return latestDoc ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center", children: [
|
|
7054
5880
|
chip,
|
|
7055
5881
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7056
|
-
|
|
5882
|
+
chunk6F7SZCVL_cjs.StepDocumentButton,
|
|
7057
5883
|
{
|
|
7058
5884
|
kind,
|
|
7059
|
-
name: nameOfDoc?.(
|
|
5885
|
+
name: nameOfDoc?.(chunk6F7SZCVL_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
|
|
7060
5886
|
onOpen: () => onOpenDocument?.(latestDoc),
|
|
7061
5887
|
testId: `workflow-thread-step-${step.id}-open-document`
|
|
7062
5888
|
}
|
|
@@ -7095,17 +5921,17 @@ function WorkflowThreadStrip({
|
|
|
7095
5921
|
] }),
|
|
7096
5922
|
strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`))
|
|
7097
5923
|
] }) : null;
|
|
7098
|
-
const at = steps.find((s) => s.id === (selected ??
|
|
7099
|
-
const headingPx = (step) => `${l.kinds[
|
|
5924
|
+
const at = steps.find((s) => s.id === (selected ?? chunkCHVCTKF4_cjs.activeStepId(chunk6F7SZCVL_cjs.stepLevels(steps), phaseOf)));
|
|
5925
|
+
const headingPx = (step) => `${l.kinds[chunk6F7SZCVL_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
|
|
7100
5926
|
const reserve = {
|
|
7101
|
-
always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) =>
|
|
5927
|
+
always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunk6F7SZCVL_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
|
|
7102
5928
|
leading: leading ? 150 : 0,
|
|
7103
5929
|
trailing: trailing ? 120 : 0
|
|
7104
5930
|
};
|
|
7105
5931
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7106
|
-
|
|
5932
|
+
chunkCHVCTKF4_cjs.StepBarFrame,
|
|
7107
5933
|
{
|
|
7108
|
-
levels:
|
|
5934
|
+
levels: chunk6F7SZCVL_cjs.stepLevels(steps),
|
|
7109
5935
|
phaseOf,
|
|
7110
5936
|
current: selected,
|
|
7111
5937
|
onSelect: (id) => {
|
|
@@ -7118,7 +5944,7 @@ function WorkflowThreadStrip({
|
|
|
7118
5944
|
trailing,
|
|
7119
5945
|
reservePx: reserve,
|
|
7120
5946
|
icon: glyphOf,
|
|
7121
|
-
kindOf:
|
|
5947
|
+
kindOf: chunk6F7SZCVL_cjs.stepKindOf,
|
|
7122
5948
|
labels: { waitingFor: l.waitingFor, ...barLabels },
|
|
7123
5949
|
tid: (suffix) => `workflow-thread-${suffix}`
|
|
7124
5950
|
}
|
|
@@ -7194,11 +6020,11 @@ function compactThreadActivity(events, stepTitleOf) {
|
|
|
7194
6020
|
const count = Math.max(1, entry.recipients.length);
|
|
7195
6021
|
entry.label = `Notified ${count} ${count === 1 ? "user" : "users"}`;
|
|
7196
6022
|
} else if (STEP_LABELS[event.kind]) {
|
|
7197
|
-
const documents =
|
|
6023
|
+
const documents = chunk6F7SZCVL_cjs.eventWaitingDocuments(event.detail);
|
|
7198
6024
|
const title = typeof event.detail?.step === "string" ? stepTitleOf?.(event.detail.step) : void 0;
|
|
7199
6025
|
result.push({
|
|
7200
6026
|
event,
|
|
7201
|
-
label: documents ?
|
|
6027
|
+
label: documents ? chunk6F7SZCVL_cjs.waitingForDocumentsText(documents.length) : title && STEP_VERBS[event.kind] ? `${title} ${STEP_VERBS[event.kind]}` : STEP_LABELS[event.kind],
|
|
7202
6028
|
recipients: []
|
|
7203
6029
|
});
|
|
7204
6030
|
} else if (["artifact_created", "artifact_edited", "document_added", "document_removed"].includes(
|
|
@@ -7338,7 +6164,7 @@ function TaskRunsDialog({
|
|
|
7338
6164
|
"rounded-full px-2 py-0.5 text-xs font-medium capitalize",
|
|
7339
6165
|
STATUS_STYLE[data.status] ?? "text-muted-foreground"
|
|
7340
6166
|
),
|
|
7341
|
-
children: workflowRunStatusLabel(data.status)
|
|
6167
|
+
children: chunkCHVCTKF4_cjs.workflowRunStatusLabel(data.status)
|
|
7342
6168
|
}
|
|
7343
6169
|
)
|
|
7344
6170
|
},
|
|
@@ -7605,7 +6431,7 @@ function defaultTaskComposerValues(workflows, initial) {
|
|
|
7605
6431
|
return {
|
|
7606
6432
|
assignee: "me",
|
|
7607
6433
|
workflowId,
|
|
7608
|
-
inputs: workflow ? { ...
|
|
6434
|
+
inputs: workflow ? { ...chunk6F7SZCVL_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
|
|
7609
6435
|
when: "manual",
|
|
7610
6436
|
runAt: "",
|
|
7611
6437
|
rrule: "",
|
|
@@ -7681,7 +6507,7 @@ function WorkflowComposer({
|
|
|
7681
6507
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7682
6508
|
[workflows, open]
|
|
7683
6509
|
);
|
|
7684
|
-
const [values, setValues] = useControllableState(
|
|
6510
|
+
const [values, setValues] = chunkCHVCTKF4_cjs.useControllableState(
|
|
7685
6511
|
valuesProp,
|
|
7686
6512
|
seed,
|
|
7687
6513
|
onValuesChange
|
|
@@ -7714,7 +6540,7 @@ function WorkflowComposer({
|
|
|
7714
6540
|
return !docs?.length;
|
|
7715
6541
|
})
|
|
7716
6542
|
);
|
|
7717
|
-
const whatMissing = !workflow || Object.keys(
|
|
6543
|
+
const whatMissing = !workflow || Object.keys(chunk6F7SZCVL_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
|
|
7718
6544
|
const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
|
|
7719
6545
|
const whenMissing = missingWhen(values, runAtPast);
|
|
7720
6546
|
const scheduled = values.when !== "now" && values.when !== "manual";
|
|
@@ -7726,7 +6552,7 @@ function WorkflowComposer({
|
|
|
7726
6552
|
setValues({
|
|
7727
6553
|
...values,
|
|
7728
6554
|
workflowId: next,
|
|
7729
|
-
inputs: def ?
|
|
6555
|
+
inputs: def ? chunk6F7SZCVL_cjs.defaultInputs(def) : {},
|
|
7730
6556
|
...def?.documentAction ? { access: "standing" } : {}
|
|
7731
6557
|
});
|
|
7732
6558
|
};
|
|
@@ -7854,7 +6680,7 @@ function WorkflowComposer({
|
|
|
7854
6680
|
},
|
|
7855
6681
|
"data-testid": `${id}-dropzone`,
|
|
7856
6682
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7857
|
-
|
|
6683
|
+
chunkWS5EX7DN_cjs.AddFilesFirst,
|
|
7858
6684
|
{
|
|
7859
6685
|
reason: l.addFilesReason,
|
|
7860
6686
|
action: addFilesAction,
|
|
@@ -7864,7 +6690,7 @@ function WorkflowComposer({
|
|
|
7864
6690
|
}
|
|
7865
6691
|
),
|
|
7866
6692
|
!noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7867
|
-
|
|
6693
|
+
chunkCHVCTKF4_cjs.SchemaForm,
|
|
7868
6694
|
{
|
|
7869
6695
|
fields,
|
|
7870
6696
|
values: values.inputs,
|
|
@@ -8289,7 +7115,7 @@ function WorkTaskComposer({
|
|
|
8289
7115
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8290
7116
|
[workflows, open]
|
|
8291
7117
|
);
|
|
8292
|
-
const [values, setValues] = useControllableState(
|
|
7118
|
+
const [values, setValues] = chunkCHVCTKF4_cjs.useControllableState(
|
|
8293
7119
|
valuesProp,
|
|
8294
7120
|
seed,
|
|
8295
7121
|
onValuesChange
|
|
@@ -8303,7 +7129,7 @@ function WorkTaskComposer({
|
|
|
8303
7129
|
}, [open]);
|
|
8304
7130
|
const workflow = workflows.find((w) => w.id === values.workflowId);
|
|
8305
7131
|
const fields = workflow?.inputs ?? [];
|
|
8306
|
-
const errors = workflow ?
|
|
7132
|
+
const errors = workflow ? chunk6F7SZCVL_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
|
|
8307
7133
|
const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
|
|
8308
7134
|
const unattended = hasWork && values.when !== "now" && values.when !== "manual";
|
|
8309
7135
|
const canConfigure = !isEdit || seed.assignee === "agent";
|
|
@@ -8311,7 +7137,7 @@ function WorkTaskComposer({
|
|
|
8311
7137
|
const set = (key, value) => setValues({ ...values, [key]: value });
|
|
8312
7138
|
const pickWorkflow = (id2) => {
|
|
8313
7139
|
const next = workflows.find((w) => w.id === id2);
|
|
8314
|
-
setValues({ ...values, workflowId: id2, inputs: next ?
|
|
7140
|
+
setValues({ ...values, workflowId: id2, inputs: next ? chunk6F7SZCVL_cjs.defaultInputs(next) : {} });
|
|
8315
7141
|
};
|
|
8316
7142
|
const openConfigure = () => {
|
|
8317
7143
|
setConfigOpen(true);
|
|
@@ -8497,7 +7323,7 @@ function WorkTaskComposer({
|
|
|
8497
7323
|
)
|
|
8498
7324
|
] }),
|
|
8499
7325
|
workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8500
|
-
|
|
7326
|
+
chunkCHVCTKF4_cjs.SchemaForm,
|
|
8501
7327
|
{
|
|
8502
7328
|
fields,
|
|
8503
7329
|
values: values.inputs,
|
|
@@ -10441,7 +9267,7 @@ function AgentCreateView({
|
|
|
10441
9267
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal text-muted-foreground", children: l.optional })
|
|
10442
9268
|
] }),
|
|
10443
9269
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10444
|
-
|
|
9270
|
+
chunkRFIBUWLF_cjs.MultiSelect,
|
|
10445
9271
|
{
|
|
10446
9272
|
data: workspaces.map((ws) => ({ label: ws.name, value: ws.id })),
|
|
10447
9273
|
value: selectedWorkspaces,
|
|
@@ -10488,7 +9314,6 @@ exports.AgentCreator = AgentCreator;
|
|
|
10488
9314
|
exports.AgentEditView = AgentEditView;
|
|
10489
9315
|
exports.AgentGallery = AgentGallery;
|
|
10490
9316
|
exports.AgentMainView = AgentMainView;
|
|
10491
|
-
exports.AgentSelect = AgentSelect;
|
|
10492
9317
|
exports.AgentTypeSelector = AgentTypeSelector;
|
|
10493
9318
|
exports.CapabilityGrid = CapabilityGrid;
|
|
10494
9319
|
exports.CapabilityTile = CapabilityTile;
|
|
@@ -10514,7 +9339,6 @@ exports.DEFAULT_AGENT_BAR_LABELS = DEFAULT_AGENT_BAR_LABELS;
|
|
|
10514
9339
|
exports.DEFAULT_AGENT_CARD_LABELS = DEFAULT_AGENT_CARD_LABELS;
|
|
10515
9340
|
exports.DEFAULT_AGENT_CREATOR_LABELS = DEFAULT_AGENT_CREATOR_LABELS;
|
|
10516
9341
|
exports.DEFAULT_AGENT_GALLERY_LABELS = DEFAULT_AGENT_GALLERY_LABELS;
|
|
10517
|
-
exports.DEFAULT_AGENT_SELECT_LABELS = DEFAULT_AGENT_SELECT_LABELS;
|
|
10518
9342
|
exports.DEFAULT_AGENT_STEPS_LABELS = DEFAULT_AGENT_STEPS_LABELS;
|
|
10519
9343
|
exports.DEFAULT_AGENT_TYPE_SELECTOR_LABELS = DEFAULT_AGENT_TYPE_SELECTOR_LABELS;
|
|
10520
9344
|
exports.DEFAULT_AUTHORIZE_AGENT_LABELS = DEFAULT_AUTHORIZE_AGENT_LABELS;
|
|
@@ -10541,15 +9365,12 @@ exports.DEFAULT_TASK_PLAN_LABELS = DEFAULT_TASK_PLAN_LABELS;
|
|
|
10541
9365
|
exports.DEFAULT_TASK_RUNS_DIALOG_LABELS = DEFAULT_TASK_RUNS_DIALOG_LABELS;
|
|
10542
9366
|
exports.DEFAULT_TASK_STATUS_PILL_LABELS = DEFAULT_TASK_STATUS_PILL_LABELS;
|
|
10543
9367
|
exports.DEFAULT_TASK_THREAD_CHIP_LABELS = DEFAULT_TASK_THREAD_CHIP_LABELS;
|
|
10544
|
-
exports.DEFAULT_TASK_TRIGGER_CHIP_LABELS = DEFAULT_TASK_TRIGGER_CHIP_LABELS;
|
|
10545
9368
|
exports.DEFAULT_THREAD_LAUNCHER_LABELS = DEFAULT_THREAD_LAUNCHER_LABELS;
|
|
10546
9369
|
exports.DEFAULT_THREAD_STATE_LABELS = DEFAULT_THREAD_STATE_LABELS;
|
|
10547
9370
|
exports.DEFAULT_TUPLE_ARRAY_FIELD_LABELS = DEFAULT_TUPLE_ARRAY_FIELD_LABELS;
|
|
10548
9371
|
exports.DEFAULT_UPLOAD_TASK_ITEM_LABELS = DEFAULT_UPLOAD_TASK_ITEM_LABELS;
|
|
10549
9372
|
exports.DEFAULT_UPLOAD_TASK_LIST_LABELS = DEFAULT_UPLOAD_TASK_LIST_LABELS;
|
|
10550
9373
|
exports.DEFAULT_WORKFLOWS_CHROME_LABELS = DEFAULT_WORKFLOWS_CHROME_LABELS;
|
|
10551
|
-
exports.DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS = DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS;
|
|
10552
|
-
exports.DEFAULT_WORKFLOW_LIST_LABELS = DEFAULT_WORKFLOW_LIST_LABELS;
|
|
10553
9374
|
exports.DEFAULT_WORKFLOW_RUN_STATUS_LABELS = DEFAULT_WORKFLOW_RUN_STATUS_LABELS;
|
|
10554
9375
|
exports.DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = DEFAULT_WORKFLOW_THREAD_STRIP_LABELS;
|
|
10555
9376
|
exports.DERIVED_NAME_WORDS = DERIVED_NAME_WORDS;
|
|
@@ -10558,7 +9379,6 @@ exports.EntityChip = EntityChip;
|
|
|
10558
9379
|
exports.GoalCriteria = GoalCriteria;
|
|
10559
9380
|
exports.MAX_TASK_DEPTH = MAX_TASK_DEPTH;
|
|
10560
9381
|
exports.NewThreadDialog = NewThreadDialog;
|
|
10561
|
-
exports.PersonPill = PersonPill;
|
|
10562
9382
|
exports.PillSelect = PillSelect;
|
|
10563
9383
|
exports.RecurrenceBuilder = RecurrenceBuilder;
|
|
10564
9384
|
exports.STATUS_LABELS = STATUS_LABELS;
|
|
@@ -10601,7 +9421,6 @@ exports.TaskStartDialog = TaskStartDialog;
|
|
|
10601
9421
|
exports.TaskStatusPill = TaskStatusPill;
|
|
10602
9422
|
exports.TaskTable = TaskTable;
|
|
10603
9423
|
exports.TaskThreadChip = TaskThreadChip;
|
|
10604
|
-
exports.TaskTriggerChip = TaskTriggerChip;
|
|
10605
9424
|
exports.TasksToolbar = TasksToolbar;
|
|
10606
9425
|
exports.ThreadActivity = ThreadActivity;
|
|
10607
9426
|
exports.ThreadLauncher = ThreadLauncher;
|
|
@@ -10611,14 +9430,9 @@ exports.TupleArrayField = TupleArrayField;
|
|
|
10611
9430
|
exports.UploadTaskItem = UploadTaskItem;
|
|
10612
9431
|
exports.UploadTaskList = UploadTaskList;
|
|
10613
9432
|
exports.WEEKDAYS = WEEKDAYS;
|
|
10614
|
-
exports.WORKFLOW_COLUMN_ORDER = WORKFLOW_COLUMN_ORDER;
|
|
10615
|
-
exports.WorkflowConfigDialog = WorkflowConfigDialog;
|
|
10616
|
-
exports.WorkflowDocumentsField = WorkflowDocumentsField;
|
|
10617
|
-
exports.WorkflowLauncher = WorkflowLauncher;
|
|
10618
9433
|
exports.WorkflowRunStatus = WorkflowRunStatus;
|
|
10619
9434
|
exports.WorkflowThreadStartedBy = WorkflowThreadStartedBy;
|
|
10620
9435
|
exports.WorkflowThreadStrip = WorkflowThreadStrip;
|
|
10621
|
-
exports.WorkflowsTable = WorkflowsTable;
|
|
10622
9436
|
exports.WorkflowsToolbar = WorkflowsToolbar;
|
|
10623
9437
|
exports.agentConfigSectionToValues = agentConfigSectionToValues;
|
|
10624
9438
|
exports.agentCreatorToConfigSection = agentCreatorToConfigSection;
|
|
@@ -10626,7 +9440,6 @@ exports.asTaskStatus = asTaskStatus;
|
|
|
10626
9440
|
exports.authModeFor = authModeFor;
|
|
10627
9441
|
exports.buildRRule = buildRRule;
|
|
10628
9442
|
exports.buildTaskRows = buildTaskRows;
|
|
10629
|
-
exports.buildWorkflowScopeSource = buildWorkflowScopeSource;
|
|
10630
9443
|
exports.compactThreadActivity = compactThreadActivity;
|
|
10631
9444
|
exports.composePersona = composePersona;
|
|
10632
9445
|
exports.composerToTaskQuery = composerToTaskQuery;
|
|
@@ -10634,7 +9447,6 @@ exports.composerToWorkRequest = composerToWorkRequest;
|
|
|
10634
9447
|
exports.composerToWorkflowRequest = composerToWorkflowRequest;
|
|
10635
9448
|
exports.composerToWorkflowUpdate = composerToWorkflowUpdate;
|
|
10636
9449
|
exports.createTaskColumns = createTaskColumns;
|
|
10637
|
-
exports.createWorkflowColumns = createWorkflowColumns;
|
|
10638
9450
|
exports.createsWork = createsWork;
|
|
10639
9451
|
exports.defaultScopeRenderer = defaultScopeRenderer;
|
|
10640
9452
|
exports.defaultTaskComposerValues = defaultTaskComposerValues;
|
|
@@ -10648,7 +9460,6 @@ exports.formatElapsed = formatElapsed;
|
|
|
10648
9460
|
exports.goalProgress = goalProgress;
|
|
10649
9461
|
exports.groupThreadActivity = groupThreadActivity;
|
|
10650
9462
|
exports.hasTaskFields = hasTaskFields;
|
|
10651
|
-
exports.hasTrigger = hasTrigger;
|
|
10652
9463
|
exports.humanizeSection = humanizeSection;
|
|
10653
9464
|
exports.indexTasks = indexTasks;
|
|
10654
9465
|
exports.inferType = inferType;
|
|
@@ -10656,12 +9467,10 @@ exports.inputDocumentIds = inputDocumentIds;
|
|
|
10656
9467
|
exports.isAgenticWorkflow = isAgenticWorkflow;
|
|
10657
9468
|
exports.isOutOfBounds = isOutOfBounds;
|
|
10658
9469
|
exports.isPlainTodo = isPlainTodo;
|
|
10659
|
-
exports.isSkillRow = isSkillRow;
|
|
10660
9470
|
exports.isValidAgentName = isValidAgentName;
|
|
10661
9471
|
exports.isoToLocalInput = isoToLocalInput;
|
|
10662
9472
|
exports.linkedRunsFromActivity = linkedRunsFromActivity;
|
|
10663
9473
|
exports.localInputToIso = localInputToIso;
|
|
10664
|
-
exports.matchWorkflowScope = matchWorkflowScope;
|
|
10665
9474
|
exports.moveTargets = moveTargets;
|
|
10666
9475
|
exports.newThreadToRequest = newThreadToRequest;
|
|
10667
9476
|
exports.nextCriterionId = nextCriterionId;
|
|
@@ -10669,7 +9478,6 @@ exports.ownerExtId = ownerExtId;
|
|
|
10669
9478
|
exports.parseRRule = parseRRule;
|
|
10670
9479
|
exports.prettifyKey = prettifyKey;
|
|
10671
9480
|
exports.resolveScopeInputs = resolveScopeInputs;
|
|
10672
|
-
exports.skillSlug = skillSlug;
|
|
10673
9481
|
exports.stripPersonaPreamble = stripPersonaPreamble;
|
|
10674
9482
|
exports.summarizeAgent = summarizeAgent;
|
|
10675
9483
|
exports.summarizeCapabilities = summarizeCapabilities;
|
|
@@ -10678,12 +9486,8 @@ exports.taskComposerToUpdateRequest = taskComposerToUpdateRequest;
|
|
|
10678
9486
|
exports.taskNeedsAccess = taskNeedsAccess;
|
|
10679
9487
|
exports.taskToComposerValues = taskToComposerValues;
|
|
10680
9488
|
exports.useWorkflowPreview = useWorkflowPreview;
|
|
10681
|
-
exports.workflowFromSkillMarkdown = workflowFromSkillMarkdown;
|
|
10682
|
-
exports.workflowStatus = workflowStatus;
|
|
10683
9489
|
exports.workflowTaskFields = workflowTaskFields;
|
|
10684
9490
|
exports.workflowToComposerValues = workflowToComposerValues;
|
|
10685
|
-
exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
|
|
10686
|
-
exports.workflowTriggerType = workflowTriggerType;
|
|
10687
9491
|
exports.workflowWhen = workflowWhen;
|
|
10688
|
-
//# sourceMappingURL=chunk-
|
|
10689
|
-
//# sourceMappingURL=chunk-
|
|
9492
|
+
//# sourceMappingURL=chunk-JY73DJOS.cjs.map
|
|
9493
|
+
//# sourceMappingURL=chunk-JY73DJOS.cjs.map
|