@arbidocs/blocks 0.4.109 → 0.4.111
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/{NativeDocxEditor-WODZAURG.cjs → NativeDocxEditor-AQKRZBIU.cjs} +7 -7
- package/dist/{NativeDocxEditor-WODZAURG.cjs.map → NativeDocxEditor-AQKRZBIU.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-4PY4YZYC.js → NativeDocxEditor-IN2HEO5I.js} +3 -3
- package/dist/{NativeDocxEditor-4PY4YZYC.js.map → NativeDocxEditor-IN2HEO5I.js.map} +1 -1
- package/dist/agents/index.cjs +286 -286
- package/dist/agents/index.js +10 -10
- package/dist/agents/tasks/ConversationListView.d.ts +5 -1
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +5 -1
- package/dist/calendar/EventDetails.d.ts +1 -1
- package/dist/calendar/EventEditor.d.ts +1 -1
- package/dist/calendar/draft.d.ts +7 -1
- package/dist/calendar/index.cjs +71 -10
- package/dist/calendar/index.cjs.map +1 -1
- package/dist/calendar/index.d.ts +1 -1
- package/dist/calendar/index.js +69 -11
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/types.d.ts +23 -0
- package/dist/calls/CallSidePanel.d.ts +32 -0
- package/dist/calls/CallStage.d.ts +57 -0
- package/dist/calls/ControlBar.d.ts +113 -0
- package/dist/calls/ControlButton.d.ts +44 -0
- package/dist/calls/PreJoin.d.ts +35 -0
- package/dist/calls/cards.d.ts +58 -0
- package/dist/calls/hooks.d.ts +20 -0
- package/dist/calls/index.cjs +2884 -0
- package/dist/calls/index.cjs.map +1 -0
- package/dist/calls/index.d.ts +21 -0
- package/dist/calls/index.js +2753 -0
- package/dist/calls/index.js.map +1 -0
- package/dist/calls/join-choices.d.ts +11 -0
- package/dist/calls/layout.d.ts +106 -0
- package/dist/calls/panels.d.ts +66 -0
- package/dist/calls/status.d.ts +69 -0
- package/dist/calls/tiles.d.ts +59 -0
- package/dist/calls/webinar/ChatPermissionSetting.d.ts +18 -0
- package/dist/calls/webinar/OnStageCheck.d.ts +23 -0
- package/dist/calls/webinar/QAPanel.d.ts +56 -0
- package/dist/calls/webinar/RaiseHandButton.d.ts +14 -0
- package/dist/calls/webinar/WebinarAudiencePanel.d.ts +23 -0
- package/dist/calls/webinar/WebinarViewer.d.ts +39 -0
- package/dist/calls/webinar/WebinarWaiting.d.ts +19 -0
- package/dist/calls/webinar/hooks.d.ts +13 -0
- package/dist/calls/webinar/index.d.ts +14 -0
- package/dist/calls/webinar/live.d.ts +43 -0
- package/dist/calls/webinar/types.d.ts +49 -0
- package/dist/chat/Message.d.ts +17 -2
- package/dist/chat/TranscriptLine.d.ts +50 -0
- package/dist/chat/index.cjs +147 -126
- package/dist/chat/index.d.ts +3 -1
- package/dist/chat/index.js +5 -4
- package/dist/chat/transcript-runs.d.ts +6 -0
- package/dist/{chunk-GKDWQLVU.js → chunk-2C7TCVQZ.js} +172 -121
- package/dist/chunk-2C7TCVQZ.js.map +1 -0
- package/dist/{chunk-QKWQMOHN.cjs → chunk-2UAJVK3C.cjs} +4 -4
- package/dist/{chunk-QKWQMOHN.cjs.map → chunk-2UAJVK3C.cjs.map} +1 -1
- package/dist/{chunk-54WBIVHV.cjs → chunk-2WO5L7YT.cjs} +5 -5
- package/dist/{chunk-54WBIVHV.cjs.map → chunk-2WO5L7YT.cjs.map} +1 -1
- package/dist/{chunk-7C35WXYB.js → chunk-5HFPRI3W.js} +5 -5
- package/dist/chunk-5HFPRI3W.js.map +1 -0
- package/dist/{chunk-ZSV2NQQP.js → chunk-6RHHMBZ5.js} +158 -5
- package/dist/chunk-6RHHMBZ5.js.map +1 -0
- package/dist/{chunk-FQX6N5G6.js → chunk-6Z7DLJU2.js} +35 -18
- package/dist/chunk-6Z7DLJU2.js.map +1 -0
- package/dist/{chunk-PGDL26TQ.js → chunk-AY32GGKU.js} +10 -4
- package/dist/{chunk-PGDL26TQ.js.map → chunk-AY32GGKU.js.map} +1 -1
- package/dist/{chunk-S55VDTX3.js → chunk-CECWAIHL.js} +3 -3
- package/dist/{chunk-S55VDTX3.js.map → chunk-CECWAIHL.js.map} +1 -1
- package/dist/{chunk-UABPHZWZ.js → chunk-CXZ7FPTQ.js} +3 -3
- package/dist/{chunk-UABPHZWZ.js.map → chunk-CXZ7FPTQ.js.map} +1 -1
- package/dist/{chunk-C2HRZSAT.cjs → chunk-DJM7DLCT.cjs} +5 -5
- package/dist/chunk-DJM7DLCT.cjs.map +1 -0
- package/dist/{chunk-GBYY3PIC.cjs → chunk-FXUQZFAN.cjs} +79 -62
- package/dist/chunk-FXUQZFAN.cjs.map +1 -0
- package/dist/{chunk-W7NZRZ54.js → chunk-GFYGYME3.js} +3 -3
- package/dist/{chunk-W7NZRZ54.js.map → chunk-GFYGYME3.js.map} +1 -1
- package/dist/chunk-GICUGQNN.cjs +76 -0
- package/dist/chunk-GICUGQNN.cjs.map +1 -0
- package/dist/{chunk-I4XQCE6U.cjs → chunk-HBBJYRGI.cjs} +162 -5
- package/dist/{chunk-ZSV2NQQP.js.map → chunk-HBBJYRGI.cjs.map} +1 -1
- package/dist/chunk-JJLMCV3T.js +73 -0
- package/dist/chunk-JJLMCV3T.js.map +1 -0
- package/dist/chunk-MWDW5UBW.cjs +199 -0
- package/dist/chunk-MWDW5UBW.cjs.map +1 -0
- package/dist/{chunk-NUTLXVPX.js → chunk-NRUPUDWB.js} +16 -7
- package/dist/chunk-NRUPUDWB.js.map +1 -0
- package/dist/{chunk-5YXG342J.cjs → chunk-OR4CO743.cjs} +3 -3
- package/dist/{chunk-5YXG342J.cjs.map → chunk-OR4CO743.cjs.map} +1 -1
- package/dist/{chunk-DDF5GPIJ.js → chunk-P5ST47VY.js} +3 -3
- package/dist/{chunk-DDF5GPIJ.js.map → chunk-P5ST47VY.js.map} +1 -1
- package/dist/{chunk-PEHLUB52.js → chunk-Q6B77ZWZ.js} +3 -3
- package/dist/{chunk-PEHLUB52.js.map → chunk-Q6B77ZWZ.js.map} +1 -1
- package/dist/{chunk-ELDUWTRR.cjs → chunk-TF47ATYS.cjs} +4 -4
- package/dist/{chunk-ELDUWTRR.cjs.map → chunk-TF47ATYS.cjs.map} +1 -1
- package/dist/{chunk-PDRYGPZB.cjs → chunk-VP4KJ4LK.cjs} +16 -6
- package/dist/chunk-VP4KJ4LK.cjs.map +1 -0
- package/dist/{chunk-SKSE4OT6.cjs → chunk-WPVIOGDG.cjs} +5 -5
- package/dist/{chunk-SKSE4OT6.cjs.map → chunk-WPVIOGDG.cjs.map} +1 -1
- package/dist/{chunk-JB32KYAH.js → chunk-WTM65ZNG.js} +3 -3
- package/dist/{chunk-JB32KYAH.js.map → chunk-WTM65ZNG.js.map} +1 -1
- package/dist/{chunk-2NIL2ASF.cjs → chunk-XIGWUDOD.cjs} +170 -119
- package/dist/chunk-XIGWUDOD.cjs.map +1 -0
- package/dist/{chunk-3US5OIDQ.cjs → chunk-XSUOEJB3.cjs} +9 -3
- package/dist/chunk-XSUOEJB3.cjs.map +1 -0
- package/dist/chunk-Z3AZ7Q5X.js +177 -0
- package/dist/chunk-Z3AZ7Q5X.js.map +1 -0
- package/dist/{chunk-Z5VUZ6YD.cjs → chunk-ZV3BKLFY.cjs} +3 -3
- package/dist/{chunk-Z5VUZ6YD.cjs.map → chunk-ZV3BKLFY.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +42 -42
- package/dist/collaboration/index.js +2 -2
- package/dist/connect/docx.cjs +6 -6
- package/dist/connect/docx.js +4 -4
- package/dist/connect/index.cjs +72 -72
- package/dist/connect/index.js +18 -18
- package/dist/docx/AgentUndo.d.ts +4 -0
- package/dist/docx/index.cjs +46 -46
- package/dist/docx/index.js +3 -3
- package/dist/facts/index.cjs +4 -4
- package/dist/facts/index.js +4 -4
- package/dist/files/index.cjs +6 -6
- package/dist/files/index.js +6 -6
- package/dist/home/index.cjs +17 -17
- package/dist/home/index.js +3 -3
- package/dist/index.cjs +958 -937
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -23
- package/dist/index.js.map +1 -1
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +50 -104
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +12 -72
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/index.cjs +12 -12
- package/dist/shell/index.js +4 -4
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +5 -5
- package/dist/studio/index.js +4 -4
- package/dist/workflow-canvas/index.cjs +53 -53
- package/dist/workflow-canvas/index.js +10 -10
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/node_modules/@arbidocs/coedit/dist/commands.cjs +179 -9
- package/node_modules/@arbidocs/coedit/dist/commands.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.cts +81 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.ts +81 -1
- package/node_modules/@arbidocs/coedit/dist/commands.js +173 -11
- package/node_modules/@arbidocs/coedit/dist/commands.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.cjs +58 -2
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +29 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +29 -1
- package/node_modules/@arbidocs/coedit/dist/server.js +58 -3
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +15 -5
- package/src/calls/calls.css +157 -0
- package/dist/chunk-2NIL2ASF.cjs.map +0 -1
- package/dist/chunk-3US5OIDQ.cjs.map +0 -1
- package/dist/chunk-7C35WXYB.js.map +0 -1
- package/dist/chunk-C2HRZSAT.cjs.map +0 -1
- package/dist/chunk-FQX6N5G6.js.map +0 -1
- package/dist/chunk-GBYY3PIC.cjs.map +0 -1
- package/dist/chunk-GKDWQLVU.js.map +0 -1
- package/dist/chunk-I4XQCE6U.cjs.map +0 -1
- package/dist/chunk-NUTLXVPX.js.map +0 -1
- package/dist/chunk-PDRYGPZB.cjs.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var chunkZV3BKLFY_cjs = require('./chunk-ZV3BKLFY.cjs');
|
|
4
5
|
var chunkS5HZBXZA_cjs = require('./chunk-S5HZBXZA.cjs');
|
|
5
6
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
6
|
-
var
|
|
7
|
+
var chunkXSUOEJB3_cjs = require('./chunk-XSUOEJB3.cjs');
|
|
8
|
+
var chunk7D737FLE_cjs = require('./chunk-7D737FLE.cjs');
|
|
7
9
|
var chunkN26CXGXC_cjs = require('./chunk-N26CXGXC.cjs');
|
|
8
|
-
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
9
10
|
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
10
11
|
var chunkDVUZTGVL_cjs = require('./chunk-DVUZTGVL.cjs');
|
|
12
|
+
var chunkOB5F4577_cjs = require('./chunk-OB5F4577.cjs');
|
|
11
13
|
var chunkV4ISCZJ7_cjs = require('./chunk-V4ISCZJ7.cjs');
|
|
12
14
|
var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
15
|
+
var chunkC2CWWEHO_cjs = require('./chunk-C2CWWEHO.cjs');
|
|
16
|
+
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
17
|
+
var chunkULWRNGGE_cjs = require('./chunk-ULWRNGGE.cjs');
|
|
16
18
|
var chunkB4SRYJLM_cjs = require('./chunk-B4SRYJLM.cjs');
|
|
17
19
|
var chunk7UTB4PHM_cjs = require('./chunk-7UTB4PHM.cjs');
|
|
18
|
-
var chunkC54XEN5T_cjs = require('./chunk-C54XEN5T.cjs');
|
|
19
|
-
var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
|
|
20
|
-
var chunkULWRNGGE_cjs = require('./chunk-ULWRNGGE.cjs');
|
|
21
|
-
var chunkC2CWWEHO_cjs = require('./chunk-C2CWWEHO.cjs');
|
|
22
20
|
var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
|
|
23
21
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
22
|
+
var chunkC54XEN5T_cjs = require('./chunk-C54XEN5T.cjs');
|
|
23
|
+
var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
|
|
24
24
|
var react = require('react');
|
|
25
25
|
var ui = require('@arbidocs/react/ui');
|
|
26
26
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -146,7 +146,7 @@ function WorkflowConfigDialog({
|
|
|
146
146
|
}) {
|
|
147
147
|
const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
|
|
148
148
|
const initialKey = JSON.stringify(initialInputs ?? {});
|
|
149
|
-
const seedKey = JSON.stringify({ ...
|
|
149
|
+
const seedKey = JSON.stringify({ ...chunkXSUOEJB3_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
|
|
150
150
|
const seed = react.useMemo(() => JSON.parse(seedKey), [seedKey]);
|
|
151
151
|
const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
|
|
152
152
|
const [agentId, setAgentId] = useControllableState(
|
|
@@ -158,7 +158,7 @@ function WorkflowConfigDialog({
|
|
|
158
158
|
if (open && inputsProp === void 0) setInputs(seed);
|
|
159
159
|
}, [open, seed]);
|
|
160
160
|
const setField = (name, value) => setInputs({ ...inputs, [name]: value });
|
|
161
|
-
const errors =
|
|
161
|
+
const errors = chunkXSUOEJB3_cjs.validateInputs(workflow, inputs);
|
|
162
162
|
const valid = Object.keys(errors).length === 0;
|
|
163
163
|
const visibleErrors = Object.fromEntries(
|
|
164
164
|
Object.entries(errors).filter(([, e]) => e !== "required")
|
|
@@ -171,7 +171,7 @@ function WorkflowConfigDialog({
|
|
|
171
171
|
const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
|
|
172
172
|
const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
|
|
173
173
|
const launch = (values) => {
|
|
174
|
-
Promise.resolve(onLaunch(
|
|
174
|
+
Promise.resolve(onLaunch(chunkXSUOEJB3_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
|
|
175
175
|
});
|
|
176
176
|
};
|
|
177
177
|
const submit = () => {
|
|
@@ -190,7 +190,7 @@ function WorkflowConfigDialog({
|
|
|
190
190
|
const firstField = workflow.inputs.find((f) => !f.advanced);
|
|
191
191
|
const focusPromptFirst = firstField?.type === "text" || firstField?.type === "longtext";
|
|
192
192
|
const defaultScopeRender = scopeSource ? (_field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
193
|
-
|
|
193
|
+
chunkZV3BKLFY_cjs.ScopePicker,
|
|
194
194
|
{
|
|
195
195
|
folders: scopeSource.folders,
|
|
196
196
|
unfiledCount: scopeSource.unfiledCount,
|
|
@@ -223,7 +223,7 @@ function WorkflowConfigDialog({
|
|
|
223
223
|
},
|
|
224
224
|
children: [
|
|
225
225
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
226
|
-
|
|
226
|
+
chunkZV3BKLFY_cjs.QuickActionDialogHeader,
|
|
227
227
|
{
|
|
228
228
|
icon: workflow.icon && renderIcon ? renderIcon(workflow.icon) : null,
|
|
229
229
|
title: workflow.title,
|
|
@@ -241,7 +241,7 @@ function WorkflowConfigDialog({
|
|
|
241
241
|
submit();
|
|
242
242
|
},
|
|
243
243
|
children: noFiles ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
244
|
-
|
|
244
|
+
chunkZV3BKLFY_cjs.AddFilesFirst,
|
|
245
245
|
{
|
|
246
246
|
reason: l.addFilesReason,
|
|
247
247
|
action: addFilesAction,
|
|
@@ -249,7 +249,7 @@ function WorkflowConfigDialog({
|
|
|
249
249
|
}
|
|
250
250
|
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
251
251
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
252
|
-
|
|
252
|
+
chunkXSUOEJB3_cjs.SchemaForm,
|
|
253
253
|
{
|
|
254
254
|
fields,
|
|
255
255
|
values: inputs,
|
|
@@ -308,7 +308,7 @@ function defaultScopeRenderer(scopeSource) {
|
|
|
308
308
|
if (!scopeSource) return void 0;
|
|
309
309
|
return function renderScope(_field, value, onChange) {
|
|
310
310
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
311
|
-
|
|
311
|
+
chunkZV3BKLFY_cjs.ScopePicker,
|
|
312
312
|
{
|
|
313
313
|
folders: scopeSource.folders,
|
|
314
314
|
unfiledCount: scopeSource.unfiledCount,
|
|
@@ -327,7 +327,7 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
|
|
|
327
327
|
for (const field of workflow.inputs) {
|
|
328
328
|
if (field.type !== "scope") continue;
|
|
329
329
|
const raw = inputs[field.name];
|
|
330
|
-
const scope =
|
|
330
|
+
const scope = chunkXSUOEJB3_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
|
|
331
331
|
next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
|
|
332
332
|
}
|
|
333
333
|
return next;
|
|
@@ -369,9 +369,9 @@ function WorkflowLauncher({
|
|
|
369
369
|
};
|
|
370
370
|
const select = (workflow) => {
|
|
371
371
|
if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
|
|
372
|
-
const inputs =
|
|
373
|
-
if (Object.keys(
|
|
374
|
-
Promise.resolve(onLaunch(
|
|
372
|
+
const inputs = chunkXSUOEJB3_cjs.defaultInputs(workflow);
|
|
373
|
+
if (Object.keys(chunkXSUOEJB3_cjs.validateInputs(workflow, inputs)).length === 0) {
|
|
374
|
+
Promise.resolve(onLaunch(chunkXSUOEJB3_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
|
|
375
375
|
});
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
@@ -393,7 +393,7 @@ function WorkflowLauncher({
|
|
|
393
393
|
});
|
|
394
394
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, "data-slot": "workflow-launcher", children: [
|
|
395
395
|
showTiles && /* @__PURE__ */ jsxRuntime.jsx(
|
|
396
|
-
|
|
396
|
+
chunkZV3BKLFY_cjs.StartTiles,
|
|
397
397
|
{
|
|
398
398
|
items: [...tiles, ...extraTiles],
|
|
399
399
|
caption,
|
|
@@ -521,7 +521,7 @@ function workflowToSkillMarkdown(workflow) {
|
|
|
521
521
|
if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
|
|
522
522
|
if (workflow.requiresFiles) lines.push("requires_files: true");
|
|
523
523
|
if (workflow.inputs.length > 0) {
|
|
524
|
-
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(
|
|
524
|
+
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkXSUOEJB3_cjs.fieldToFrontmatter))}`);
|
|
525
525
|
}
|
|
526
526
|
lines.push("---", "", run.promptTemplate.trim(), "");
|
|
527
527
|
return lines.join("\n");
|
|
@@ -543,11 +543,11 @@ function workflowFromSkillMarkdown(id, text2) {
|
|
|
543
543
|
} else if (value === "true" || value === "false") frontmatter[key] = value === "true";
|
|
544
544
|
else frontmatter[key] = value;
|
|
545
545
|
}
|
|
546
|
-
return
|
|
546
|
+
return chunkXSUOEJB3_cjs.workflowFromFrontmatter(id, frontmatter, body);
|
|
547
547
|
}
|
|
548
548
|
function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
|
|
549
|
-
const steps =
|
|
550
|
-
const [inputs, setInputs] = react.useState(() =>
|
|
549
|
+
const steps = chunkXSUOEJB3_cjs.workflowSteps(workflow);
|
|
550
|
+
const [inputs, setInputs] = react.useState(() => chunkXSUOEJB3_cjs.initialRunInputs(workflow));
|
|
551
551
|
const [states, setStates] = react.useState({});
|
|
552
552
|
const set = (id, state) => setStates((s) => ({ ...s, [id]: state }));
|
|
553
553
|
const timers = react.useRef(/* @__PURE__ */ new Map());
|
|
@@ -569,10 +569,10 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
569
569
|
react.useEffect(() => {
|
|
570
570
|
if (Object.values(states).some((s) => s.status === "running")) return;
|
|
571
571
|
const next = steps.find(
|
|
572
|
-
(s) => (s.kind === "agent" || s.kind === "action") &&
|
|
572
|
+
(s) => (s.kind === "agent" || s.kind === "action") && chunkXSUOEJB3_cjs.stepPhase(steps, states, s.id) === "ready"
|
|
573
573
|
);
|
|
574
574
|
if (!next || next.kind !== "agent" && next.kind !== "action") return;
|
|
575
|
-
const prompt = next.kind === "agent" ?
|
|
575
|
+
const prompt = next.kind === "agent" ? chunkXSUOEJB3_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
|
|
576
576
|
set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
577
577
|
timers.current.set(
|
|
578
578
|
next.id,
|
|
@@ -585,7 +585,7 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
585
585
|
}, delayMs)
|
|
586
586
|
);
|
|
587
587
|
}, [states, steps, workflow]);
|
|
588
|
-
return
|
|
588
|
+
return chunkXSUOEJB3_cjs.useWorkflowView({
|
|
589
589
|
steps,
|
|
590
590
|
states,
|
|
591
591
|
inputs,
|
|
@@ -4416,7 +4416,7 @@ function EntityChip({
|
|
|
4416
4416
|
}
|
|
4417
4417
|
);
|
|
4418
4418
|
}
|
|
4419
|
-
function filterConversationRows(conversations, query, labelText, doneFilter = "exclude", visibilityFilters) {
|
|
4419
|
+
function filterConversationRows(conversations, query, labelText, doneFilter = "exclude", visibilityFilters, meetingFilter = null) {
|
|
4420
4420
|
const q = query.trim().toLowerCase();
|
|
4421
4421
|
return [...conversations].sort(
|
|
4422
4422
|
(a, b) => (Date.parse(b.last_message_updated_at || b.updated_at || b.created_at || "") || 0) - (Date.parse(a.last_message_updated_at || a.updated_at || a.created_at || "") || 0)
|
|
@@ -4426,7 +4426,9 @@ function filterConversationRows(conversations, query, labelText, doneFilter = "e
|
|
|
4426
4426
|
const state = row.is_shared ? visibilityFilters?.workspace : visibilityFilters?.me;
|
|
4427
4427
|
const hasIncluded = visibilityFilters?.me === "include" || visibilityFilters?.workspace === "include";
|
|
4428
4428
|
return state !== "exclude" && (!hasIncluded || state === "include");
|
|
4429
|
-
}).filter(
|
|
4429
|
+
}).filter(
|
|
4430
|
+
(row) => meetingFilter === "include" ? !!row.meeting_call_ext_id : meetingFilter === "exclude" ? !row.meeting_call_ext_id : true
|
|
4431
|
+
).filter((row) => !q || `${row.title ?? ""} ${labelText?.(row) ?? ""}`.toLowerCase().includes(q));
|
|
4430
4432
|
}
|
|
4431
4433
|
function ConversationListView(p) {
|
|
4432
4434
|
const liveProps = react.useRef(p);
|
|
@@ -4436,8 +4438,15 @@ function ConversationListView(p) {
|
|
|
4436
4438
|
const q = `${query} ${p.filterText ?? ""}`.trim().toLowerCase();
|
|
4437
4439
|
const isPhone = chunkFX3K6LNZ_cjs.useIsPhone();
|
|
4438
4440
|
const rows = react.useMemo(
|
|
4439
|
-
() => filterConversationRows(
|
|
4440
|
-
|
|
4441
|
+
() => filterConversationRows(
|
|
4442
|
+
p.conversations,
|
|
4443
|
+
q,
|
|
4444
|
+
p.labelText,
|
|
4445
|
+
p.doneFilter,
|
|
4446
|
+
p.visibilityFilters,
|
|
4447
|
+
p.meetingFilter
|
|
4448
|
+
),
|
|
4449
|
+
[p.conversations, q, p.labelText, p.doneFilter, p.visibilityFilters, p.meetingFilter]
|
|
4441
4450
|
);
|
|
4442
4451
|
const selectedRows = p.conversations.filter((c) => selected.has(c.external_id));
|
|
4443
4452
|
const columns = react.useMemo(
|
|
@@ -4999,7 +5008,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
4999
5008
|
}
|
|
5000
5009
|
const typed = name?.trim();
|
|
5001
5010
|
if (workflow.options?.agent === false) {
|
|
5002
|
-
const message =
|
|
5011
|
+
const message = chunkXSUOEJB3_cjs.composeWorkflowPrompt(workflow, inputs, context);
|
|
5003
5012
|
return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
|
|
5004
5013
|
}
|
|
5005
5014
|
const derived = typed || deriveWorkflowName(workflow, inputs);
|
|
@@ -5013,7 +5022,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
5013
5022
|
}
|
|
5014
5023
|
return {
|
|
5015
5024
|
name: derived,
|
|
5016
|
-
prompt:
|
|
5025
|
+
prompt: chunkXSUOEJB3_cjs.composeWorkflowPrompt(workflow, inputs, context),
|
|
5017
5026
|
skill_ref: null,
|
|
5018
5027
|
// The files a run is bound to travel in the saved inputs, whatever the template: the server binds
|
|
5019
5028
|
// the run to the ids listed under any input's `documents`.
|
|
@@ -5183,7 +5192,7 @@ function workflowToComposerValues(workflow, workflows) {
|
|
|
5183
5192
|
runAt: isoToLocalInput(workflow.run_at),
|
|
5184
5193
|
rrule: workflow.rrule ?? "",
|
|
5185
5194
|
timezone: workflow.timezone,
|
|
5186
|
-
eventKind: workflow.event_kind ?? "
|
|
5195
|
+
eventKind: workflow.event_kind ?? "mention",
|
|
5187
5196
|
eventFilter: workflow.event_filter ?? null,
|
|
5188
5197
|
afterTaskId: workflow.after_conversation_ext_id ?? "",
|
|
5189
5198
|
shared: workflow.shared,
|
|
@@ -6193,7 +6202,7 @@ function TaskActivityDialog({
|
|
|
6193
6202
|
testId,
|
|
6194
6203
|
...timeline
|
|
6195
6204
|
}) {
|
|
6196
|
-
const l = { ...
|
|
6205
|
+
const l = { ...chunkXSUOEJB3_cjs.DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
|
|
6197
6206
|
const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "task-activity" });
|
|
6198
6207
|
const count = events?.length ?? 0;
|
|
6199
6208
|
const scrollToEnd = react.useCallback(
|
|
@@ -6208,7 +6217,7 @@ function TaskActivityDialog({
|
|
|
6208
6217
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "truncate", children: taskName })
|
|
6209
6218
|
] }),
|
|
6210
6219
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-h-[55dvh] overflow-y-auto pr-1", "data-testid": `${id}-scroll`, children: [
|
|
6211
|
-
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(
|
|
6220
|
+
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(chunkXSUOEJB3_cjs.TaskActivityTimeline, { events: events ?? [], labels, testId: id, ...timeline }),
|
|
6212
6221
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollToEnd })
|
|
6213
6222
|
] })
|
|
6214
6223
|
] }) });
|
|
@@ -6335,7 +6344,7 @@ function groupThreadActivity(steps, items) {
|
|
|
6335
6344
|
continue;
|
|
6336
6345
|
}
|
|
6337
6346
|
if (current === void 0) out.before.push(item);
|
|
6338
|
-
else if (
|
|
6347
|
+
else if (chunkXSUOEJB3_cjs.isRunFinished(steps, states)) out.after.push(item);
|
|
6339
6348
|
else {
|
|
6340
6349
|
const status = states[current]?.status;
|
|
6341
6350
|
const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
|
|
@@ -6453,13 +6462,13 @@ function WorkflowThreadStrip({
|
|
|
6453
6462
|
const chevron = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-3 shrink-0 text-muted-foreground" });
|
|
6454
6463
|
const [selected, setSelected] = react.useState(null);
|
|
6455
6464
|
const [open, setOpen] = react.useState(null);
|
|
6456
|
-
const phaseOf = (id) =>
|
|
6465
|
+
const phaseOf = (id) => chunkXSUOEJB3_cjs.stepPhase(steps, states, id);
|
|
6457
6466
|
const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
|
|
6458
6467
|
const waitingOf = (id) => {
|
|
6459
6468
|
const step = steps.find((s) => s.id === id);
|
|
6460
6469
|
const phase = phaseOf(id);
|
|
6461
|
-
const documents =
|
|
6462
|
-
if (documents.length) return
|
|
6470
|
+
const documents = chunkXSUOEJB3_cjs.waitingDocuments(states[id]);
|
|
6471
|
+
if (documents.length) return chunkXSUOEJB3_cjs.waitingForDocumentsText(documents.length);
|
|
6463
6472
|
const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
|
|
6464
6473
|
return name ? l.waitingFor.replace("{name}", name) : void 0;
|
|
6465
6474
|
};
|
|
@@ -6474,14 +6483,14 @@ function WorkflowThreadStrip({
|
|
|
6474
6483
|
"button",
|
|
6475
6484
|
{
|
|
6476
6485
|
type: "button",
|
|
6477
|
-
className: ui.cn(
|
|
6486
|
+
className: ui.cn(chunkXSUOEJB3_cjs.STEP_PILL, "py-0.5", chunkXSUOEJB3_cjs.stepPillTone(phase, isCurrent)),
|
|
6478
6487
|
"aria-current": isCurrent ? "step" : void 0,
|
|
6479
6488
|
title: waiting ? `${step.title} \xB7 ${waiting}` : step.title,
|
|
6480
6489
|
"data-phase": phase,
|
|
6481
6490
|
"data-testid": `workflow-thread-step-${step.id}`,
|
|
6482
6491
|
children: [
|
|
6483
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6484
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: isCurrent ?
|
|
6492
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkXSUOEJB3_cjs.PhaseMark, { phase, icon: iconOf(step) }),
|
|
6493
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: isCurrent ? chunkXSUOEJB3_cjs.STEP_LABEL_CURRENT : ui.cn(chunkXSUOEJB3_cjs.STEP_LABEL, chunkXSUOEJB3_cjs.STEP_LABEL_MAX), children: step.title }),
|
|
6485
6494
|
sentBack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6486
6495
|
lucideReact.CornerUpLeft,
|
|
6487
6496
|
{
|
|
@@ -6493,7 +6502,7 @@ function WorkflowThreadStrip({
|
|
|
6493
6502
|
assignee && isCurrent && !narrow && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6494
6503
|
"span",
|
|
6495
6504
|
{
|
|
6496
|
-
className: ui.cn(
|
|
6505
|
+
className: ui.cn(chunkXSUOEJB3_cjs.STEP_EXTRA, "flex max-w-[12rem] items-center gap-0.5"),
|
|
6497
6506
|
title: waiting,
|
|
6498
6507
|
"data-testid": `workflow-thread-step-${step.id}-assignee`,
|
|
6499
6508
|
children: [
|
|
@@ -6552,9 +6561,9 @@ function WorkflowThreadStrip({
|
|
|
6552
6561
|
strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }) }, `${s.step}-${s.signal}`))
|
|
6553
6562
|
] }) : null;
|
|
6554
6563
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6555
|
-
|
|
6564
|
+
chunkXSUOEJB3_cjs.StepBarFrame,
|
|
6556
6565
|
{
|
|
6557
|
-
levels:
|
|
6566
|
+
levels: chunkXSUOEJB3_cjs.stepLevels(steps),
|
|
6558
6567
|
phaseOf,
|
|
6559
6568
|
current: selected,
|
|
6560
6569
|
onSelect: (id) => {
|
|
@@ -6639,10 +6648,10 @@ function compactThreadActivity(events) {
|
|
|
6639
6648
|
const count = Math.max(1, entry.recipients.length);
|
|
6640
6649
|
entry.label = `Notified ${count} ${count === 1 ? "user" : "users"}`;
|
|
6641
6650
|
} else if (STEP_LABELS[event.kind]) {
|
|
6642
|
-
const documents =
|
|
6651
|
+
const documents = chunkXSUOEJB3_cjs.eventWaitingDocuments(event.detail);
|
|
6643
6652
|
result.push({
|
|
6644
6653
|
event,
|
|
6645
|
-
label: documents ?
|
|
6654
|
+
label: documents ? chunkXSUOEJB3_cjs.waitingForDocumentsText(documents.length) : STEP_LABELS[event.kind],
|
|
6646
6655
|
recipients: []
|
|
6647
6656
|
});
|
|
6648
6657
|
} else if (["artifact_created", "artifact_edited", "document_added", "document_removed"].includes(
|
|
@@ -6655,6 +6664,14 @@ function compactThreadActivity(events) {
|
|
|
6655
6664
|
document_removed: "Removed document"
|
|
6656
6665
|
};
|
|
6657
6666
|
result.push({ event, label: labels[event.kind], recipients: [] });
|
|
6667
|
+
} else if (event.kind === "call") {
|
|
6668
|
+
result.push({
|
|
6669
|
+
event,
|
|
6670
|
+
label: event.detail?.ended_at ? "Call" : "Call started",
|
|
6671
|
+
recipients: []
|
|
6672
|
+
});
|
|
6673
|
+
} else if (event.kind === "recording") {
|
|
6674
|
+
result.push({ event, label: "Recording", recipients: [] });
|
|
6658
6675
|
} else if ([
|
|
6659
6676
|
"created",
|
|
6660
6677
|
"participant_joined",
|
|
@@ -7005,7 +7022,7 @@ var DEFAULT_TASK_COMPOSER_LABELS = {
|
|
|
7005
7022
|
runAt: "Start at",
|
|
7006
7023
|
runAtPast: "Pick a time in the future.",
|
|
7007
7024
|
event: "Event",
|
|
7008
|
-
eventPlaceholder: "
|
|
7025
|
+
eventPlaceholder: "mention",
|
|
7009
7026
|
eventHint: "It starts whenever this kind of notification reaches you.",
|
|
7010
7027
|
afterTask: "After",
|
|
7011
7028
|
afterTaskPlaceholder: "Choose a task\u2026",
|
|
@@ -7041,12 +7058,12 @@ function defaultTaskComposerValues(workflows, initial) {
|
|
|
7041
7058
|
return {
|
|
7042
7059
|
assignee: "me",
|
|
7043
7060
|
workflowId,
|
|
7044
|
-
inputs: workflow ? { ...
|
|
7061
|
+
inputs: workflow ? { ...chunkXSUOEJB3_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
|
|
7045
7062
|
when: "manual",
|
|
7046
7063
|
runAt: "",
|
|
7047
7064
|
rrule: "",
|
|
7048
7065
|
timezone: "UTC",
|
|
7049
|
-
eventKind: "
|
|
7066
|
+
eventKind: "mention",
|
|
7050
7067
|
afterTaskId: "",
|
|
7051
7068
|
parentTaskId: "",
|
|
7052
7069
|
shared: false,
|
|
@@ -7150,7 +7167,7 @@ function WorkflowComposer({
|
|
|
7150
7167
|
return !docs?.length;
|
|
7151
7168
|
})
|
|
7152
7169
|
);
|
|
7153
|
-
const whatMissing = !workflow || Object.keys(
|
|
7170
|
+
const whatMissing = !workflow || Object.keys(chunkXSUOEJB3_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
|
|
7154
7171
|
const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
|
|
7155
7172
|
const whenMissing = missingWhen(values, runAtPast);
|
|
7156
7173
|
const scheduled = values.when !== "now" && values.when !== "manual";
|
|
@@ -7162,7 +7179,7 @@ function WorkflowComposer({
|
|
|
7162
7179
|
setValues({
|
|
7163
7180
|
...values,
|
|
7164
7181
|
workflowId: next,
|
|
7165
|
-
inputs: def ?
|
|
7182
|
+
inputs: def ? chunkXSUOEJB3_cjs.defaultInputs(def) : {},
|
|
7166
7183
|
...def?.documentAction ? { access: "standing" } : {}
|
|
7167
7184
|
});
|
|
7168
7185
|
};
|
|
@@ -7290,7 +7307,7 @@ function WorkflowComposer({
|
|
|
7290
7307
|
},
|
|
7291
7308
|
"data-testid": `${id}-dropzone`,
|
|
7292
7309
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7293
|
-
|
|
7310
|
+
chunkZV3BKLFY_cjs.AddFilesFirst,
|
|
7294
7311
|
{
|
|
7295
7312
|
reason: l.addFilesReason,
|
|
7296
7313
|
action: addFilesAction,
|
|
@@ -7300,7 +7317,7 @@ function WorkflowComposer({
|
|
|
7300
7317
|
}
|
|
7301
7318
|
),
|
|
7302
7319
|
!noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7303
|
-
|
|
7320
|
+
chunkXSUOEJB3_cjs.SchemaForm,
|
|
7304
7321
|
{
|
|
7305
7322
|
fields,
|
|
7306
7323
|
values: values.inputs,
|
|
@@ -7739,7 +7756,7 @@ function WorkTaskComposer({
|
|
|
7739
7756
|
}, [open]);
|
|
7740
7757
|
const workflow = workflows.find((w) => w.id === values.workflowId);
|
|
7741
7758
|
const fields = workflow?.inputs ?? [];
|
|
7742
|
-
const errors = workflow ?
|
|
7759
|
+
const errors = workflow ? chunkXSUOEJB3_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
|
|
7743
7760
|
const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
|
|
7744
7761
|
const unattended = hasWork && values.when !== "now" && values.when !== "manual";
|
|
7745
7762
|
const canConfigure = !isEdit || seed.assignee === "agent";
|
|
@@ -7747,7 +7764,7 @@ function WorkTaskComposer({
|
|
|
7747
7764
|
const set = (key, value) => setValues({ ...values, [key]: value });
|
|
7748
7765
|
const pickWorkflow = (id2) => {
|
|
7749
7766
|
const next = workflows.find((w) => w.id === id2);
|
|
7750
|
-
setValues({ ...values, workflowId: id2, inputs: next ?
|
|
7767
|
+
setValues({ ...values, workflowId: id2, inputs: next ? chunkXSUOEJB3_cjs.defaultInputs(next) : {} });
|
|
7751
7768
|
};
|
|
7752
7769
|
const openConfigure = () => {
|
|
7753
7770
|
setConfigOpen(true);
|
|
@@ -7933,7 +7950,7 @@ function WorkTaskComposer({
|
|
|
7933
7950
|
)
|
|
7934
7951
|
] }),
|
|
7935
7952
|
workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7936
|
-
|
|
7953
|
+
chunkXSUOEJB3_cjs.SchemaForm,
|
|
7937
7954
|
{
|
|
7938
7955
|
fields,
|
|
7939
7956
|
values: values.inputs,
|
|
@@ -10114,5 +10131,5 @@ exports.workflowToComposerValues = workflowToComposerValues;
|
|
|
10114
10131
|
exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
|
|
10115
10132
|
exports.workflowTriggerType = workflowTriggerType;
|
|
10116
10133
|
exports.workflowWhen = workflowWhen;
|
|
10117
|
-
//# sourceMappingURL=chunk-
|
|
10118
|
-
//# sourceMappingURL=chunk-
|
|
10134
|
+
//# sourceMappingURL=chunk-FXUQZFAN.cjs.map
|
|
10135
|
+
//# sourceMappingURL=chunk-FXUQZFAN.cjs.map
|