@arbidocs/blocks 0.4.137 → 0.4.138
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 +380 -356
- package/dist/agents/index.js +8 -8
- package/dist/agents/skills/SkillLibraryDetail.d.ts +26 -0
- package/dist/agents/skills/index.d.ts +2 -0
- package/dist/agents/skills/skillLibrary.d.ts +46 -0
- package/dist/chat/index.cjs +139 -139
- package/dist/chat/index.js +4 -4
- package/dist/{chunk-CHVCTKF4.cjs → chunk-3BI6EWKP.cjs} +672 -55
- package/dist/chunk-3BI6EWKP.cjs.map +1 -0
- package/dist/{chunk-VMESMX7N.js → chunk-5BXEYYH6.js} +3 -3
- package/dist/{chunk-VMESMX7N.js.map → chunk-5BXEYYH6.js.map} +1 -1
- package/dist/{chunk-EHOPZBAX.cjs → chunk-7YLJHTDC.cjs} +11 -11
- package/dist/{chunk-EHOPZBAX.cjs.map → chunk-7YLJHTDC.cjs.map} +1 -1
- package/dist/{chunk-M33QUNFH.js → chunk-ED4HHTIA.js} +3 -3
- package/dist/{chunk-M33QUNFH.js.map → chunk-ED4HHTIA.js.map} +1 -1
- package/dist/{chunk-HDYWXEQU.cjs → chunk-IE5CUCZK.cjs} +4 -4
- package/dist/{chunk-HDYWXEQU.cjs.map → chunk-IE5CUCZK.cjs.map} +1 -1
- package/dist/{chunk-7M4C6CK7.js → chunk-JO3EMZ4X.js} +3 -3
- package/dist/{chunk-7M4C6CK7.js.map → chunk-JO3EMZ4X.js.map} +1 -1
- package/dist/{chunk-C3ZRLULA.cjs → chunk-JVL7HUIQ.cjs} +5 -5
- package/dist/{chunk-C3ZRLULA.cjs.map → chunk-JVL7HUIQ.cjs.map} +1 -1
- package/dist/{chunk-JY73DJOS.cjs → chunk-MJKBVIV3.cjs} +80 -495
- package/dist/{chunk-KMNZ2RVO.js.map → chunk-MJKBVIV3.cjs.map} +1 -1
- package/dist/{chunk-BUNZWOPX.cjs → chunk-OAL3B2ZU.cjs} +5 -5
- package/dist/{chunk-BUNZWOPX.cjs.map → chunk-OAL3B2ZU.cjs.map} +1 -1
- package/dist/{chunk-6F7SZCVL.cjs → chunk-OWCEQKAR.cjs} +3 -3
- package/dist/{chunk-6F7SZCVL.cjs.map → chunk-OWCEQKAR.cjs.map} +1 -1
- package/dist/{chunk-KMNZ2RVO.js → chunk-UBEI6WFJ.js} +10 -411
- package/dist/{chunk-JY73DJOS.cjs.map → chunk-UBEI6WFJ.js.map} +1 -1
- package/dist/{chunk-ATJUVHVB.js → chunk-XVME4XYD.js} +604 -8
- package/dist/chunk-XVME4XYD.js.map +1 -0
- package/dist/{chunk-YOMPLCP6.js → chunk-Y5KTM3V5.js} +3 -3
- package/dist/{chunk-YOMPLCP6.js.map → chunk-Y5KTM3V5.js.map} +1 -1
- package/dist/{chunk-L3T7OJRX.js → chunk-ZNI4SW2G.js} +3 -3
- package/dist/{chunk-L3T7OJRX.js.map → chunk-ZNI4SW2G.js.map} +1 -1
- package/dist/collaboration/index.cjs +9 -9
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/index.cjs +436 -54
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +1 -0
- package/dist/connect/index.js +399 -18
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedSkillsLibrary.d.ts +26 -0
- package/dist/document-tools/index.cjs +1 -1
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/index.cjs +2 -2
- package/dist/facts/index.js +2 -2
- package/dist/index.cjs +650 -626
- package/dist/index.js +15 -15
- package/dist/settings/index.cjs +10 -10
- package/dist/settings/index.js +2 -2
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +6 -6
- package/dist/studio/index.js +5 -5
- package/dist/workflow-canvas/index.cjs +59 -59
- package/dist/workflow-canvas/index.js +8 -8
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-ATJUVHVB.js.map +0 -1
- package/dist/chunk-CHVCTKF4.cjs.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
5
4
|
var chunkRFIBUWLF_cjs = require('./chunk-RFIBUWLF.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunk3BI6EWKP_cjs = require('./chunk-3BI6EWKP.cjs');
|
|
6
|
+
var chunkWS5EX7DN_cjs = require('./chunk-WS5EX7DN.cjs');
|
|
8
7
|
var chunkRQ2Y7USX_cjs = require('./chunk-RQ2Y7USX.cjs');
|
|
9
8
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
10
|
-
var
|
|
9
|
+
var chunk3AFWGEDJ_cjs = require('./chunk-3AFWGEDJ.cjs');
|
|
10
|
+
var chunkDVUZTGVL_cjs = require('./chunk-DVUZTGVL.cjs');
|
|
11
11
|
var chunkR26BK7YL_cjs = require('./chunk-R26BK7YL.cjs');
|
|
12
12
|
var chunkV4ISCZJ7_cjs = require('./chunk-V4ISCZJ7.cjs');
|
|
13
13
|
var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
|
|
14
14
|
var chunkC2CWWEHO_cjs = require('./chunk-C2CWWEHO.cjs');
|
|
15
15
|
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkOWCEQKAR_cjs = require('./chunk-OWCEQKAR.cjs');
|
|
17
17
|
var chunk7UTB4PHM_cjs = require('./chunk-7UTB4PHM.cjs');
|
|
18
18
|
var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
|
|
19
19
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
@@ -48,14 +48,14 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
|
|
|
48
48
|
for (const field of workflow.inputs) {
|
|
49
49
|
if (field.type !== "scope") continue;
|
|
50
50
|
const raw = inputs[field.name];
|
|
51
|
-
const scope =
|
|
51
|
+
const scope = chunkOWCEQKAR_cjs.isWorkflowScope(raw) ? raw : { folders: [], labels: [] };
|
|
52
52
|
next[field.name] = { ...scope, documents: scopeSource.resolveDocuments(scope) };
|
|
53
53
|
}
|
|
54
54
|
return next;
|
|
55
55
|
}
|
|
56
56
|
function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
|
|
57
|
-
const steps =
|
|
58
|
-
const [inputs, setInputs] = react.useState(() =>
|
|
57
|
+
const steps = chunkOWCEQKAR_cjs.workflowSteps(workflow);
|
|
58
|
+
const [inputs, setInputs] = react.useState(() => chunkOWCEQKAR_cjs.initialRunInputs(workflow));
|
|
59
59
|
const [states, setStates] = react.useState({});
|
|
60
60
|
const set = (id, state) => setStates((s) => ({ ...s, [id]: state }));
|
|
61
61
|
const timers = react.useRef(/* @__PURE__ */ new Map());
|
|
@@ -77,10 +77,10 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
77
77
|
react.useEffect(() => {
|
|
78
78
|
if (Object.values(states).some((s) => s.status === "running")) return;
|
|
79
79
|
const next = steps.find(
|
|
80
|
-
(s) => (s.kind === "agent" || s.kind === "action") &&
|
|
80
|
+
(s) => (s.kind === "agent" || s.kind === "action") && chunkOWCEQKAR_cjs.stepPhase(steps, states, s.id) === "ready"
|
|
81
81
|
);
|
|
82
82
|
if (!next || next.kind !== "agent" && next.kind !== "action") return;
|
|
83
|
-
const prompt = next.kind === "agent" ?
|
|
83
|
+
const prompt = next.kind === "agent" ? chunkOWCEQKAR_cjs.composeStepPrompt(workflow, next, inputs, { resolveWorkflow, compose }) : "";
|
|
84
84
|
set(next.id, { status: "running", startedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
85
85
|
timers.current.set(
|
|
86
86
|
next.id,
|
|
@@ -93,7 +93,7 @@ function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, reso
|
|
|
93
93
|
}, delayMs)
|
|
94
94
|
);
|
|
95
95
|
}, [states, steps, workflow]);
|
|
96
|
-
return
|
|
96
|
+
return chunk3BI6EWKP_cjs.useWorkflowView({
|
|
97
97
|
steps,
|
|
98
98
|
states,
|
|
99
99
|
inputs,
|
|
@@ -581,7 +581,7 @@ function AgentCreator({
|
|
|
581
581
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
582
582
|
[open]
|
|
583
583
|
);
|
|
584
|
-
const [values, setValues] =
|
|
584
|
+
const [values, setValues] = chunk3BI6EWKP_cjs.useControllableState(
|
|
585
585
|
valuesProp,
|
|
586
586
|
seed,
|
|
587
587
|
onValuesChange
|
|
@@ -868,79 +868,6 @@ function agentConfigSectionToValues(section, capabilityKeys) {
|
|
|
868
868
|
capabilities: Object.fromEntries(capabilityKeys.map((k) => [k, Boolean(s[k])]))
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
|
-
function SkillTypeBadge({ type, className }) {
|
|
872
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
873
|
-
"span",
|
|
874
|
-
{
|
|
875
|
-
className: ui.cn(
|
|
876
|
-
"shrink-0 rounded bg-background px-1.5 py-0.5 text-xs uppercase tracking-wide text-muted-foreground",
|
|
877
|
-
className
|
|
878
|
-
),
|
|
879
|
-
"data-slot": "skill-type-badge",
|
|
880
|
-
children: type
|
|
881
|
-
}
|
|
882
|
-
);
|
|
883
|
-
}
|
|
884
|
-
var DEFAULT_SKILL_GLOBAL_BADGE_LABELS = {
|
|
885
|
-
global: "Global",
|
|
886
|
-
globalTitle: "Shared with everyone in the marketplace"
|
|
887
|
-
};
|
|
888
|
-
function SkillGlobalBadge({
|
|
889
|
-
className,
|
|
890
|
-
labels
|
|
891
|
-
}) {
|
|
892
|
-
const l = { ...DEFAULT_SKILL_GLOBAL_BADGE_LABELS, ...labels };
|
|
893
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
894
|
-
"span",
|
|
895
|
-
{
|
|
896
|
-
className: ui.cn(
|
|
897
|
-
"inline-flex shrink-0 items-center gap-1 rounded bg-accent px-1.5 py-0.5 text-xs uppercase tracking-wide text-accent-foreground",
|
|
898
|
-
className
|
|
899
|
-
),
|
|
900
|
-
title: l.globalTitle,
|
|
901
|
-
"data-slot": "skill-global-badge",
|
|
902
|
-
children: [
|
|
903
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "size-3" }),
|
|
904
|
-
l.global
|
|
905
|
-
]
|
|
906
|
-
}
|
|
907
|
-
);
|
|
908
|
-
}
|
|
909
|
-
function SkillActionButton({
|
|
910
|
-
label,
|
|
911
|
-
tooltip,
|
|
912
|
-
onClick,
|
|
913
|
-
children,
|
|
914
|
-
testId
|
|
915
|
-
}) {
|
|
916
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
917
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, onFocusCapture: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
918
|
-
ui.Button,
|
|
919
|
-
{
|
|
920
|
-
variant: "ghost",
|
|
921
|
-
size: "icon",
|
|
922
|
-
className: "size-7 shrink-0 pointer-coarse:size-11",
|
|
923
|
-
onClick: (e) => {
|
|
924
|
-
e.stopPropagation();
|
|
925
|
-
onClick(e);
|
|
926
|
-
},
|
|
927
|
-
"aria-label": label,
|
|
928
|
-
"data-testid": testId,
|
|
929
|
-
children
|
|
930
|
-
}
|
|
931
|
-
) }),
|
|
932
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: tooltip ?? label }) })
|
|
933
|
-
] });
|
|
934
|
-
}
|
|
935
|
-
function activateOnKey(handler) {
|
|
936
|
-
return (e) => {
|
|
937
|
-
if (e.target !== e.currentTarget) return;
|
|
938
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
939
|
-
e.preventDefault();
|
|
940
|
-
handler();
|
|
941
|
-
}
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
871
|
var DEFAULT_SKILL_CARD_LABELS = {
|
|
945
872
|
global: "Global",
|
|
946
873
|
globalTitle: "Shared with everyone in the marketplace",
|
|
@@ -983,7 +910,7 @@ function SkillCard({
|
|
|
983
910
|
className
|
|
984
911
|
),
|
|
985
912
|
onClick,
|
|
986
|
-
onKeyDown: activateOnKey(onClick),
|
|
913
|
+
onKeyDown: chunk3BI6EWKP_cjs.activateOnKey(onClick),
|
|
987
914
|
"data-skill-name": name,
|
|
988
915
|
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId ?? testIds?.root, { testId: "skill-card" }),
|
|
989
916
|
"data-slot": "skill-card",
|
|
@@ -1007,12 +934,12 @@ function SkillCard({
|
|
|
1007
934
|
"/",
|
|
1008
935
|
name
|
|
1009
936
|
] }),
|
|
1010
|
-
type && type !== "markdown" && /* @__PURE__ */ jsxRuntime.jsx(SkillTypeBadge, { type }),
|
|
1011
|
-
isGlobal && /* @__PURE__ */ jsxRuntime.jsx(SkillGlobalBadge, { labels: l }),
|
|
937
|
+
type && type !== "markdown" && /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.SkillTypeBadge, { type }),
|
|
938
|
+
isGlobal && /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.SkillGlobalBadge, { labels: l }),
|
|
1012
939
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 text-sm text-muted-foreground max-sm:order-last max-sm:w-full max-sm:line-clamp-2 sm:flex-1 sm:truncate", children: description }),
|
|
1013
940
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto flex shrink-0 items-center gap-1", "data-slot": "skill-card-actions", children: [
|
|
1014
941
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1015
|
-
SkillActionButton,
|
|
942
|
+
chunk3BI6EWKP_cjs.SkillActionButton,
|
|
1016
943
|
{
|
|
1017
944
|
label: l.preview,
|
|
1018
945
|
onClick: onPreview,
|
|
@@ -1021,7 +948,7 @@ function SkillCard({
|
|
|
1021
948
|
}
|
|
1022
949
|
),
|
|
1023
950
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1024
|
-
SkillActionButton,
|
|
951
|
+
chunk3BI6EWKP_cjs.SkillActionButton,
|
|
1025
952
|
{
|
|
1026
953
|
label: l.edit,
|
|
1027
954
|
onClick: onEdit,
|
|
@@ -1030,7 +957,7 @@ function SkillCard({
|
|
|
1030
957
|
}
|
|
1031
958
|
),
|
|
1032
959
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1033
|
-
SkillActionButton,
|
|
960
|
+
chunk3BI6EWKP_cjs.SkillActionButton,
|
|
1034
961
|
{
|
|
1035
962
|
label: l.export,
|
|
1036
963
|
onClick: onExport,
|
|
@@ -1039,7 +966,7 @@ function SkillCard({
|
|
|
1039
966
|
}
|
|
1040
967
|
),
|
|
1041
968
|
isOwner && onToggleVisibility && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1042
|
-
SkillActionButton,
|
|
969
|
+
chunk3BI6EWKP_cjs.SkillActionButton,
|
|
1043
970
|
{
|
|
1044
971
|
label: isGlobal ? l.makePrivate : l.publish,
|
|
1045
972
|
tooltip: isGlobal ? l.makePrivateTooltip : l.publish,
|
|
@@ -1094,7 +1021,7 @@ function SkillRow({
|
|
|
1094
1021
|
className
|
|
1095
1022
|
),
|
|
1096
1023
|
onClick: onInvoke,
|
|
1097
|
-
onKeyDown: activateOnKey(onInvoke),
|
|
1024
|
+
onKeyDown: chunk3BI6EWKP_cjs.activateOnKey(onInvoke),
|
|
1098
1025
|
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId, { testId: `skills-panel-row-${name}` }),
|
|
1099
1026
|
"data-slot": "skill-row",
|
|
1100
1027
|
title: l.insertTitle(name),
|
|
@@ -1112,356 +1039,28 @@ function SkillRow({
|
|
|
1112
1039
|
"/",
|
|
1113
1040
|
name
|
|
1114
1041
|
] }),
|
|
1115
|
-
type && type !== "markdown" && /* @__PURE__ */ jsxRuntime.jsx(SkillTypeBadge, { type }),
|
|
1116
|
-
isGlobal && /* @__PURE__ */ jsxRuntime.jsx(SkillGlobalBadge, { labels: l })
|
|
1042
|
+
type && type !== "markdown" && /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.SkillTypeBadge, { type }),
|
|
1043
|
+
isGlobal && /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.SkillGlobalBadge, { labels: l })
|
|
1117
1044
|
] }),
|
|
1118
1045
|
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-xs text-muted-foreground", children: description })
|
|
1119
1046
|
] }),
|
|
1120
1047
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-0.5", children: [
|
|
1121
|
-
/* @__PURE__ */ jsxRuntime.jsx(SkillActionButton, { label: l.preview, onClick: () => onPreview(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "size-4" }) }),
|
|
1122
|
-
onEdit && /* @__PURE__ */ jsxRuntime.jsx(SkillActionButton, { label: l.edit, onClick: () => onEdit(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-4" }) }),
|
|
1048
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.SkillActionButton, { label: l.preview, onClick: () => onPreview(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "size-4" }) }),
|
|
1049
|
+
onEdit && /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.SkillActionButton, { label: l.edit, onClick: () => onEdit(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-4" }) }),
|
|
1123
1050
|
onTogglePublish && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1124
|
-
SkillActionButton,
|
|
1051
|
+
chunk3BI6EWKP_cjs.SkillActionButton,
|
|
1125
1052
|
{
|
|
1126
1053
|
label: isGlobal ? l.makePrivate : l.publish,
|
|
1127
1054
|
onClick: () => onTogglePublish(),
|
|
1128
1055
|
children: isGlobal ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "size-4 text-primary" })
|
|
1129
1056
|
}
|
|
1130
1057
|
),
|
|
1131
|
-
onDelete && /* @__PURE__ */ jsxRuntime.jsx(SkillActionButton, { label: l.delete, onClick: () => onDelete(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "size-4 text-destructive" }) })
|
|
1058
|
+
onDelete && /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.SkillActionButton, { label: l.delete, onClick: () => onDelete(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "size-4 text-destructive" }) })
|
|
1132
1059
|
] })
|
|
1133
1060
|
]
|
|
1134
1061
|
}
|
|
1135
1062
|
);
|
|
1136
1063
|
}
|
|
1137
|
-
var DEFAULT_SKILL_GENERATE_FORM_LABELS = {
|
|
1138
|
-
title: "Generate with AI",
|
|
1139
|
-
hint: "Describe what the skill should do. The assistant drafts it in chat, then you can edit it here.",
|
|
1140
|
-
placeholder: "e.g. Summarize a contract into key obligations, dates, and parties",
|
|
1141
|
-
generate: "Generate with AI",
|
|
1142
|
-
writeManually: "\u2026or write it manually"
|
|
1143
|
-
};
|
|
1144
|
-
function SkillGenerateForm({
|
|
1145
|
-
onGenerate,
|
|
1146
|
-
onManual,
|
|
1147
|
-
icon,
|
|
1148
|
-
labels,
|
|
1149
|
-
testIds
|
|
1150
|
-
}) {
|
|
1151
|
-
const l = { ...DEFAULT_SKILL_GENERATE_FORM_LABELS, ...labels };
|
|
1152
|
-
const [desc, setDesc] = react.useState("");
|
|
1153
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4", "data-slot": "skill-generate-form", children: [
|
|
1154
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg bg-muted p-4", children: [
|
|
1155
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
|
|
1156
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wand2, { className: "size-4 text-primary" }),
|
|
1157
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: l.title })
|
|
1158
|
-
] }),
|
|
1159
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs text-muted-foreground", children: l.hint }),
|
|
1160
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1161
|
-
ui.Textarea,
|
|
1162
|
-
{
|
|
1163
|
-
value: desc,
|
|
1164
|
-
onChange: (e) => setDesc(e.target.value),
|
|
1165
|
-
rows: 4,
|
|
1166
|
-
placeholder: l.placeholder,
|
|
1167
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.description, { testId: "skills-panel-ai-desc" })
|
|
1168
|
-
}
|
|
1169
|
-
),
|
|
1170
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1171
|
-
ui.Button,
|
|
1172
|
-
{
|
|
1173
|
-
size: "sm",
|
|
1174
|
-
disabled: !desc.trim(),
|
|
1175
|
-
onClick: () => onGenerate(desc.trim()),
|
|
1176
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.generate, { testId: "skills-panel-ai-generate" }),
|
|
1177
|
-
children: [
|
|
1178
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1 [&>svg]:size-4", children: icon }),
|
|
1179
|
-
l.generate
|
|
1180
|
-
]
|
|
1181
|
-
}
|
|
1182
|
-
) })
|
|
1183
|
-
] }),
|
|
1184
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1185
|
-
"button",
|
|
1186
|
-
{
|
|
1187
|
-
type: "button",
|
|
1188
|
-
className: "self-start text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline pointer-coarse:min-h-11",
|
|
1189
|
-
onClick: onManual,
|
|
1190
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.writeManually, { testId: "skills-panel-write-manually" }),
|
|
1191
|
-
children: l.writeManually
|
|
1192
|
-
}
|
|
1193
|
-
)
|
|
1194
|
-
] });
|
|
1195
|
-
}
|
|
1196
|
-
var DEFAULT_SKILL_EDIT_FORM_LABELS = {
|
|
1197
|
-
name: "Name",
|
|
1198
|
-
namePlaceholder: "contract-summary",
|
|
1199
|
-
invokedAs: (name) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1200
|
-
"Invoked as ",
|
|
1201
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono", children: [
|
|
1202
|
-
"/",
|
|
1203
|
-
name || "skill-name"
|
|
1204
|
-
] })
|
|
1205
|
-
] }),
|
|
1206
|
-
description: "Description",
|
|
1207
|
-
descriptionPlaceholder: "What it does and when to use it",
|
|
1208
|
-
instructions: "Instructions",
|
|
1209
|
-
cancel: "Cancel",
|
|
1210
|
-
saving: "Saving\u2026",
|
|
1211
|
-
saveChanges: "Save changes",
|
|
1212
|
-
create: "Create skill"
|
|
1213
|
-
};
|
|
1214
|
-
var FIELD_LABEL = "text-xs font-semibold uppercase tracking-wide text-muted-foreground";
|
|
1215
|
-
function SkillEditForm({
|
|
1216
|
-
name,
|
|
1217
|
-
onNameChange,
|
|
1218
|
-
isNameLocked,
|
|
1219
|
-
nameError,
|
|
1220
|
-
description,
|
|
1221
|
-
onDescriptionChange,
|
|
1222
|
-
editor,
|
|
1223
|
-
isSaving,
|
|
1224
|
-
isEditing,
|
|
1225
|
-
onSave,
|
|
1226
|
-
onCancel,
|
|
1227
|
-
labels,
|
|
1228
|
-
testIds
|
|
1229
|
-
}) {
|
|
1230
|
-
const l = { ...DEFAULT_SKILL_EDIT_FORM_LABELS, ...labels };
|
|
1231
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", "data-slot": "skill-edit-form", children: [
|
|
1232
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4", children: [
|
|
1233
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1234
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "sp-name", className: FIELD_LABEL, children: l.name }),
|
|
1235
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1236
|
-
ui.Input,
|
|
1237
|
-
{
|
|
1238
|
-
id: "sp-name",
|
|
1239
|
-
value: name,
|
|
1240
|
-
disabled: isNameLocked,
|
|
1241
|
-
placeholder: l.namePlaceholder,
|
|
1242
|
-
onChange: (e) => onNameChange(e.target.value),
|
|
1243
|
-
className: "mt-1",
|
|
1244
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.name, { testId: "skills-panel-edit-name" })
|
|
1245
|
-
}
|
|
1246
|
-
),
|
|
1247
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: l.invokedAs(name) }),
|
|
1248
|
-
nameError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: nameError })
|
|
1249
|
-
] }),
|
|
1250
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1251
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "sp-desc", className: FIELD_LABEL, children: l.description }),
|
|
1252
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1253
|
-
ui.Input,
|
|
1254
|
-
{
|
|
1255
|
-
id: "sp-desc",
|
|
1256
|
-
value: description,
|
|
1257
|
-
placeholder: l.descriptionPlaceholder,
|
|
1258
|
-
onChange: (e) => onDescriptionChange(e.target.value),
|
|
1259
|
-
className: "mt-1",
|
|
1260
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.description, { testId: "skills-panel-edit-desc" })
|
|
1261
|
-
}
|
|
1262
|
-
)
|
|
1263
|
-
] }),
|
|
1264
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
1265
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: `${FIELD_LABEL} mb-1`, children: l.instructions }),
|
|
1266
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[240px] flex-1 overflow-hidden rounded-md border border-border", children: editor })
|
|
1267
|
-
] })
|
|
1268
|
-
] }),
|
|
1269
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col-reverse sm:flex-row sm:justify-end gap-2 border-t border-border px-4 py-3", children: [
|
|
1270
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", size: "sm", onClick: onCancel, children: l.cancel }),
|
|
1271
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1272
|
-
ui.Button,
|
|
1273
|
-
{
|
|
1274
|
-
size: "sm",
|
|
1275
|
-
onClick: onSave,
|
|
1276
|
-
disabled: isSaving,
|
|
1277
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.save, { testId: "skills-panel-edit-save" }),
|
|
1278
|
-
children: isSaving ? l.saving : isEditing ? l.saveChanges : l.create
|
|
1279
|
-
}
|
|
1280
|
-
)
|
|
1281
|
-
] })
|
|
1282
|
-
] });
|
|
1283
|
-
}
|
|
1284
|
-
function SkillFilterChips({
|
|
1285
|
-
options,
|
|
1286
|
-
value,
|
|
1287
|
-
onChange,
|
|
1288
|
-
label,
|
|
1289
|
-
testIdPrefix = "skills-filter",
|
|
1290
|
-
className
|
|
1291
|
-
}) {
|
|
1292
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1293
|
-
"div",
|
|
1294
|
-
{
|
|
1295
|
-
role: "radiogroup",
|
|
1296
|
-
"aria-label": label,
|
|
1297
|
-
className: ui.cn("flex flex-wrap gap-2", className),
|
|
1298
|
-
"data-slot": "skill-filter-chips",
|
|
1299
|
-
children: options.map((option) => {
|
|
1300
|
-
const selected = option.id === value;
|
|
1301
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1302
|
-
"button",
|
|
1303
|
-
{
|
|
1304
|
-
type: "button",
|
|
1305
|
-
role: "radio",
|
|
1306
|
-
"aria-checked": selected,
|
|
1307
|
-
onClick: () => onChange(option.id),
|
|
1308
|
-
"data-testid": `${testIdPrefix}-${option.id}`,
|
|
1309
|
-
className: ui.cn(
|
|
1310
|
-
"inline-flex min-h-8 items-center gap-1.5 rounded-full border px-3 text-sm transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1311
|
-
selected ? "border-primary bg-primary/10 text-foreground" : "border-border bg-background text-muted-foreground [&:hover]:bg-muted"
|
|
1312
|
-
),
|
|
1313
|
-
children: [
|
|
1314
|
-
option.label,
|
|
1315
|
-
option.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: option.count })
|
|
1316
|
-
]
|
|
1317
|
-
},
|
|
1318
|
-
option.id
|
|
1319
|
-
);
|
|
1320
|
-
})
|
|
1321
|
-
}
|
|
1322
|
-
);
|
|
1323
|
-
}
|
|
1324
|
-
var DEFAULT_SKILL_VIEW_TOGGLE_LABELS = {
|
|
1325
|
-
group: "View",
|
|
1326
|
-
gallery: "Gallery",
|
|
1327
|
-
list: "List"
|
|
1328
|
-
};
|
|
1329
|
-
function SkillViewToggle({ value, onChange, labels, testId }) {
|
|
1330
|
-
const l = { ...DEFAULT_SKILL_VIEW_TOGGLE_LABELS, ...labels };
|
|
1331
|
-
const item = (view, label, icon) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1332
|
-
"button",
|
|
1333
|
-
{
|
|
1334
|
-
type: "button",
|
|
1335
|
-
role: "radio",
|
|
1336
|
-
"aria-checked": value === view,
|
|
1337
|
-
"aria-label": label,
|
|
1338
|
-
title: label,
|
|
1339
|
-
onClick: () => onChange(view),
|
|
1340
|
-
"data-testid": `${testId ?? "skills-view-toggle"}-${view}`,
|
|
1341
|
-
className: ui.cn(
|
|
1342
|
-
"flex size-8 items-center justify-center rounded-md pointer-coarse:size-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1343
|
-
value === view ? "bg-background text-foreground shadow-sm" : "text-muted-foreground"
|
|
1344
|
-
),
|
|
1345
|
-
children: icon
|
|
1346
|
-
}
|
|
1347
|
-
);
|
|
1348
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1349
|
-
"div",
|
|
1350
|
-
{
|
|
1351
|
-
role: "radiogroup",
|
|
1352
|
-
"aria-label": l.group,
|
|
1353
|
-
className: "inline-flex shrink-0 gap-0.5 rounded-lg bg-muted p-0.5",
|
|
1354
|
-
"data-testid": testId ?? "skills-view-toggle",
|
|
1355
|
-
children: [
|
|
1356
|
-
item("gallery", l.gallery, /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { className: "size-4" })),
|
|
1357
|
-
item("list", l.list, /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "size-4" }))
|
|
1358
|
-
]
|
|
1359
|
-
}
|
|
1360
|
-
);
|
|
1361
|
-
}
|
|
1362
|
-
function SkillTile({
|
|
1363
|
-
name,
|
|
1364
|
-
description,
|
|
1365
|
-
sourceLabel,
|
|
1366
|
-
type,
|
|
1367
|
-
icon,
|
|
1368
|
-
layout,
|
|
1369
|
-
selected,
|
|
1370
|
-
onSelect,
|
|
1371
|
-
testId
|
|
1372
|
-
}) {
|
|
1373
|
-
const isRow = layout === "list";
|
|
1374
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1375
|
-
"div",
|
|
1376
|
-
{
|
|
1377
|
-
role: "button",
|
|
1378
|
-
tabIndex: 0,
|
|
1379
|
-
"aria-pressed": selected,
|
|
1380
|
-
onClick: onSelect,
|
|
1381
|
-
onKeyDown: activateOnKey(onSelect),
|
|
1382
|
-
"data-testid": testId ?? `skill-tile-${name}`,
|
|
1383
|
-
"data-skill-name": name,
|
|
1384
|
-
"data-slot": "skill-tile",
|
|
1385
|
-
className: ui.cn(
|
|
1386
|
-
"flex cursor-pointer rounded-lg border p-3 text-left transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1387
|
-
isRow ? "items-center gap-3" : "h-full flex-col gap-2",
|
|
1388
|
-
selected ? "border-primary bg-primary/5" : "border-transparent bg-muted [&:hover]:bg-accent"
|
|
1389
|
-
),
|
|
1390
|
-
children: [
|
|
1391
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1392
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-ai-ink [&>svg]:size-5", children: icon }),
|
|
1393
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-foreground", children: name })
|
|
1394
|
-
] }),
|
|
1395
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1396
|
-
"p",
|
|
1397
|
-
{
|
|
1398
|
-
className: ui.cn(
|
|
1399
|
-
"min-w-0 text-sm text-muted-foreground",
|
|
1400
|
-
isRow ? "flex-1 truncate max-sm:hidden" : "line-clamp-3"
|
|
1401
|
-
),
|
|
1402
|
-
children: description
|
|
1403
|
-
}
|
|
1404
|
-
),
|
|
1405
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("flex shrink-0 items-center gap-1.5", isRow && "ml-auto"), children: [
|
|
1406
|
-
type && type !== "markdown" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs uppercase tracking-wide text-muted-foreground", children: type }),
|
|
1407
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
|
|
1408
|
-
] })
|
|
1409
|
-
]
|
|
1410
|
-
}
|
|
1411
|
-
);
|
|
1412
|
-
}
|
|
1413
|
-
function SkillDetail({
|
|
1414
|
-
title,
|
|
1415
|
-
sourceLabel,
|
|
1416
|
-
description,
|
|
1417
|
-
icon,
|
|
1418
|
-
notice,
|
|
1419
|
-
children,
|
|
1420
|
-
actions,
|
|
1421
|
-
testId
|
|
1422
|
-
}) {
|
|
1423
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1424
|
-
"section",
|
|
1425
|
-
{
|
|
1426
|
-
className: "flex min-h-0 flex-1 flex-col",
|
|
1427
|
-
"data-testid": testId ?? "skill-detail",
|
|
1428
|
-
"data-slot": "skill-detail",
|
|
1429
|
-
"aria-label": title,
|
|
1430
|
-
children: [
|
|
1431
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-0 flex-1 space-y-4 overflow-y-auto p-4", children: [
|
|
1432
|
-
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "space-y-1", children: [
|
|
1433
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1434
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ai-ink [&>svg]:size-5", children: icon }),
|
|
1435
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
1436
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
|
|
1437
|
-
] }),
|
|
1438
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description }),
|
|
1439
|
-
notice && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground", children: notice })
|
|
1440
|
-
] }),
|
|
1441
|
-
children
|
|
1442
|
-
] }),
|
|
1443
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1444
|
-
"div",
|
|
1445
|
-
{
|
|
1446
|
-
className: "flex flex-wrap gap-2 border-t border-border bg-background p-3",
|
|
1447
|
-
"data-slot": "skill-detail-actions",
|
|
1448
|
-
children: actions
|
|
1449
|
-
}
|
|
1450
|
-
)
|
|
1451
|
-
]
|
|
1452
|
-
}
|
|
1453
|
-
);
|
|
1454
|
-
}
|
|
1455
|
-
function SkillDetailSection({
|
|
1456
|
-
title,
|
|
1457
|
-
children,
|
|
1458
|
-
testId
|
|
1459
|
-
}) {
|
|
1460
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", "data-testid": testId, children: [
|
|
1461
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: title }),
|
|
1462
|
-
children
|
|
1463
|
-
] });
|
|
1464
|
-
}
|
|
1465
1064
|
var DEFAULT_TASK_PLAN_LABELS = {
|
|
1466
1065
|
emptyTitle: "Draft a plan to review",
|
|
1467
1066
|
emptyBody: "The assistant writes a short checklist of what its work must cover. You can edit it, and it checks its own draft against it before handing it to you.",
|
|
@@ -2890,7 +2489,7 @@ function TaskTable(props) {
|
|
|
2890
2489
|
isMe: mine
|
|
2891
2490
|
};
|
|
2892
2491
|
};
|
|
2893
|
-
const renderPerson = props.renderPerson ?? ((person) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2492
|
+
const renderPerson = props.renderPerson ?? ((person) => /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.PersonPill, { person }));
|
|
2894
2493
|
const q = (query.trim() || (props.filterText ?? "").trim()).toLowerCase();
|
|
2895
2494
|
const counts = react.useMemo(() => {
|
|
2896
2495
|
const map = new Map(STATUS_ORDER.map((s) => [s, 0]));
|
|
@@ -3504,7 +3103,7 @@ function TaskInbox(p) {
|
|
|
3504
3103
|
else next.add(id);
|
|
3505
3104
|
return next;
|
|
3506
3105
|
});
|
|
3507
|
-
p.renderPerson ?? ((value) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3106
|
+
p.renderPerson ?? ((value) => /* @__PURE__ */ jsxRuntime.jsx(chunk3BI6EWKP_cjs.PersonPill, { person: value }));
|
|
3508
3107
|
const taskById = new Map(all.map((t) => [t.external_id, t]));
|
|
3509
3108
|
const visible = new Set(rows.map((t) => t.external_id));
|
|
3510
3109
|
for (const task of rows) {
|
|
@@ -4202,7 +3801,7 @@ function TaskStartDialog({
|
|
|
4202
3801
|
setSourceOpen(false);
|
|
4203
3802
|
}, [open]);
|
|
4204
3803
|
const textareaRef = react.useRef(null);
|
|
4205
|
-
const mention =
|
|
3804
|
+
const mention = chunkOWCEQKAR_cjs.useMentionAutocomplete({
|
|
4206
3805
|
value: prompt,
|
|
4207
3806
|
onValueChange: setPrompt,
|
|
4208
3807
|
candidates: people,
|
|
@@ -4553,7 +4152,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
4553
4152
|
}
|
|
4554
4153
|
const typed = name?.trim();
|
|
4555
4154
|
if (workflow.options?.agent === false) {
|
|
4556
|
-
const message =
|
|
4155
|
+
const message = chunkOWCEQKAR_cjs.composeWorkflowPrompt(workflow, inputs, context);
|
|
4557
4156
|
return { name: typed || message, prompt: "", skill_ref: null, skill_inputs: null };
|
|
4558
4157
|
}
|
|
4559
4158
|
const derived = typed || deriveWorkflowName(workflow, inputs);
|
|
@@ -4567,7 +4166,7 @@ function workflowTaskFields(workflow, inputs, name, context) {
|
|
|
4567
4166
|
}
|
|
4568
4167
|
return {
|
|
4569
4168
|
name: derived,
|
|
4570
|
-
prompt:
|
|
4169
|
+
prompt: chunkOWCEQKAR_cjs.composeWorkflowPrompt(workflow, inputs, context),
|
|
4571
4170
|
skill_ref: null,
|
|
4572
4171
|
// The files a run is bound to travel in the saved inputs, whatever the template: the server binds
|
|
4573
4172
|
// the run to the ids listed under any input's `documents`.
|
|
@@ -5081,7 +4680,7 @@ function TaskActivityDialog({
|
|
|
5081
4680
|
testId,
|
|
5082
4681
|
...timeline
|
|
5083
4682
|
}) {
|
|
5084
|
-
const l = { ...
|
|
4683
|
+
const l = { ...chunk3BI6EWKP_cjs.DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
|
|
5085
4684
|
const id = chunkMHVNT4J3_cjs.testIdOr(testId, { testId: "task-activity" });
|
|
5086
4685
|
const count = events?.length ?? 0;
|
|
5087
4686
|
const scrollToEnd = react.useCallback(
|
|
@@ -5096,7 +4695,7 @@ function TaskActivityDialog({
|
|
|
5096
4695
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { className: "truncate", children: taskName })
|
|
5097
4696
|
] }),
|
|
5098
4697
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-h-[55dvh] overflow-y-auto pr-1", "data-testid": `${id}-scroll`, children: [
|
|
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(
|
|
4698
|
+
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(chunk3BI6EWKP_cjs.TaskActivityTimeline, { events: events ?? [], labels, testId: id, ...timeline }),
|
|
5100
4699
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollToEnd })
|
|
5101
4700
|
] })
|
|
5102
4701
|
] }) });
|
|
@@ -5134,7 +4733,7 @@ function TaskFlow({
|
|
|
5134
4733
|
},
|
|
5135
4734
|
children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex w-max min-w-full items-center gap-1 py-0.5", children: items.map((item, i) => {
|
|
5136
4735
|
const chip = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5137
|
-
|
|
4736
|
+
chunkOWCEQKAR_cjs.StepChip,
|
|
5138
4737
|
{
|
|
5139
4738
|
kind: "adhoc",
|
|
5140
4739
|
phase: "ready",
|
|
@@ -5188,7 +4787,7 @@ function ThreadActivity({ item, children }) {
|
|
|
5188
4787
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-xl items-center gap-2", children: [
|
|
5189
4788
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link", "data-done": done || void 0 }),
|
|
5190
4789
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5191
|
-
|
|
4790
|
+
chunkOWCEQKAR_cjs.StepChip,
|
|
5192
4791
|
{
|
|
5193
4792
|
inert: true,
|
|
5194
4793
|
kind,
|
|
@@ -5207,7 +4806,7 @@ function ThreadActivity({ item, children }) {
|
|
|
5207
4806
|
}
|
|
5208
4807
|
),
|
|
5209
4808
|
document && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5210
|
-
|
|
4809
|
+
chunkOWCEQKAR_cjs.StepDocumentButton,
|
|
5211
4810
|
{
|
|
5212
4811
|
kind,
|
|
5213
4812
|
name: document.name,
|
|
@@ -5274,7 +4873,7 @@ function ThreadLauncher({
|
|
|
5274
4873
|
const [shared, setShared] = react.useState(false);
|
|
5275
4874
|
const [started, setStarted] = react.useState(null);
|
|
5276
4875
|
const textareaRef = react.useRef(null);
|
|
5277
|
-
const mention =
|
|
4876
|
+
const mention = chunkOWCEQKAR_cjs.useMentionAutocomplete({
|
|
5278
4877
|
value: prompt,
|
|
5279
4878
|
onValueChange: setPrompt,
|
|
5280
4879
|
candidates: people,
|
|
@@ -5471,10 +5070,10 @@ function WorkflowRunStatus({
|
|
|
5471
5070
|
testId = "workflow-run-status"
|
|
5472
5071
|
}) {
|
|
5473
5072
|
const l = { ...DEFAULT_WORKFLOW_RUN_STATUS_LABELS, ...labels };
|
|
5474
|
-
const ordered =
|
|
5475
|
-
const phaseOf = (id) => isLoading ? "blocked" :
|
|
5476
|
-
const finished = !isLoading &&
|
|
5477
|
-
const atId = finished || isLoading ? void 0 :
|
|
5073
|
+
const ordered = chunkOWCEQKAR_cjs.stepLevels(steps).flat();
|
|
5074
|
+
const phaseOf = (id) => isLoading ? "blocked" : chunkOWCEQKAR_cjs.stepPhase(steps, states, id);
|
|
5075
|
+
const finished = !isLoading && chunkOWCEQKAR_cjs.isRunFinished(steps, states);
|
|
5076
|
+
const atId = finished || isLoading ? void 0 : chunk3BI6EWKP_cjs.activeStepId(chunkOWCEQKAR_cjs.stepLevels(steps), phaseOf);
|
|
5478
5077
|
const at = ordered.find((s) => s.id === atId);
|
|
5479
5078
|
const phase = at ? phaseOf(at.id) : "done";
|
|
5480
5079
|
const assignee = at && ["ready", "waiting"].includes(phase) ? assigneeOf?.(at) : void 0;
|
|
@@ -5506,7 +5105,7 @@ function WorkflowRunStatus({
|
|
|
5506
5105
|
"span",
|
|
5507
5106
|
{
|
|
5508
5107
|
className: ui.cn(
|
|
5509
|
-
`wf-kind-${
|
|
5108
|
+
`wf-kind-${chunkOWCEQKAR_cjs.stepKindOf(s)}`,
|
|
5510
5109
|
"h-1.5 w-3 shrink-0 rounded-full",
|
|
5511
5110
|
SEGMENT[phaseOf(s.id)],
|
|
5512
5111
|
s.id === atId && "w-5"
|
|
@@ -5552,7 +5151,7 @@ function groupThreadActivity(steps, items) {
|
|
|
5552
5151
|
continue;
|
|
5553
5152
|
}
|
|
5554
5153
|
if (current === void 0) out.before.push(item);
|
|
5555
|
-
else if (
|
|
5154
|
+
else if (chunkOWCEQKAR_cjs.isRunFinished(steps, states)) out.after.push(item);
|
|
5556
5155
|
else {
|
|
5557
5156
|
const status = states[current]?.status;
|
|
5558
5157
|
const at = status === "done" || status === "skipped" ? steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? ""))?.id ?? current : current;
|
|
@@ -5575,9 +5174,9 @@ var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
|
|
|
5575
5174
|
after: "After",
|
|
5576
5175
|
beforeSteps: "Before the first step",
|
|
5577
5176
|
afterSteps: "After the last step",
|
|
5578
|
-
kinds:
|
|
5579
|
-
documents:
|
|
5580
|
-
record:
|
|
5177
|
+
kinds: chunkOWCEQKAR_cjs.DEFAULT_STEP_KIND_LABELS,
|
|
5178
|
+
documents: chunkOWCEQKAR_cjs.DEFAULT_STEP_DOCUMENT_LABELS,
|
|
5179
|
+
record: chunkOWCEQKAR_cjs.DEFAULT_STEP_RECORD_LABELS
|
|
5581
5180
|
};
|
|
5582
5181
|
function WorkflowThreadStartedBy({
|
|
5583
5182
|
origin,
|
|
@@ -5708,7 +5307,7 @@ function EntriesChip({
|
|
|
5708
5307
|
const latest = items.at(-1);
|
|
5709
5308
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
|
|
5710
5309
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5711
|
-
|
|
5310
|
+
chunkOWCEQKAR_cjs.StepChip,
|
|
5712
5311
|
{
|
|
5713
5312
|
kind,
|
|
5714
5313
|
phase: "ready",
|
|
@@ -5747,23 +5346,23 @@ function WorkflowThreadStrip({
|
|
|
5747
5346
|
className
|
|
5748
5347
|
}) {
|
|
5749
5348
|
const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
|
|
5750
|
-
const barL = { ...
|
|
5349
|
+
const barL = { ...chunk3BI6EWKP_cjs.DEFAULT_STEP_BAR_LABELS, ...barLabels };
|
|
5751
5350
|
const grouped = groupThreadActivity(steps, items);
|
|
5752
5351
|
const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
|
|
5753
5352
|
const link = /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "wf-link wf-kind-start max-w-6", "data-done": true });
|
|
5754
5353
|
const [selected, setSelected] = react.useState(null);
|
|
5755
5354
|
const [open, setOpen] = react.useState(null);
|
|
5756
|
-
const phaseOf = (id) =>
|
|
5355
|
+
const phaseOf = (id) => chunkOWCEQKAR_cjs.stepPhase(steps, states, id);
|
|
5757
5356
|
const iconOf = (step) => step.icon && renderIcon ? renderIcon(step.icon) : void 0;
|
|
5758
5357
|
const glyphOf = (step) => {
|
|
5759
|
-
const KindIcon =
|
|
5358
|
+
const KindIcon = chunkOWCEQKAR_cjs.STEP_KIND_ICONS[chunkOWCEQKAR_cjs.stepKindOf(step)];
|
|
5760
5359
|
return iconOf(step) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {});
|
|
5761
5360
|
};
|
|
5762
5361
|
const waitingOf = (id) => {
|
|
5763
5362
|
const step = steps.find((s) => s.id === id);
|
|
5764
5363
|
const phase = phaseOf(id);
|
|
5765
|
-
const documents =
|
|
5766
|
-
if (documents.length) return
|
|
5364
|
+
const documents = chunkOWCEQKAR_cjs.waitingDocuments(states[id]);
|
|
5365
|
+
if (documents.length) return chunkOWCEQKAR_cjs.waitingForDocumentsText(documents.length);
|
|
5767
5366
|
const name = step && (phase === "ready" || phase === "waiting") ? assigneeOf?.(step) : void 0;
|
|
5768
5367
|
return name ? l.waitingFor.replace("{name}", name) : void 0;
|
|
5769
5368
|
};
|
|
@@ -5773,8 +5372,8 @@ function WorkflowThreadStrip({
|
|
|
5773
5372
|
const assignee = phase === "ready" || phase === "waiting" ? assigneeOf?.(step) : void 0;
|
|
5774
5373
|
const waiting = waitingOf(step.id);
|
|
5775
5374
|
const sentBack = states[step.id]?.sentBack;
|
|
5776
|
-
const kind =
|
|
5777
|
-
const documents =
|
|
5375
|
+
const kind = chunkOWCEQKAR_cjs.stepKindOf(step);
|
|
5376
|
+
const documents = chunkOWCEQKAR_cjs.stepDocuments(steps, states, step.id);
|
|
5778
5377
|
const latestDoc = onOpenDocument ? documents.at(-1) : void 0;
|
|
5779
5378
|
const finished = ["done", "skipped", "failed"].includes(phase);
|
|
5780
5379
|
const chip = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5787,7 +5386,7 @@ function WorkflowThreadStrip({
|
|
|
5787
5386
|
},
|
|
5788
5387
|
children: [
|
|
5789
5388
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5790
|
-
|
|
5389
|
+
chunkOWCEQKAR_cjs.StepChip,
|
|
5791
5390
|
{
|
|
5792
5391
|
kind,
|
|
5793
5392
|
phase,
|
|
@@ -5801,7 +5400,7 @@ function WorkflowThreadStrip({
|
|
|
5801
5400
|
waiting
|
|
5802
5401
|
] })
|
|
5803
5402
|
] }),
|
|
5804
|
-
labelClassName: isCurrent ?
|
|
5403
|
+
labelClassName: isCurrent ? chunk3BI6EWKP_cjs.STEP_LABEL_CURRENT : ui.cn(chunk3BI6EWKP_cjs.STEP_LABEL, chunk3BI6EWKP_cjs.STEP_LABEL_MAX),
|
|
5805
5404
|
className: ui.cn(latestDoc && "rounded-r-none"),
|
|
5806
5405
|
title: waiting ? `${step.title} \xB7 ${waiting}` : step.title,
|
|
5807
5406
|
"data-testid": `workflow-thread-step-${step.id}`,
|
|
@@ -5836,7 +5435,7 @@ function WorkflowThreadStrip({
|
|
|
5836
5435
|
),
|
|
5837
5436
|
sentBack && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-xs text-amber-700 dark:text-amber-300", children: l.sentBack }),
|
|
5838
5437
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5839
|
-
|
|
5438
|
+
chunkOWCEQKAR_cjs.StepDocumentCards,
|
|
5840
5439
|
{
|
|
5841
5440
|
refs: documents,
|
|
5842
5441
|
heading: step.kind === "review" ? phase === "done" ? l.documents.approved : l.documents.toApprove : l.documents.produced,
|
|
@@ -5847,7 +5446,7 @@ function WorkflowThreadStrip({
|
|
|
5847
5446
|
}
|
|
5848
5447
|
),
|
|
5849
5448
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5850
|
-
|
|
5449
|
+
chunkOWCEQKAR_cjs.StepRecord,
|
|
5851
5450
|
{
|
|
5852
5451
|
step,
|
|
5853
5452
|
state: states[step.id],
|
|
@@ -5879,10 +5478,10 @@ function WorkflowThreadStrip({
|
|
|
5879
5478
|
return latestDoc ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center", children: [
|
|
5880
5479
|
chip,
|
|
5881
5480
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5882
|
-
|
|
5481
|
+
chunkOWCEQKAR_cjs.StepDocumentButton,
|
|
5883
5482
|
{
|
|
5884
5483
|
kind,
|
|
5885
|
-
name: nameOfDoc?.(
|
|
5484
|
+
name: nameOfDoc?.(chunkOWCEQKAR_cjs.splitDocRef(latestDoc).id) ?? latestDoc,
|
|
5886
5485
|
onOpen: () => onOpenDocument?.(latestDoc),
|
|
5887
5486
|
testId: `workflow-thread-step-${step.id}-open-document`
|
|
5888
5487
|
}
|
|
@@ -5921,17 +5520,17 @@ function WorkflowThreadStrip({
|
|
|
5921
5520
|
] }),
|
|
5922
5521
|
strays.map((s) => /* @__PURE__ */ jsxRuntime.jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`))
|
|
5923
5522
|
] }) : null;
|
|
5924
|
-
const at = steps.find((s) => s.id === (selected ??
|
|
5925
|
-
const headingPx = (step) => `${l.kinds[
|
|
5523
|
+
const at = steps.find((s) => s.id === (selected ?? chunk3BI6EWKP_cjs.activeStepId(chunkOWCEQKAR_cjs.stepLevels(steps), phaseOf)));
|
|
5524
|
+
const headingPx = (step) => `${l.kinds[chunkOWCEQKAR_cjs.stepKindOf(step)]} \xB7 ${waitingOf(step.id) ?? ""}`.length * 5.6 - step.title.length * 6.5;
|
|
5926
5525
|
const reserve = {
|
|
5927
|
-
always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) =>
|
|
5526
|
+
always: (at ? Math.max(0, headingPx(at)) : 0) + steps.filter((s) => grouped.byStep[s.id]?.length).length * BEADS_PX + (onOpenDocument ? steps.filter((s) => chunkOWCEQKAR_cjs.stepDocuments(steps, states, s.id).length).length * DOC_BUTTON_PX : 0),
|
|
5928
5527
|
leading: leading ? 150 : 0,
|
|
5929
5528
|
trailing: trailing ? 120 : 0
|
|
5930
5529
|
};
|
|
5931
5530
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cn("min-w-0 flex-1", className), "data-testid": "workflow-thread-strip", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5932
|
-
|
|
5531
|
+
chunk3BI6EWKP_cjs.StepBarFrame,
|
|
5933
5532
|
{
|
|
5934
|
-
levels:
|
|
5533
|
+
levels: chunkOWCEQKAR_cjs.stepLevels(steps),
|
|
5935
5534
|
phaseOf,
|
|
5936
5535
|
current: selected,
|
|
5937
5536
|
onSelect: (id) => {
|
|
@@ -5944,7 +5543,7 @@ function WorkflowThreadStrip({
|
|
|
5944
5543
|
trailing,
|
|
5945
5544
|
reservePx: reserve,
|
|
5946
5545
|
icon: glyphOf,
|
|
5947
|
-
kindOf:
|
|
5546
|
+
kindOf: chunkOWCEQKAR_cjs.stepKindOf,
|
|
5948
5547
|
labels: { waitingFor: l.waitingFor, ...barLabels },
|
|
5949
5548
|
tid: (suffix) => `workflow-thread-${suffix}`
|
|
5950
5549
|
}
|
|
@@ -6020,11 +5619,11 @@ function compactThreadActivity(events, stepTitleOf) {
|
|
|
6020
5619
|
const count = Math.max(1, entry.recipients.length);
|
|
6021
5620
|
entry.label = `Notified ${count} ${count === 1 ? "user" : "users"}`;
|
|
6022
5621
|
} else if (STEP_LABELS[event.kind]) {
|
|
6023
|
-
const documents =
|
|
5622
|
+
const documents = chunkOWCEQKAR_cjs.eventWaitingDocuments(event.detail);
|
|
6024
5623
|
const title = typeof event.detail?.step === "string" ? stepTitleOf?.(event.detail.step) : void 0;
|
|
6025
5624
|
result.push({
|
|
6026
5625
|
event,
|
|
6027
|
-
label: documents ?
|
|
5626
|
+
label: documents ? chunkOWCEQKAR_cjs.waitingForDocumentsText(documents.length) : title && STEP_VERBS[event.kind] ? `${title} ${STEP_VERBS[event.kind]}` : STEP_LABELS[event.kind],
|
|
6028
5627
|
recipients: []
|
|
6029
5628
|
});
|
|
6030
5629
|
} else if (["artifact_created", "artifact_edited", "document_added", "document_removed"].includes(
|
|
@@ -6164,7 +5763,7 @@ function TaskRunsDialog({
|
|
|
6164
5763
|
"rounded-full px-2 py-0.5 text-xs font-medium capitalize",
|
|
6165
5764
|
STATUS_STYLE[data.status] ?? "text-muted-foreground"
|
|
6166
5765
|
),
|
|
6167
|
-
children:
|
|
5766
|
+
children: chunk3BI6EWKP_cjs.workflowRunStatusLabel(data.status)
|
|
6168
5767
|
}
|
|
6169
5768
|
)
|
|
6170
5769
|
},
|
|
@@ -6431,7 +6030,7 @@ function defaultTaskComposerValues(workflows, initial) {
|
|
|
6431
6030
|
return {
|
|
6432
6031
|
assignee: "me",
|
|
6433
6032
|
workflowId,
|
|
6434
|
-
inputs: workflow ? { ...
|
|
6033
|
+
inputs: workflow ? { ...chunkOWCEQKAR_cjs.defaultInputs(workflow), ...initial?.inputs } : { ...initial?.inputs },
|
|
6435
6034
|
when: "manual",
|
|
6436
6035
|
runAt: "",
|
|
6437
6036
|
rrule: "",
|
|
@@ -6507,7 +6106,7 @@ function WorkflowComposer({
|
|
|
6507
6106
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6508
6107
|
[workflows, open]
|
|
6509
6108
|
);
|
|
6510
|
-
const [values, setValues] =
|
|
6109
|
+
const [values, setValues] = chunk3BI6EWKP_cjs.useControllableState(
|
|
6511
6110
|
valuesProp,
|
|
6512
6111
|
seed,
|
|
6513
6112
|
onValuesChange
|
|
@@ -6540,7 +6139,7 @@ function WorkflowComposer({
|
|
|
6540
6139
|
return !docs?.length;
|
|
6541
6140
|
})
|
|
6542
6141
|
);
|
|
6543
|
-
const whatMissing = !workflow || Object.keys(
|
|
6142
|
+
const whatMissing = !workflow || Object.keys(chunkOWCEQKAR_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs)).length > 0;
|
|
6544
6143
|
const runAtPast = values.when === "once" && values.runAt !== "" && values.runAt !== initialValues?.runAt && new Date(values.runAt).getTime() <= Date.now();
|
|
6545
6144
|
const whenMissing = missingWhen(values, runAtPast);
|
|
6546
6145
|
const scheduled = values.when !== "now" && values.when !== "manual";
|
|
@@ -6552,7 +6151,7 @@ function WorkflowComposer({
|
|
|
6552
6151
|
setValues({
|
|
6553
6152
|
...values,
|
|
6554
6153
|
workflowId: next,
|
|
6555
|
-
inputs: def ?
|
|
6154
|
+
inputs: def ? chunkOWCEQKAR_cjs.defaultInputs(def) : {},
|
|
6556
6155
|
...def?.documentAction ? { access: "standing" } : {}
|
|
6557
6156
|
});
|
|
6558
6157
|
};
|
|
@@ -6690,7 +6289,7 @@ function WorkflowComposer({
|
|
|
6690
6289
|
}
|
|
6691
6290
|
),
|
|
6692
6291
|
!noFiles && workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6693
|
-
|
|
6292
|
+
chunk3BI6EWKP_cjs.SchemaForm,
|
|
6694
6293
|
{
|
|
6695
6294
|
fields,
|
|
6696
6295
|
values: values.inputs,
|
|
@@ -7115,7 +6714,7 @@ function WorkTaskComposer({
|
|
|
7115
6714
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7116
6715
|
[workflows, open]
|
|
7117
6716
|
);
|
|
7118
|
-
const [values, setValues] =
|
|
6717
|
+
const [values, setValues] = chunk3BI6EWKP_cjs.useControllableState(
|
|
7119
6718
|
valuesProp,
|
|
7120
6719
|
seed,
|
|
7121
6720
|
onValuesChange
|
|
@@ -7129,7 +6728,7 @@ function WorkTaskComposer({
|
|
|
7129
6728
|
}, [open]);
|
|
7130
6729
|
const workflow = workflows.find((w) => w.id === values.workflowId);
|
|
7131
6730
|
const fields = workflow?.inputs ?? [];
|
|
7132
|
-
const errors = workflow ?
|
|
6731
|
+
const errors = workflow ? chunkOWCEQKAR_cjs.validateInputs({ ...workflow, inputs: fields }, values.inputs) : {};
|
|
7133
6732
|
const hasWork = configOpen && Boolean(workflow) && Object.keys(errors).length === 0;
|
|
7134
6733
|
const unattended = hasWork && values.when !== "now" && values.when !== "manual";
|
|
7135
6734
|
const canConfigure = !isEdit || seed.assignee === "agent";
|
|
@@ -7137,7 +6736,7 @@ function WorkTaskComposer({
|
|
|
7137
6736
|
const set = (key, value) => setValues({ ...values, [key]: value });
|
|
7138
6737
|
const pickWorkflow = (id2) => {
|
|
7139
6738
|
const next = workflows.find((w) => w.id === id2);
|
|
7140
|
-
setValues({ ...values, workflowId: id2, inputs: next ?
|
|
6739
|
+
setValues({ ...values, workflowId: id2, inputs: next ? chunkOWCEQKAR_cjs.defaultInputs(next) : {} });
|
|
7141
6740
|
};
|
|
7142
6741
|
const openConfigure = () => {
|
|
7143
6742
|
setConfigOpen(true);
|
|
@@ -7323,7 +6922,7 @@ function WorkTaskComposer({
|
|
|
7323
6922
|
)
|
|
7324
6923
|
] }),
|
|
7325
6924
|
workflow && fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7326
|
-
|
|
6925
|
+
chunk3BI6EWKP_cjs.SchemaForm,
|
|
7327
6926
|
{
|
|
7328
6927
|
fields,
|
|
7329
6928
|
values: values.inputs,
|
|
@@ -9351,11 +8950,7 @@ exports.DEFAULT_PILL_SELECT_LABELS = DEFAULT_PILL_SELECT_LABELS;
|
|
|
9351
8950
|
exports.DEFAULT_RECURRENCE = DEFAULT_RECURRENCE;
|
|
9352
8951
|
exports.DEFAULT_RECURRENCE_BUILDER_LABELS = DEFAULT_RECURRENCE_BUILDER_LABELS;
|
|
9353
8952
|
exports.DEFAULT_SKILL_CARD_LABELS = DEFAULT_SKILL_CARD_LABELS;
|
|
9354
|
-
exports.DEFAULT_SKILL_EDIT_FORM_LABELS = DEFAULT_SKILL_EDIT_FORM_LABELS;
|
|
9355
|
-
exports.DEFAULT_SKILL_GENERATE_FORM_LABELS = DEFAULT_SKILL_GENERATE_FORM_LABELS;
|
|
9356
|
-
exports.DEFAULT_SKILL_GLOBAL_BADGE_LABELS = DEFAULT_SKILL_GLOBAL_BADGE_LABELS;
|
|
9357
8953
|
exports.DEFAULT_SKILL_ROW_LABELS = DEFAULT_SKILL_ROW_LABELS;
|
|
9358
|
-
exports.DEFAULT_SKILL_VIEW_TOGGLE_LABELS = DEFAULT_SKILL_VIEW_TOGGLE_LABELS;
|
|
9359
8954
|
exports.DEFAULT_SUBAGENT_ROSTER_LABELS = DEFAULT_SUBAGENT_ROSTER_LABELS;
|
|
9360
8955
|
exports.DEFAULT_TASKS_CHROME_LABELS = DEFAULT_TASKS_CHROME_LABELS;
|
|
9361
8956
|
exports.DEFAULT_TASK_COMPOSER_LABELS = DEFAULT_TASK_COMPOSER_LABELS;
|
|
@@ -9384,18 +8979,8 @@ exports.RecurrenceBuilder = RecurrenceBuilder;
|
|
|
9384
8979
|
exports.STATUS_LABELS = STATUS_LABELS;
|
|
9385
8980
|
exports.STATUS_ORDER = STATUS_ORDER;
|
|
9386
8981
|
exports.STATUS_TONE = STATUS_TONE;
|
|
9387
|
-
exports.SkillActionButton = SkillActionButton;
|
|
9388
8982
|
exports.SkillCard = SkillCard;
|
|
9389
|
-
exports.SkillDetail = SkillDetail;
|
|
9390
|
-
exports.SkillDetailSection = SkillDetailSection;
|
|
9391
|
-
exports.SkillEditForm = SkillEditForm;
|
|
9392
|
-
exports.SkillFilterChips = SkillFilterChips;
|
|
9393
|
-
exports.SkillGenerateForm = SkillGenerateForm;
|
|
9394
|
-
exports.SkillGlobalBadge = SkillGlobalBadge;
|
|
9395
8983
|
exports.SkillRow = SkillRow;
|
|
9396
|
-
exports.SkillTile = SkillTile;
|
|
9397
|
-
exports.SkillTypeBadge = SkillTypeBadge;
|
|
9398
|
-
exports.SkillViewToggle = SkillViewToggle;
|
|
9399
8984
|
exports.StepDetail = StepDetail;
|
|
9400
8985
|
exports.StepNarration = StepNarration;
|
|
9401
8986
|
exports.StepOutcome = StepOutcome;
|
|
@@ -9489,5 +9074,5 @@ exports.useWorkflowPreview = useWorkflowPreview;
|
|
|
9489
9074
|
exports.workflowTaskFields = workflowTaskFields;
|
|
9490
9075
|
exports.workflowToComposerValues = workflowToComposerValues;
|
|
9491
9076
|
exports.workflowWhen = workflowWhen;
|
|
9492
|
-
//# sourceMappingURL=chunk-
|
|
9493
|
-
//# sourceMappingURL=chunk-
|
|
9077
|
+
//# sourceMappingURL=chunk-MJKBVIV3.cjs.map
|
|
9078
|
+
//# sourceMappingURL=chunk-MJKBVIV3.cjs.map
|