@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,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkWS5EX7DN_cjs = require('./chunk-WS5EX7DN.cjs');
|
|
5
5
|
var chunkRQ2Y7USX_cjs = require('./chunk-RQ2Y7USX.cjs');
|
|
6
6
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkDETZZBG2_cjs = require('./chunk-DETZZBG2.cjs');
|
|
8
8
|
var chunkV4ISCZJ7_cjs = require('./chunk-V4ISCZJ7.cjs');
|
|
9
9
|
var chunk2EI7NCUA_cjs = require('./chunk-2EI7NCUA.cjs');
|
|
10
10
|
var chunkC2CWWEHO_cjs = require('./chunk-C2CWWEHO.cjs');
|
|
11
11
|
var chunk7RGLTF76_cjs = require('./chunk-7RGLTF76.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkOWCEQKAR_cjs = require('./chunk-OWCEQKAR.cjs');
|
|
13
13
|
var chunk32HW2Q33_cjs = require('./chunk-32HW2Q33.cjs');
|
|
14
14
|
var chunkMHVNT4J3_cjs = require('./chunk-MHVNT4J3.cjs');
|
|
15
15
|
var chunkKDG6FER6_cjs = require('./chunk-KDG6FER6.cjs');
|
|
@@ -155,11 +155,11 @@ function FieldControl({
|
|
|
155
155
|
] });
|
|
156
156
|
}
|
|
157
157
|
case "scope": {
|
|
158
|
-
const scope =
|
|
158
|
+
const scope = chunkOWCEQKAR_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [] };
|
|
159
159
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": testId, children: renderScope?.(field, scope, onChange) });
|
|
160
160
|
}
|
|
161
161
|
case "documents": {
|
|
162
|
-
const picked =
|
|
162
|
+
const picked = chunkOWCEQKAR_cjs.isWorkflowScope(value) ? value : { folders: [], labels: [], documents: [] };
|
|
163
163
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": testId, children: renderDocuments?.(field, picked, onChange) });
|
|
164
164
|
}
|
|
165
165
|
case "person":
|
|
@@ -448,7 +448,7 @@ function WorkflowConfigDialog({
|
|
|
448
448
|
}) {
|
|
449
449
|
const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
|
|
450
450
|
const initialKey = JSON.stringify(initialInputs ?? {});
|
|
451
|
-
const seedKey = JSON.stringify({ ...
|
|
451
|
+
const seedKey = JSON.stringify({ ...chunkOWCEQKAR_cjs.defaultInputs(workflow), ...JSON.parse(initialKey) });
|
|
452
452
|
const seed = react.useMemo(() => JSON.parse(seedKey), [seedKey]);
|
|
453
453
|
const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
|
|
454
454
|
const [agentId, setAgentId] = useControllableState(
|
|
@@ -460,7 +460,7 @@ function WorkflowConfigDialog({
|
|
|
460
460
|
if (open && inputsProp === void 0) setInputs(seed);
|
|
461
461
|
}, [open, seed]);
|
|
462
462
|
const setField = (name, value) => setInputs({ ...inputs, [name]: value });
|
|
463
|
-
const errors =
|
|
463
|
+
const errors = chunkOWCEQKAR_cjs.validateInputs(workflow, inputs);
|
|
464
464
|
const valid = Object.keys(errors).length === 0;
|
|
465
465
|
const visibleErrors = Object.fromEntries(
|
|
466
466
|
Object.entries(errors).filter(([, e]) => e !== "required")
|
|
@@ -473,7 +473,7 @@ function WorkflowConfigDialog({
|
|
|
473
473
|
const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
|
|
474
474
|
const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
|
|
475
475
|
const launch = (values) => {
|
|
476
|
-
Promise.resolve(onLaunch(
|
|
476
|
+
Promise.resolve(onLaunch(chunkOWCEQKAR_cjs.buildLaunch(workflow, values, agentId))).catch(() => {
|
|
477
477
|
});
|
|
478
478
|
};
|
|
479
479
|
const submit = () => {
|
|
@@ -643,9 +643,9 @@ function WorkflowLauncher({
|
|
|
643
643
|
};
|
|
644
644
|
const select = (workflow) => {
|
|
645
645
|
if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
|
|
646
|
-
const inputs =
|
|
647
|
-
if (Object.keys(
|
|
648
|
-
Promise.resolve(onLaunch(
|
|
646
|
+
const inputs = chunkOWCEQKAR_cjs.defaultInputs(workflow);
|
|
647
|
+
if (Object.keys(chunkOWCEQKAR_cjs.validateInputs(workflow, inputs)).length === 0) {
|
|
648
|
+
Promise.resolve(onLaunch(chunkOWCEQKAR_cjs.buildLaunch(workflow, inputs, void 0))).catch(() => {
|
|
649
649
|
});
|
|
650
650
|
return;
|
|
651
651
|
}
|
|
@@ -1041,7 +1041,7 @@ function toStepField(f) {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
var compact = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0 && v !== ""));
|
|
1043
1043
|
function placeholders(workflow) {
|
|
1044
|
-
return Object.fromEntries(
|
|
1044
|
+
return Object.fromEntries(chunkOWCEQKAR_cjs.runFields(workflow).map((f) => [f.name, `{{${f.name}}}`]));
|
|
1045
1045
|
}
|
|
1046
1046
|
function agentStep(workflow, step, options) {
|
|
1047
1047
|
const target = step.workflow ? options.resolveWorkflow?.(step.workflow) : void 0;
|
|
@@ -1050,11 +1050,11 @@ function agentStep(workflow, step, options) {
|
|
|
1050
1050
|
([, v]) => v !== void 0 && v !== null && v !== ""
|
|
1051
1051
|
);
|
|
1052
1052
|
const inputs = { ...placeholders(workflow), ...Object.fromEntries(given) };
|
|
1053
|
-
return { skill: null, inputs: null, prompt:
|
|
1053
|
+
return { skill: null, inputs: null, prompt: chunkOWCEQKAR_cjs.composeStepPrompt(workflow, step, inputs, options) };
|
|
1054
1054
|
}
|
|
1055
1055
|
function toPlanSteps(workflow, options = {}) {
|
|
1056
1056
|
const layout = workflow.run.kind === "steps" ? workflow.run.layout : void 0;
|
|
1057
|
-
return
|
|
1057
|
+
return chunkOWCEQKAR_cjs.workflowSteps(workflow).map((step) => {
|
|
1058
1058
|
const ui = compact({
|
|
1059
1059
|
description: step.description,
|
|
1060
1060
|
icon: step.icon,
|
|
@@ -1081,8 +1081,8 @@ function toPlanSteps(workflow, options = {}) {
|
|
|
1081
1081
|
ui,
|
|
1082
1082
|
// An unfinished signal (still being typed) is not saved: the server would refuse it.
|
|
1083
1083
|
...step.signals?.some((s) => !isIncompleteSignal(s)) ? { signals: step.signals.filter((s) => !isIncompleteSignal(s)).map(toPlanSignal) } : {},
|
|
1084
|
-
...step.assignee &&
|
|
1085
|
-
...step.remindAfterHours &&
|
|
1084
|
+
...step.assignee && chunkOWCEQKAR_cjs.canAssign(step) ? { assignee: toPlanAssignee(step.assignee) } : {},
|
|
1085
|
+
...step.remindAfterHours && chunkOWCEQKAR_cjs.canAssign(step) ? { remind_after_hours: step.remindAfterHours } : {},
|
|
1086
1086
|
// A review's fields are what approving it is checked against (the server's `fields`).
|
|
1087
1087
|
...step.kind === "review" && step.fields?.length ? { fields: step.fields.map(toStepField) } : {},
|
|
1088
1088
|
...step.kind === "action" ? { action: toPlanAction(step.action) } : {},
|
|
@@ -1200,7 +1200,7 @@ function workflowToSkillMarkdown(workflow) {
|
|
|
1200
1200
|
if (workflow.landing !== "chat") lines.push(`landing: ${workflow.landing}`);
|
|
1201
1201
|
if (workflow.requiresFiles) lines.push("requires_files: true");
|
|
1202
1202
|
if (workflow.inputs.length > 0) {
|
|
1203
|
-
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(
|
|
1203
|
+
lines.push(`inputs: ${JSON.stringify(workflow.inputs.map(chunkOWCEQKAR_cjs.fieldToFrontmatter))}`);
|
|
1204
1204
|
}
|
|
1205
1205
|
lines.push("---", "", run.promptTemplate.trim(), "");
|
|
1206
1206
|
return lines.join("\n");
|
|
@@ -1222,12 +1222,12 @@ function workflowFromSkillMarkdown(id, text) {
|
|
|
1222
1222
|
} else if (value === "true" || value === "false") frontmatter[key] = value === "true";
|
|
1223
1223
|
else frontmatter[key] = value;
|
|
1224
1224
|
}
|
|
1225
|
-
return
|
|
1225
|
+
return chunkOWCEQKAR_cjs.workflowFromFrontmatter(id, frontmatter, body);
|
|
1226
1226
|
}
|
|
1227
1227
|
var errorMessage = (e) => e instanceof Error ? e.message : typeof e === "string" ? e : "Something went wrong.";
|
|
1228
1228
|
function firstOpen(steps, states) {
|
|
1229
1229
|
const open = steps.find((s) => !["done", "skipped"].includes(states[s.id]?.status ?? "pending"));
|
|
1230
|
-
return open?.id ?? (steps.length &&
|
|
1230
|
+
return open?.id ?? (steps.length && chunkOWCEQKAR_cjs.isRunFinished(steps, states) ? null : steps[0]?.id ?? null);
|
|
1231
1231
|
}
|
|
1232
1232
|
function useWorkflowView(options) {
|
|
1233
1233
|
const { steps, states, inputs, setInput, loaded = true } = options;
|
|
@@ -1267,11 +1267,11 @@ function useWorkflowView(options) {
|
|
|
1267
1267
|
}),
|
|
1268
1268
|
[]
|
|
1269
1269
|
);
|
|
1270
|
-
const action = busy ? "wait" :
|
|
1270
|
+
const action = busy ? "wait" : chunkOWCEQKAR_cjs.nextAction(steps, states, current, actionOptions(options));
|
|
1271
1271
|
const next = react.useCallback(async () => {
|
|
1272
1272
|
const { steps: s, states: st, inputs: values } = optionsRef.current;
|
|
1273
1273
|
const at = s.find((x) => x.id === current);
|
|
1274
|
-
const act2 =
|
|
1274
|
+
const act2 = chunkOWCEQKAR_cjs.nextAction(s, st, current, actionOptions(optionsRef.current));
|
|
1275
1275
|
if (!at || act2 === "wait" || busy) return;
|
|
1276
1276
|
setActionError(null);
|
|
1277
1277
|
if (act2 === "finish") return setCurrent(null);
|
|
@@ -1282,7 +1282,7 @@ function useWorkflowView(options) {
|
|
|
1282
1282
|
await (act2 === "start" ? optionsRef.current.start?.() : optionsRef.current.retry?.(at.id));
|
|
1283
1283
|
return;
|
|
1284
1284
|
}
|
|
1285
|
-
if (Object.keys(
|
|
1285
|
+
if (Object.keys(chunkOWCEQKAR_cjs.validateStep(at, values)).length > 0) {
|
|
1286
1286
|
setShowErrors(true);
|
|
1287
1287
|
return;
|
|
1288
1288
|
}
|
|
@@ -1383,10 +1383,10 @@ function useWorkflowView(options) {
|
|
|
1383
1383
|
inputs,
|
|
1384
1384
|
setInput,
|
|
1385
1385
|
stateOf: (id) => states[id],
|
|
1386
|
-
phaseOf: (id) =>
|
|
1387
|
-
failedUpstreamOf: (id) =>
|
|
1386
|
+
phaseOf: (id) => chunkOWCEQKAR_cjs.stepPhase(steps, states, id),
|
|
1387
|
+
failedUpstreamOf: (id) => chunkOWCEQKAR_cjs.failedUpstream(steps, states, id),
|
|
1388
1388
|
isLocked,
|
|
1389
|
-
errors: showErrors && step && !isLocked(step.id) ?
|
|
1389
|
+
errors: showErrors && step && !isLocked(step.id) ? chunkOWCEQKAR_cjs.validateStep(step, inputs) : {},
|
|
1390
1390
|
busy,
|
|
1391
1391
|
actionError,
|
|
1392
1392
|
isRunning: Object.values(states).some((s) => s.status === "running"),
|
|
@@ -1404,11 +1404,11 @@ function useWorkflowView(options) {
|
|
|
1404
1404
|
nameOf: options.nameOf,
|
|
1405
1405
|
assigneeOf: (id) => {
|
|
1406
1406
|
const s = steps.find((x) => x.id === id);
|
|
1407
|
-
if (!s || !
|
|
1408
|
-
return
|
|
1407
|
+
if (!s || !chunkOWCEQKAR_cjs.canAssign(s)) return void 0;
|
|
1408
|
+
return chunkOWCEQKAR_cjs.assigneeName(s.assignee, {
|
|
1409
1409
|
nameOf: options.nameOf,
|
|
1410
1410
|
inputs,
|
|
1411
|
-
fields:
|
|
1411
|
+
fields: chunkOWCEQKAR_cjs.runFieldsOf(steps),
|
|
1412
1412
|
announcedTo: states[id]?.announcedTo
|
|
1413
1413
|
});
|
|
1414
1414
|
},
|
|
@@ -1542,7 +1542,7 @@ function StepBarFrame({
|
|
|
1542
1542
|
}) {
|
|
1543
1543
|
const l = { ...DEFAULT_STEP_BAR_LABELS, ...labels };
|
|
1544
1544
|
const box = react.useRef(null);
|
|
1545
|
-
const { width } =
|
|
1545
|
+
const { width } = chunkOWCEQKAR_cjs.useElementSize(box);
|
|
1546
1546
|
const narrow = width > 0 && width < NARROW_PX;
|
|
1547
1547
|
const [start, setStart] = react.useState(null);
|
|
1548
1548
|
react.useEffect(() => setStart(null), [current]);
|
|
@@ -1609,7 +1609,7 @@ function StepBarFrame({
|
|
|
1609
1609
|
phase === "blocked" && "opacity-60"
|
|
1610
1610
|
),
|
|
1611
1611
|
"aria-hidden": true,
|
|
1612
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1612
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkOWCEQKAR_cjs.StepBadgeMark, { phase, icon: icon?.(s) })
|
|
1613
1613
|
}
|
|
1614
1614
|
),
|
|
1615
1615
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", title: s.title, children: s.title }),
|
|
@@ -1717,7 +1717,7 @@ function StepBarFrame({
|
|
|
1717
1717
|
};
|
|
1718
1718
|
const running = win.runningHidden;
|
|
1719
1719
|
const outOfViewChip = (s, kind) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1720
|
-
|
|
1720
|
+
chunkOWCEQKAR_cjs.StepChip,
|
|
1721
1721
|
{
|
|
1722
1722
|
kind: kindOf(s),
|
|
1723
1723
|
phase: kind === "working" ? "running" : "failed",
|
|
@@ -1890,7 +1890,7 @@ var DEFAULT_WORKFLOW_STEP_PARTS_LABELS = {
|
|
|
1890
1890
|
someone: "someone"
|
|
1891
1891
|
};
|
|
1892
1892
|
var docName = (ref, nameOfDoc) => {
|
|
1893
|
-
const { id, version } =
|
|
1893
|
+
const { id, version } = chunkOWCEQKAR_cjs.splitDocRef(ref);
|
|
1894
1894
|
const name = nameOfDoc?.(id) ?? id;
|
|
1895
1895
|
return version ? `${name} \xB7 v${version}` : name;
|
|
1896
1896
|
};
|
|
@@ -1972,7 +1972,7 @@ function SendBackControl({
|
|
|
1972
1972
|
const states = Object.fromEntries(
|
|
1973
1973
|
run.steps.map((s) => [s.id, run.stateOf(s.id) ?? { status: "pending" }])
|
|
1974
1974
|
);
|
|
1975
|
-
const targets =
|
|
1975
|
+
const targets = chunkOWCEQKAR_cjs.sendBackTargets(run.steps, states, step.id);
|
|
1976
1976
|
const [open, setOpen] = react.useState(false);
|
|
1977
1977
|
const [to, setTo] = react.useState(targets[0]?.id ?? "");
|
|
1978
1978
|
const [note, setNote] = react.useState("");
|
|
@@ -2062,7 +2062,7 @@ function ApprovalEvidence({
|
|
|
2062
2062
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex flex-wrap items-center gap-1.5 text-sm font-medium", children: [
|
|
2063
2063
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "size-4 text-primary" }),
|
|
2064
2064
|
approver ? l.approvedBy.replace("{name}", approver) : null,
|
|
2065
|
-
state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}",
|
|
2065
|
+
state.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal text-muted-foreground", children: l.approvedAt.replace("{date}", chunkOWCEQKAR_cjs.formatDate(state.at)) })
|
|
2066
2066
|
] }),
|
|
2067
2067
|
evidence.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
2068
2068
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: l.approvedWhat }),
|
|
@@ -2095,7 +2095,7 @@ function ApprovalEvidence({
|
|
|
2095
2095
|
] }),
|
|
2096
2096
|
(step.fields ?? []).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs", children: (step.fields ?? []).map((f) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "contents", children: [
|
|
2097
2097
|
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
|
|
2098
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children:
|
|
2098
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { "data-testid": `${testId}-evidence-field-${f.name}`, children: chunkOWCEQKAR_cjs.shownValue(run.inputs[f.name], f, run.nameOf) })
|
|
2099
2099
|
] }, f.name)) })
|
|
2100
2100
|
] });
|
|
2101
2101
|
}
|
|
@@ -2191,7 +2191,7 @@ function ActionStepBody({
|
|
|
2191
2191
|
waiting?.expires_at && phase === "waiting" && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
2192
2192
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-3.5" }),
|
|
2193
2193
|
" ",
|
|
2194
|
-
l.expires.replace("{date}",
|
|
2194
|
+
l.expires.replace("{date}", chunkOWCEQKAR_cjs.formatDate(waiting.expires_at))
|
|
2195
2195
|
] }),
|
|
2196
2196
|
phase === "waiting" && mine && !declining && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
2197
2197
|
actions?.sign && state && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2349,7 +2349,7 @@ function WorkflowStepBar({
|
|
|
2349
2349
|
const name = `${title} (${l.phases[phase]})`;
|
|
2350
2350
|
if (s.id === DONE)
|
|
2351
2351
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2352
|
-
|
|
2352
|
+
chunkOWCEQKAR_cjs.StepChip,
|
|
2353
2353
|
{
|
|
2354
2354
|
inert: true,
|
|
2355
2355
|
kind: "start",
|
|
@@ -2363,17 +2363,17 @@ function WorkflowStepBar({
|
|
|
2363
2363
|
"data-testid": tid("step-done")
|
|
2364
2364
|
}
|
|
2365
2365
|
);
|
|
2366
|
-
const kind =
|
|
2367
|
-
const KindIcon =
|
|
2366
|
+
const kind = chunkOWCEQKAR_cjs.stepKindOf(s);
|
|
2367
|
+
const KindIcon = chunkOWCEQKAR_cjs.STEP_KIND_ICONS[kind];
|
|
2368
2368
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2369
|
-
|
|
2369
|
+
chunkOWCEQKAR_cjs.StepChip,
|
|
2370
2370
|
{
|
|
2371
2371
|
kind,
|
|
2372
2372
|
phase,
|
|
2373
2373
|
icon: icon(s.icon) ?? /* @__PURE__ */ jsxRuntime.jsx(KindIcon, {}),
|
|
2374
2374
|
label: s.title,
|
|
2375
2375
|
current: isCurrent,
|
|
2376
|
-
heading:
|
|
2376
|
+
heading: chunkOWCEQKAR_cjs.DEFAULT_STEP_KIND_LABELS[kind],
|
|
2377
2377
|
labelClassName: isCurrent ? STEP_LABEL_CURRENT : ui.cn(STEP_LABEL, STEP_LABEL_MAX),
|
|
2378
2378
|
labelTestId: tid(`step-${s.id}-label`),
|
|
2379
2379
|
onClick: () => run.goTo(s.id),
|
|
@@ -2406,7 +2406,7 @@ function WorkflowStepBar({
|
|
|
2406
2406
|
isSelectable: (id) => id !== DONE,
|
|
2407
2407
|
renderStep: (s) => pill(s),
|
|
2408
2408
|
icon: (s) => s.id === DONE ? doneIcon : icon(s.icon),
|
|
2409
|
-
kindOf: (s) => s.id === DONE ? "start" :
|
|
2409
|
+
kindOf: (s) => s.id === DONE ? "start" : chunkOWCEQKAR_cjs.stepKindOf(s),
|
|
2410
2410
|
disabled: run.busy,
|
|
2411
2411
|
labels,
|
|
2412
2412
|
tid,
|
|
@@ -2489,7 +2489,7 @@ function WorkflowRunner({
|
|
|
2489
2489
|
const { steps, step, isComplete, action } = run;
|
|
2490
2490
|
const completion = workflow.run.kind === "steps" ? workflow.run.completion : void 0;
|
|
2491
2491
|
const tid = (suffix) => `${testIdPrefix}-${suffix}`;
|
|
2492
|
-
const levels =
|
|
2492
|
+
const levels = chunkOWCEQKAR_cjs.stepLevels(steps);
|
|
2493
2493
|
const icon = (key) => key && renderIcon ? renderIcon(key) : void 0;
|
|
2494
2494
|
const added = step?.kind === "upload" ? (files ?? []).filter((f) => f.addedFor === step.id) : [];
|
|
2495
2495
|
const unread = added.filter((f) => f.status === "processing").length;
|
|
@@ -2497,7 +2497,7 @@ function WorkflowRunner({
|
|
|
2497
2497
|
const sending = added.filter((f) => f.status === "uploading").length;
|
|
2498
2498
|
const unsent = added.filter((f) => f.status === "upload-failed").length;
|
|
2499
2499
|
const uploadHold = step?.kind === "upload" && (sending > 0 || uploading || unsent > 0);
|
|
2500
|
-
const docsWait = !!step &&
|
|
2500
|
+
const docsWait = !!step && chunkOWCEQKAR_cjs.waitingDocuments(run.stateOf(step.id)).length > 0;
|
|
2501
2501
|
const nextLabel = sending ? sending === 1 ? l.uploadingFile : l.uploadingFiles.replace("{count}", String(sending)) : uploadHold && uploading ? l.uploadingAny : uploadHold ? unsent === 1 ? l.uploadFailed : l.uploadsFailed.replace("{count}", String(unsent)) : reading ? l.readingFiles.replace("{current}", String(Math.min(added.length - unread + 1, added.length))).replace("{count}", String(added.length)) : action === "start" ? l.start : action === "retry" ? l.retry : action === "finish" ? l.finish : action === "complete" && step?.kind === "review" ? l.approve : action === "complete" && step?.kind === "action" ? l.markSent : action === "wait" && (run.isRunning || run.busy || docsWait) ? l.working : (step && !run.isLocked(step.id) ? step.nextLabel : void 0) ?? l.next;
|
|
2502
2502
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn(compact2 ? "space-y-3" : "space-y-6", className), "data-testid": testIdPrefix, children: [
|
|
2503
2503
|
!hideStepBar && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2529,7 +2529,7 @@ function WorkflowRunner({
|
|
|
2529
2529
|
/* @__PURE__ */ jsxRuntime.jsx(StepNotices, { run, step, l, tid }),
|
|
2530
2530
|
run.phaseOf(step.id) === "blocked" ? /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: ui.cn(box, "p-6"), "data-testid": tid(step.id), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", "data-testid": tid(`${step.id}-blocked`), children: l.blocked.replace(
|
|
2531
2531
|
"{steps}",
|
|
2532
|
-
|
|
2532
|
+
chunkOWCEQKAR_cjs.stepDependencies(steps, step.id).map((d) => steps.find((s) => s.id === d)?.title ?? d).join(", ")
|
|
2533
2533
|
) }) }) : step.kind === "form" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
|
|
2534
2534
|
/* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon), testId: tid(`${step.id}-title`) }),
|
|
2535
2535
|
/* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
|
|
@@ -2585,7 +2585,7 @@ function WorkflowRunner({
|
|
|
2585
2585
|
] }) : step.kind === "review" ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { className: ui.cn(box, "space-y-4"), "data-testid": tid(step.id), children: [
|
|
2586
2586
|
/* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon: icon(step.icon) }),
|
|
2587
2587
|
/* @__PURE__ */ jsxRuntime.jsx(SentBackNote, { state: run.stateOf(step.id), l: pl, testId: tid(step.id) }),
|
|
2588
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children:
|
|
2588
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-line text-sm text-muted-foreground", children: chunkOWCEQKAR_cjs.reviewInstructions(step, run.inputs) }),
|
|
2589
2589
|
/* @__PURE__ */ jsxRuntime.jsx(AssigneeLine, { run, stepId: step.id, l: pl, testId: tid(step.id) }),
|
|
2590
2590
|
!(run.phaseOf(step.id) === "done" && run.stateOf(step.id)?.by) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", "data-testid": tid(`${step.id}-status`), children: run.phaseOf(step.id) === "done" ? l.approved : run.phaseOf(step.id) === "skipped" ? l.skipped : l.awaitingReview }),
|
|
2591
2591
|
(step.fields ?? []).length > 0 && run.phaseOf(step.id) === "ready" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2852,8 +2852,8 @@ function AgentStepBody({
|
|
|
2852
2852
|
}) {
|
|
2853
2853
|
const state = run.stateOf(step.id);
|
|
2854
2854
|
const phase = run.phaseOf(step.id);
|
|
2855
|
-
const pending =
|
|
2856
|
-
const pendingNames = pending.flatMap((ref) => nameOfDoc?.(
|
|
2855
|
+
const pending = chunkOWCEQKAR_cjs.waitingDocuments(state);
|
|
2856
|
+
const pendingNames = pending.flatMap((ref) => nameOfDoc?.(chunkOWCEQKAR_cjs.splitDocRef(ref).id) ?? []);
|
|
2857
2857
|
const header = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
2858
2858
|
/* @__PURE__ */ jsxRuntime.jsx(StepHeading, { step, icon }),
|
|
2859
2859
|
phase === "failed" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: run.retry && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2938,7 +2938,7 @@ function StepNotices({
|
|
|
2938
2938
|
l,
|
|
2939
2939
|
tid
|
|
2940
2940
|
}) {
|
|
2941
|
-
const notStarted = !
|
|
2941
|
+
const notStarted = !chunkOWCEQKAR_cjs.isPersonStep(step) && run.needsStart && run.phaseOf(step.id) === "ready";
|
|
2942
2942
|
const failed = run.failedUpstreamOf(step.id);
|
|
2943
2943
|
if (!notStarted && failed.length === 0) return null;
|
|
2944
2944
|
const why = (error) => error ? `: ${error}` : "";
|
|
@@ -2974,6 +2974,407 @@ function StepNotices({
|
|
|
2974
2974
|
))
|
|
2975
2975
|
] });
|
|
2976
2976
|
}
|
|
2977
|
+
function SkillTypeBadge({ type, className }) {
|
|
2978
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2979
|
+
"span",
|
|
2980
|
+
{
|
|
2981
|
+
className: ui.cn(
|
|
2982
|
+
"shrink-0 rounded bg-background px-1.5 py-0.5 text-xs uppercase tracking-wide text-muted-foreground",
|
|
2983
|
+
className
|
|
2984
|
+
),
|
|
2985
|
+
"data-slot": "skill-type-badge",
|
|
2986
|
+
children: type
|
|
2987
|
+
}
|
|
2988
|
+
);
|
|
2989
|
+
}
|
|
2990
|
+
var DEFAULT_SKILL_GLOBAL_BADGE_LABELS = {
|
|
2991
|
+
global: "Global",
|
|
2992
|
+
globalTitle: "Shared with everyone in the marketplace"
|
|
2993
|
+
};
|
|
2994
|
+
function SkillGlobalBadge({
|
|
2995
|
+
className,
|
|
2996
|
+
labels
|
|
2997
|
+
}) {
|
|
2998
|
+
const l = { ...DEFAULT_SKILL_GLOBAL_BADGE_LABELS, ...labels };
|
|
2999
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3000
|
+
"span",
|
|
3001
|
+
{
|
|
3002
|
+
className: ui.cn(
|
|
3003
|
+
"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",
|
|
3004
|
+
className
|
|
3005
|
+
),
|
|
3006
|
+
title: l.globalTitle,
|
|
3007
|
+
"data-slot": "skill-global-badge",
|
|
3008
|
+
children: [
|
|
3009
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "size-3" }),
|
|
3010
|
+
l.global
|
|
3011
|
+
]
|
|
3012
|
+
}
|
|
3013
|
+
);
|
|
3014
|
+
}
|
|
3015
|
+
function SkillActionButton({
|
|
3016
|
+
label,
|
|
3017
|
+
tooltip,
|
|
3018
|
+
onClick,
|
|
3019
|
+
children,
|
|
3020
|
+
testId
|
|
3021
|
+
}) {
|
|
3022
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
3023
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, onFocusCapture: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3024
|
+
ui.Button,
|
|
3025
|
+
{
|
|
3026
|
+
variant: "ghost",
|
|
3027
|
+
size: "icon",
|
|
3028
|
+
className: "size-7 shrink-0 pointer-coarse:size-11",
|
|
3029
|
+
onClick: (e) => {
|
|
3030
|
+
e.stopPropagation();
|
|
3031
|
+
onClick(e);
|
|
3032
|
+
},
|
|
3033
|
+
"aria-label": label,
|
|
3034
|
+
"data-testid": testId,
|
|
3035
|
+
children
|
|
3036
|
+
}
|
|
3037
|
+
) }),
|
|
3038
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: tooltip ?? label }) })
|
|
3039
|
+
] });
|
|
3040
|
+
}
|
|
3041
|
+
function activateOnKey(handler) {
|
|
3042
|
+
return (e) => {
|
|
3043
|
+
if (e.target !== e.currentTarget) return;
|
|
3044
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
3045
|
+
e.preventDefault();
|
|
3046
|
+
handler();
|
|
3047
|
+
}
|
|
3048
|
+
};
|
|
3049
|
+
}
|
|
3050
|
+
var DEFAULT_SKILL_GENERATE_FORM_LABELS = {
|
|
3051
|
+
title: "Generate with AI",
|
|
3052
|
+
hint: "Describe what the skill should do. The assistant drafts it in chat, then you can edit it here.",
|
|
3053
|
+
placeholder: "e.g. Summarize a contract into key obligations, dates, and parties",
|
|
3054
|
+
generate: "Generate with AI",
|
|
3055
|
+
writeManually: "\u2026or write it manually"
|
|
3056
|
+
};
|
|
3057
|
+
function SkillGenerateForm({
|
|
3058
|
+
onGenerate,
|
|
3059
|
+
onManual,
|
|
3060
|
+
icon,
|
|
3061
|
+
labels,
|
|
3062
|
+
testIds
|
|
3063
|
+
}) {
|
|
3064
|
+
const l = { ...DEFAULT_SKILL_GENERATE_FORM_LABELS, ...labels };
|
|
3065
|
+
const [desc, setDesc] = react.useState("");
|
|
3066
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4", "data-slot": "skill-generate-form", children: [
|
|
3067
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg bg-muted p-4", children: [
|
|
3068
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
|
|
3069
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wand2, { className: "size-4 text-primary" }),
|
|
3070
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: l.title })
|
|
3071
|
+
] }),
|
|
3072
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs text-muted-foreground", children: l.hint }),
|
|
3073
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3074
|
+
ui.Textarea,
|
|
3075
|
+
{
|
|
3076
|
+
value: desc,
|
|
3077
|
+
onChange: (e) => setDesc(e.target.value),
|
|
3078
|
+
rows: 4,
|
|
3079
|
+
placeholder: l.placeholder,
|
|
3080
|
+
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.description, { testId: "skills-panel-ai-desc" })
|
|
3081
|
+
}
|
|
3082
|
+
),
|
|
3083
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3084
|
+
ui.Button,
|
|
3085
|
+
{
|
|
3086
|
+
size: "sm",
|
|
3087
|
+
disabled: !desc.trim(),
|
|
3088
|
+
onClick: () => onGenerate(desc.trim()),
|
|
3089
|
+
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.generate, { testId: "skills-panel-ai-generate" }),
|
|
3090
|
+
children: [
|
|
3091
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1 [&>svg]:size-4", children: icon }),
|
|
3092
|
+
l.generate
|
|
3093
|
+
]
|
|
3094
|
+
}
|
|
3095
|
+
) })
|
|
3096
|
+
] }),
|
|
3097
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3098
|
+
"button",
|
|
3099
|
+
{
|
|
3100
|
+
type: "button",
|
|
3101
|
+
className: "self-start text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline pointer-coarse:min-h-11",
|
|
3102
|
+
onClick: onManual,
|
|
3103
|
+
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.writeManually, { testId: "skills-panel-write-manually" }),
|
|
3104
|
+
children: l.writeManually
|
|
3105
|
+
}
|
|
3106
|
+
)
|
|
3107
|
+
] });
|
|
3108
|
+
}
|
|
3109
|
+
var DEFAULT_SKILL_EDIT_FORM_LABELS = {
|
|
3110
|
+
name: "Name",
|
|
3111
|
+
namePlaceholder: "contract-summary",
|
|
3112
|
+
invokedAs: (name) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3113
|
+
"Invoked as ",
|
|
3114
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono", children: [
|
|
3115
|
+
"/",
|
|
3116
|
+
name || "skill-name"
|
|
3117
|
+
] })
|
|
3118
|
+
] }),
|
|
3119
|
+
description: "Description",
|
|
3120
|
+
descriptionPlaceholder: "What it does and when to use it",
|
|
3121
|
+
instructions: "Instructions",
|
|
3122
|
+
cancel: "Cancel",
|
|
3123
|
+
saving: "Saving\u2026",
|
|
3124
|
+
saveChanges: "Save changes",
|
|
3125
|
+
create: "Create skill"
|
|
3126
|
+
};
|
|
3127
|
+
var FIELD_LABEL = "text-xs font-semibold uppercase tracking-wide text-muted-foreground";
|
|
3128
|
+
function SkillEditForm({
|
|
3129
|
+
name,
|
|
3130
|
+
onNameChange,
|
|
3131
|
+
isNameLocked,
|
|
3132
|
+
nameError,
|
|
3133
|
+
description,
|
|
3134
|
+
onDescriptionChange,
|
|
3135
|
+
editor,
|
|
3136
|
+
isSaving,
|
|
3137
|
+
isEditing,
|
|
3138
|
+
onSave,
|
|
3139
|
+
onCancel,
|
|
3140
|
+
labels,
|
|
3141
|
+
testIds
|
|
3142
|
+
}) {
|
|
3143
|
+
const l = { ...DEFAULT_SKILL_EDIT_FORM_LABELS, ...labels };
|
|
3144
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", "data-slot": "skill-edit-form", children: [
|
|
3145
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4", children: [
|
|
3146
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3147
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "sp-name", className: FIELD_LABEL, children: l.name }),
|
|
3148
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3149
|
+
ui.Input,
|
|
3150
|
+
{
|
|
3151
|
+
id: "sp-name",
|
|
3152
|
+
value: name,
|
|
3153
|
+
disabled: isNameLocked,
|
|
3154
|
+
placeholder: l.namePlaceholder,
|
|
3155
|
+
onChange: (e) => onNameChange(e.target.value),
|
|
3156
|
+
className: "mt-1",
|
|
3157
|
+
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.name, { testId: "skills-panel-edit-name" })
|
|
3158
|
+
}
|
|
3159
|
+
),
|
|
3160
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: l.invokedAs(name) }),
|
|
3161
|
+
nameError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: nameError })
|
|
3162
|
+
] }),
|
|
3163
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3164
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "sp-desc", className: FIELD_LABEL, children: l.description }),
|
|
3165
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3166
|
+
ui.Input,
|
|
3167
|
+
{
|
|
3168
|
+
id: "sp-desc",
|
|
3169
|
+
value: description,
|
|
3170
|
+
placeholder: l.descriptionPlaceholder,
|
|
3171
|
+
onChange: (e) => onDescriptionChange(e.target.value),
|
|
3172
|
+
className: "mt-1",
|
|
3173
|
+
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.description, { testId: "skills-panel-edit-desc" })
|
|
3174
|
+
}
|
|
3175
|
+
)
|
|
3176
|
+
] }),
|
|
3177
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
3178
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: `${FIELD_LABEL} mb-1`, children: l.instructions }),
|
|
3179
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[240px] flex-1 overflow-hidden rounded-md border border-border", children: editor })
|
|
3180
|
+
] })
|
|
3181
|
+
] }),
|
|
3182
|
+
/* @__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: [
|
|
3183
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", size: "sm", onClick: onCancel, children: l.cancel }),
|
|
3184
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3185
|
+
ui.Button,
|
|
3186
|
+
{
|
|
3187
|
+
size: "sm",
|
|
3188
|
+
onClick: onSave,
|
|
3189
|
+
disabled: isSaving,
|
|
3190
|
+
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.save, { testId: "skills-panel-edit-save" }),
|
|
3191
|
+
children: isSaving ? l.saving : isEditing ? l.saveChanges : l.create
|
|
3192
|
+
}
|
|
3193
|
+
)
|
|
3194
|
+
] })
|
|
3195
|
+
] });
|
|
3196
|
+
}
|
|
3197
|
+
function SkillFilterChips({
|
|
3198
|
+
options,
|
|
3199
|
+
value,
|
|
3200
|
+
onChange,
|
|
3201
|
+
label,
|
|
3202
|
+
testIdPrefix = "skills-filter",
|
|
3203
|
+
className
|
|
3204
|
+
}) {
|
|
3205
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3206
|
+
"div",
|
|
3207
|
+
{
|
|
3208
|
+
role: "radiogroup",
|
|
3209
|
+
"aria-label": label,
|
|
3210
|
+
className: ui.cn("flex flex-wrap gap-2", className),
|
|
3211
|
+
"data-slot": "skill-filter-chips",
|
|
3212
|
+
children: options.map((option) => {
|
|
3213
|
+
const selected = option.id === value;
|
|
3214
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3215
|
+
"button",
|
|
3216
|
+
{
|
|
3217
|
+
type: "button",
|
|
3218
|
+
role: "radio",
|
|
3219
|
+
"aria-checked": selected,
|
|
3220
|
+
onClick: () => onChange(option.id),
|
|
3221
|
+
"data-testid": `${testIdPrefix}-${option.id}`,
|
|
3222
|
+
className: ui.cn(
|
|
3223
|
+
"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",
|
|
3224
|
+
selected ? "border-primary bg-primary/10 text-foreground" : "border-border bg-background text-muted-foreground [&:hover]:bg-muted"
|
|
3225
|
+
),
|
|
3226
|
+
children: [
|
|
3227
|
+
option.label,
|
|
3228
|
+
option.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: option.count })
|
|
3229
|
+
]
|
|
3230
|
+
},
|
|
3231
|
+
option.id
|
|
3232
|
+
);
|
|
3233
|
+
})
|
|
3234
|
+
}
|
|
3235
|
+
);
|
|
3236
|
+
}
|
|
3237
|
+
var DEFAULT_SKILL_VIEW_TOGGLE_LABELS = {
|
|
3238
|
+
group: "View",
|
|
3239
|
+
gallery: "Gallery",
|
|
3240
|
+
list: "List"
|
|
3241
|
+
};
|
|
3242
|
+
function SkillViewToggle({ value, onChange, labels, testId }) {
|
|
3243
|
+
const l = { ...DEFAULT_SKILL_VIEW_TOGGLE_LABELS, ...labels };
|
|
3244
|
+
const item = (view, label, icon) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3245
|
+
"button",
|
|
3246
|
+
{
|
|
3247
|
+
type: "button",
|
|
3248
|
+
role: "radio",
|
|
3249
|
+
"aria-checked": value === view,
|
|
3250
|
+
"aria-label": label,
|
|
3251
|
+
title: label,
|
|
3252
|
+
onClick: () => onChange(view),
|
|
3253
|
+
"data-testid": `${testId ?? "skills-view-toggle"}-${view}`,
|
|
3254
|
+
className: ui.cn(
|
|
3255
|
+
"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",
|
|
3256
|
+
value === view ? "bg-background text-foreground shadow-sm" : "text-muted-foreground"
|
|
3257
|
+
),
|
|
3258
|
+
children: icon
|
|
3259
|
+
}
|
|
3260
|
+
);
|
|
3261
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3262
|
+
"div",
|
|
3263
|
+
{
|
|
3264
|
+
role: "radiogroup",
|
|
3265
|
+
"aria-label": l.group,
|
|
3266
|
+
className: "inline-flex shrink-0 gap-0.5 rounded-lg bg-muted p-0.5",
|
|
3267
|
+
"data-testid": testId ?? "skills-view-toggle",
|
|
3268
|
+
children: [
|
|
3269
|
+
item("gallery", l.gallery, /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutGrid, { className: "size-4" })),
|
|
3270
|
+
item("list", l.list, /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "size-4" }))
|
|
3271
|
+
]
|
|
3272
|
+
}
|
|
3273
|
+
);
|
|
3274
|
+
}
|
|
3275
|
+
function SkillTile({
|
|
3276
|
+
name,
|
|
3277
|
+
description,
|
|
3278
|
+
sourceLabel,
|
|
3279
|
+
type,
|
|
3280
|
+
icon,
|
|
3281
|
+
layout,
|
|
3282
|
+
selected,
|
|
3283
|
+
onSelect,
|
|
3284
|
+
testId
|
|
3285
|
+
}) {
|
|
3286
|
+
const isRow = layout === "list";
|
|
3287
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3288
|
+
"div",
|
|
3289
|
+
{
|
|
3290
|
+
role: "button",
|
|
3291
|
+
tabIndex: 0,
|
|
3292
|
+
"aria-pressed": selected,
|
|
3293
|
+
onClick: onSelect,
|
|
3294
|
+
onKeyDown: activateOnKey(onSelect),
|
|
3295
|
+
"data-testid": testId ?? `skill-tile-${name}`,
|
|
3296
|
+
"data-skill-name": name,
|
|
3297
|
+
"data-slot": "skill-tile",
|
|
3298
|
+
className: ui.cn(
|
|
3299
|
+
"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",
|
|
3300
|
+
isRow ? "items-center gap-3" : "h-full flex-col gap-2",
|
|
3301
|
+
selected ? "border-primary bg-primary/5" : "border-transparent bg-muted [&:hover]:bg-accent"
|
|
3302
|
+
),
|
|
3303
|
+
children: [
|
|
3304
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3305
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-ai-ink [&>svg]:size-5", children: icon }),
|
|
3306
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-foreground", children: name })
|
|
3307
|
+
] }),
|
|
3308
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3309
|
+
"p",
|
|
3310
|
+
{
|
|
3311
|
+
className: ui.cn(
|
|
3312
|
+
"min-w-0 text-sm text-muted-foreground",
|
|
3313
|
+
isRow ? "flex-1 truncate max-sm:hidden" : "line-clamp-3"
|
|
3314
|
+
),
|
|
3315
|
+
children: description
|
|
3316
|
+
}
|
|
3317
|
+
),
|
|
3318
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cn("flex shrink-0 items-center gap-1.5", isRow && "ml-auto"), children: [
|
|
3319
|
+
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 }),
|
|
3320
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
|
|
3321
|
+
] })
|
|
3322
|
+
]
|
|
3323
|
+
}
|
|
3324
|
+
);
|
|
3325
|
+
}
|
|
3326
|
+
function SkillDetail({
|
|
3327
|
+
title,
|
|
3328
|
+
sourceLabel,
|
|
3329
|
+
description,
|
|
3330
|
+
icon,
|
|
3331
|
+
notice,
|
|
3332
|
+
children,
|
|
3333
|
+
actions,
|
|
3334
|
+
testId
|
|
3335
|
+
}) {
|
|
3336
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3337
|
+
"section",
|
|
3338
|
+
{
|
|
3339
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
3340
|
+
"data-testid": testId ?? "skill-detail",
|
|
3341
|
+
"data-slot": "skill-detail",
|
|
3342
|
+
"aria-label": title,
|
|
3343
|
+
children: [
|
|
3344
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-0 flex-1 space-y-4 overflow-y-auto p-4", children: [
|
|
3345
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "space-y-1", children: [
|
|
3346
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
3347
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ai-ink [&>svg]:size-5", children: icon }),
|
|
3348
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-foreground", children: title }),
|
|
3349
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
|
|
3350
|
+
] }),
|
|
3351
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description }),
|
|
3352
|
+
notice && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground", children: notice })
|
|
3353
|
+
] }),
|
|
3354
|
+
children
|
|
3355
|
+
] }),
|
|
3356
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3357
|
+
"div",
|
|
3358
|
+
{
|
|
3359
|
+
className: "flex flex-wrap gap-2 border-t border-border bg-background p-3",
|
|
3360
|
+
"data-slot": "skill-detail-actions",
|
|
3361
|
+
children: actions
|
|
3362
|
+
}
|
|
3363
|
+
)
|
|
3364
|
+
]
|
|
3365
|
+
}
|
|
3366
|
+
);
|
|
3367
|
+
}
|
|
3368
|
+
function SkillDetailSection({
|
|
3369
|
+
title,
|
|
3370
|
+
children,
|
|
3371
|
+
testId
|
|
3372
|
+
}) {
|
|
3373
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", "data-testid": testId, children: [
|
|
3374
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: title }),
|
|
3375
|
+
children
|
|
3376
|
+
] });
|
|
3377
|
+
}
|
|
2977
3378
|
|
|
2978
3379
|
// src/agents/skills/skillFiles.ts
|
|
2979
3380
|
var SKILL_TYPES = ["markdown", "python", "shell", "javascript", "typescript"];
|
|
@@ -3176,6 +3577,201 @@ async function importSkillFromUrl(url) {
|
|
|
3176
3577
|
const last = parsed.pathname.split("/").filter(Boolean).pop() ?? "skill";
|
|
3177
3578
|
return importMarkdownSkill(last.includes(".") ? last : `${last}.md`, text);
|
|
3178
3579
|
}
|
|
3580
|
+
|
|
3581
|
+
// src/agents/skills/skillLibrary.ts
|
|
3582
|
+
var SKILL_SOURCE_LABELS = {
|
|
3583
|
+
builtin: "Built in",
|
|
3584
|
+
mine: "Yours",
|
|
3585
|
+
shared: "Shared"
|
|
3586
|
+
};
|
|
3587
|
+
var SKILL_TYPE_LABELS = {
|
|
3588
|
+
markdown: "Instructions",
|
|
3589
|
+
python: "Python",
|
|
3590
|
+
shell: "Shell",
|
|
3591
|
+
javascript: "JavaScript",
|
|
3592
|
+
typescript: "TypeScript"
|
|
3593
|
+
};
|
|
3594
|
+
var SKILL_FIELD_TYPE_LABELS = {
|
|
3595
|
+
text: "Short answer",
|
|
3596
|
+
longtext: "Free text",
|
|
3597
|
+
boolean: "Yes or no",
|
|
3598
|
+
select: "A choice",
|
|
3599
|
+
number: "A number",
|
|
3600
|
+
date: "A date",
|
|
3601
|
+
scope: "Which files",
|
|
3602
|
+
documents: "Pick files",
|
|
3603
|
+
person: "A person"
|
|
3604
|
+
};
|
|
3605
|
+
function buildLibrarySkills(builtins, listings) {
|
|
3606
|
+
const { host, skills } = chunkOWCEQKAR_cjs.mergeSkillWorkflows(builtins, listings);
|
|
3607
|
+
const builtinIds = new Set(builtins.map((w) => w.id));
|
|
3608
|
+
const stored = new Map(listings.filter((s) => s.doc_ext_id).map((s) => [s.slug, s]));
|
|
3609
|
+
return [...host, ...skills].flatMap((workflow) => {
|
|
3610
|
+
if (workflow.run.kind !== "prompt") return [];
|
|
3611
|
+
const listing = stored.get(workflow.id);
|
|
3612
|
+
if (!listing?.doc_ext_id) {
|
|
3613
|
+
if (!builtinIds.has(workflow.id)) return [];
|
|
3614
|
+
return [
|
|
3615
|
+
{
|
|
3616
|
+
slug: workflow.id,
|
|
3617
|
+
title: workflow.title,
|
|
3618
|
+
description: workflow.description,
|
|
3619
|
+
source: "builtin",
|
|
3620
|
+
type: "markdown",
|
|
3621
|
+
isShared: false,
|
|
3622
|
+
replacesBuiltin: false,
|
|
3623
|
+
workflow
|
|
3624
|
+
}
|
|
3625
|
+
];
|
|
3626
|
+
}
|
|
3627
|
+
const mine = listing.is_owner ?? true;
|
|
3628
|
+
return [
|
|
3629
|
+
{
|
|
3630
|
+
slug: workflow.id,
|
|
3631
|
+
title: workflow.title,
|
|
3632
|
+
description: listing.description || workflow.description,
|
|
3633
|
+
source: mine ? "mine" : "shared",
|
|
3634
|
+
type: listing.skill_type ?? "markdown",
|
|
3635
|
+
isShared: mine && listing.visibility === "global",
|
|
3636
|
+
replacesBuiltin: mine && builtinIds.has(listing.slug),
|
|
3637
|
+
workflow,
|
|
3638
|
+
docExtId: listing.doc_ext_id
|
|
3639
|
+
}
|
|
3640
|
+
];
|
|
3641
|
+
});
|
|
3642
|
+
}
|
|
3643
|
+
function filterLibrarySkills(skills, f) {
|
|
3644
|
+
const q = f.query.trim().toLowerCase();
|
|
3645
|
+
return skills.filter((s) => f.source === "all" || s.source === f.source).filter((s) => f.type === "all" || s.type === f.type).filter(
|
|
3646
|
+
(s) => !q || s.title.toLowerCase().includes(q) || s.slug.toLowerCase().includes(q) || s.description.toLowerCase().includes(q)
|
|
3647
|
+
);
|
|
3648
|
+
}
|
|
3649
|
+
var ACTION = "pointer-coarse:min-h-11";
|
|
3650
|
+
function SkillLibraryDetail({
|
|
3651
|
+
skill,
|
|
3652
|
+
instructions,
|
|
3653
|
+
isLoading,
|
|
3654
|
+
actions,
|
|
3655
|
+
icon
|
|
3656
|
+
}) {
|
|
3657
|
+
const fields = skill.workflow.inputs;
|
|
3658
|
+
const isOwner = skill.source === "mine";
|
|
3659
|
+
const canCopy = skill.source !== "mine";
|
|
3660
|
+
const notice = skill.replacesBuiltin ? "Your copy is used instead of the original; delete it to go back." : skill.isShared ? "Shared with everyone." : void 0;
|
|
3661
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3662
|
+
SkillDetail,
|
|
3663
|
+
{
|
|
3664
|
+
title: skill.title,
|
|
3665
|
+
sourceLabel: SKILL_SOURCE_LABELS[skill.source],
|
|
3666
|
+
description: skill.description,
|
|
3667
|
+
icon,
|
|
3668
|
+
notice,
|
|
3669
|
+
testId: "skill-detail",
|
|
3670
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3671
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: actions.onRun, className: ACTION, "data-testid": "skill-run", children: [
|
|
3672
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Play, { className: "mr-1.5 size-4" }),
|
|
3673
|
+
"Run"
|
|
3674
|
+
] }),
|
|
3675
|
+
canCopy && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3676
|
+
ui.Button,
|
|
3677
|
+
{
|
|
3678
|
+
variant: "outline",
|
|
3679
|
+
onClick: actions.onCopy,
|
|
3680
|
+
disabled: actions.isBusy,
|
|
3681
|
+
className: ACTION,
|
|
3682
|
+
"data-testid": "skill-copy",
|
|
3683
|
+
children: [
|
|
3684
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "mr-1.5 size-4" }),
|
|
3685
|
+
"Make a copy"
|
|
3686
|
+
]
|
|
3687
|
+
}
|
|
3688
|
+
),
|
|
3689
|
+
isOwner && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3690
|
+
ui.Button,
|
|
3691
|
+
{
|
|
3692
|
+
variant: "outline",
|
|
3693
|
+
onClick: actions.onEdit,
|
|
3694
|
+
className: ACTION,
|
|
3695
|
+
"data-testid": "skill-edit",
|
|
3696
|
+
children: [
|
|
3697
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "mr-1.5 size-4" }),
|
|
3698
|
+
"Edit"
|
|
3699
|
+
]
|
|
3700
|
+
}
|
|
3701
|
+
),
|
|
3702
|
+
isOwner && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3703
|
+
ui.Button,
|
|
3704
|
+
{
|
|
3705
|
+
variant: "outline",
|
|
3706
|
+
onClick: actions.onToggleShare,
|
|
3707
|
+
disabled: actions.isBusy,
|
|
3708
|
+
className: ACTION,
|
|
3709
|
+
"data-testid": "skill-share",
|
|
3710
|
+
children: [
|
|
3711
|
+
skill.isShared ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "mr-1.5 size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "mr-1.5 size-4" }),
|
|
3712
|
+
skill.isShared ? "Make private" : "Share with everyone"
|
|
3713
|
+
]
|
|
3714
|
+
}
|
|
3715
|
+
),
|
|
3716
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3717
|
+
ui.Button,
|
|
3718
|
+
{
|
|
3719
|
+
variant: "outline",
|
|
3720
|
+
onClick: actions.onExport,
|
|
3721
|
+
className: ACTION,
|
|
3722
|
+
"data-testid": "skill-export",
|
|
3723
|
+
children: [
|
|
3724
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "mr-1.5 size-4" }),
|
|
3725
|
+
"Export"
|
|
3726
|
+
]
|
|
3727
|
+
}
|
|
3728
|
+
),
|
|
3729
|
+
isOwner && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3730
|
+
ui.Button,
|
|
3731
|
+
{
|
|
3732
|
+
variant: "ghost",
|
|
3733
|
+
onClick: actions.onDelete,
|
|
3734
|
+
disabled: actions.isBusy,
|
|
3735
|
+
className: `${ACTION} ml-auto text-destructive`,
|
|
3736
|
+
"data-testid": "skill-delete",
|
|
3737
|
+
children: [
|
|
3738
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "mr-1.5 size-4" }),
|
|
3739
|
+
"Delete"
|
|
3740
|
+
]
|
|
3741
|
+
}
|
|
3742
|
+
)
|
|
3743
|
+
] }),
|
|
3744
|
+
children: [
|
|
3745
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkillDetailSection, { title: "What it asks you", testId: "skill-inputs", children: fields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Nothing: it starts right away." }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1 text-sm", children: fields.map((field) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-wrap items-baseline gap-x-2", children: [
|
|
3746
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: field.label }),
|
|
3747
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
3748
|
+
SKILL_FIELD_TYPE_LABELS[field.type],
|
|
3749
|
+
field.required ? "" : ", optional"
|
|
3750
|
+
] })
|
|
3751
|
+
] }, field.name)) }) }),
|
|
3752
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3753
|
+
SkillDetailSection,
|
|
3754
|
+
{
|
|
3755
|
+
title: skill.type === "markdown" ? "Instructions" : `Instructions (${SKILL_TYPE_LABELS[skill.type] ?? skill.type})`,
|
|
3756
|
+
children: [
|
|
3757
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Loading\u2026" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3758
|
+
"pre",
|
|
3759
|
+
{
|
|
3760
|
+
className: "max-h-72 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs",
|
|
3761
|
+
tabIndex: 0,
|
|
3762
|
+
"aria-label": "Instructions",
|
|
3763
|
+
"data-testid": "skill-instructions",
|
|
3764
|
+
children: instructions || "No instructions."
|
|
3765
|
+
}
|
|
3766
|
+
),
|
|
3767
|
+
!isOwner && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "You can read these. Make a copy to change them." })
|
|
3768
|
+
]
|
|
3769
|
+
}
|
|
3770
|
+
)
|
|
3771
|
+
]
|
|
3772
|
+
}
|
|
3773
|
+
);
|
|
3774
|
+
}
|
|
3179
3775
|
function PersonPill({ person, size = "sm", testId }) {
|
|
3180
3776
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": testId, className: "inline-flex min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3181
3777
|
ui.UserEntity,
|
|
@@ -3944,12 +4540,12 @@ function taskActivityHeadline(e, labels = DEFAULT_TASK_ACTIVITY_LABELS, agentNam
|
|
|
3944
4540
|
case "step_skipped":
|
|
3945
4541
|
return "Step skipped";
|
|
3946
4542
|
case "step_waiting": {
|
|
3947
|
-
const documents =
|
|
3948
|
-
return documents ?
|
|
4543
|
+
const documents = chunkOWCEQKAR_cjs.eventWaitingDocuments(detail);
|
|
4544
|
+
return documents ? chunkOWCEQKAR_cjs.waitingForDocumentsText(documents.length) : "Waiting on people";
|
|
3949
4545
|
}
|
|
3950
4546
|
case "step_progress": {
|
|
3951
|
-
const documents =
|
|
3952
|
-
return documents ?
|
|
4547
|
+
const documents = chunkOWCEQKAR_cjs.eventWaitingDocuments(detail);
|
|
4548
|
+
return documents ? chunkOWCEQKAR_cjs.waitingForDocumentsText(documents.length) : detail.signed ? "Signed" : "Step moved on";
|
|
3953
4549
|
}
|
|
3954
4550
|
case "step_sent_back":
|
|
3955
4551
|
return "Sent the work back";
|
|
@@ -4056,6 +4652,10 @@ exports.ApprovalEvidence = ApprovalEvidence;
|
|
|
4056
4652
|
exports.AssigneeLine = AssigneeLine;
|
|
4057
4653
|
exports.DEFAULT_AGENT_SELECT_LABELS = DEFAULT_AGENT_SELECT_LABELS;
|
|
4058
4654
|
exports.DEFAULT_SCHEMA_FORM_LABELS = DEFAULT_SCHEMA_FORM_LABELS;
|
|
4655
|
+
exports.DEFAULT_SKILL_EDIT_FORM_LABELS = DEFAULT_SKILL_EDIT_FORM_LABELS;
|
|
4656
|
+
exports.DEFAULT_SKILL_GENERATE_FORM_LABELS = DEFAULT_SKILL_GENERATE_FORM_LABELS;
|
|
4657
|
+
exports.DEFAULT_SKILL_GLOBAL_BADGE_LABELS = DEFAULT_SKILL_GLOBAL_BADGE_LABELS;
|
|
4658
|
+
exports.DEFAULT_SKILL_VIEW_TOGGLE_LABELS = DEFAULT_SKILL_VIEW_TOGGLE_LABELS;
|
|
4059
4659
|
exports.DEFAULT_STEP_BAR_LABELS = DEFAULT_STEP_BAR_LABELS;
|
|
4060
4660
|
exports.DEFAULT_TASK_ACTIVITY_LABELS = DEFAULT_TASK_ACTIVITY_LABELS;
|
|
4061
4661
|
exports.DEFAULT_TASK_TRIGGER_CHIP_LABELS = DEFAULT_TASK_TRIGGER_CHIP_LABELS;
|
|
@@ -4065,13 +4665,27 @@ exports.DEFAULT_WORKFLOW_LIST_LABELS = DEFAULT_WORKFLOW_LIST_LABELS;
|
|
|
4065
4665
|
exports.DEFAULT_WORKFLOW_RUNNER_LABELS = DEFAULT_WORKFLOW_RUNNER_LABELS;
|
|
4066
4666
|
exports.DEFAULT_WORKFLOW_STEP_PARTS_LABELS = DEFAULT_WORKFLOW_STEP_PARTS_LABELS;
|
|
4067
4667
|
exports.PersonPill = PersonPill;
|
|
4668
|
+
exports.SKILL_FIELD_TYPE_LABELS = SKILL_FIELD_TYPE_LABELS;
|
|
4068
4669
|
exports.SKILL_MAIN_FILENAME = SKILL_MAIN_FILENAME;
|
|
4670
|
+
exports.SKILL_SOURCE_LABELS = SKILL_SOURCE_LABELS;
|
|
4069
4671
|
exports.SKILL_TYPES = SKILL_TYPES;
|
|
4672
|
+
exports.SKILL_TYPE_LABELS = SKILL_TYPE_LABELS;
|
|
4070
4673
|
exports.STEP_LABEL = STEP_LABEL;
|
|
4071
4674
|
exports.STEP_LABEL_CURRENT = STEP_LABEL_CURRENT;
|
|
4072
4675
|
exports.STEP_LABEL_MAX = STEP_LABEL_MAX;
|
|
4073
4676
|
exports.SchemaForm = SchemaForm;
|
|
4074
4677
|
exports.SendBackControl = SendBackControl;
|
|
4678
|
+
exports.SkillActionButton = SkillActionButton;
|
|
4679
|
+
exports.SkillDetail = SkillDetail;
|
|
4680
|
+
exports.SkillDetailSection = SkillDetailSection;
|
|
4681
|
+
exports.SkillEditForm = SkillEditForm;
|
|
4682
|
+
exports.SkillFilterChips = SkillFilterChips;
|
|
4683
|
+
exports.SkillGenerateForm = SkillGenerateForm;
|
|
4684
|
+
exports.SkillGlobalBadge = SkillGlobalBadge;
|
|
4685
|
+
exports.SkillLibraryDetail = SkillLibraryDetail;
|
|
4686
|
+
exports.SkillTile = SkillTile;
|
|
4687
|
+
exports.SkillTypeBadge = SkillTypeBadge;
|
|
4688
|
+
exports.SkillViewToggle = SkillViewToggle;
|
|
4075
4689
|
exports.StepBarFrame = StepBarFrame;
|
|
4076
4690
|
exports.TaskActivityTimeline = TaskActivityTimeline;
|
|
4077
4691
|
exports.TaskTriggerChip = TaskTriggerChip;
|
|
@@ -4082,11 +4696,14 @@ exports.WorkflowLauncher = WorkflowLauncher;
|
|
|
4082
4696
|
exports.WorkflowRunner = WorkflowRunner;
|
|
4083
4697
|
exports.WorkflowStepBar = WorkflowStepBar;
|
|
4084
4698
|
exports.WorkflowsTable = WorkflowsTable;
|
|
4699
|
+
exports.activateOnKey = activateOnKey;
|
|
4085
4700
|
exports.activeStepId = activeStepId;
|
|
4701
|
+
exports.buildLibrarySkills = buildLibrarySkills;
|
|
4086
4702
|
exports.buildWorkflowScopeSource = buildWorkflowScopeSource;
|
|
4087
4703
|
exports.buildZipSkillImport = buildZipSkillImport;
|
|
4088
4704
|
exports.createWorkflowColumns = createWorkflowColumns;
|
|
4089
4705
|
exports.documentScopeLabels = documentScopeLabels;
|
|
4706
|
+
exports.filterLibrarySkills = filterLibrarySkills;
|
|
4090
4707
|
exports.fromPlanAssignee = fromPlanAssignee;
|
|
4091
4708
|
exports.fromPlanDocumentRef = fromPlanDocumentRef;
|
|
4092
4709
|
exports.fromPlanSteps = fromPlanSteps;
|
|
@@ -4115,5 +4732,5 @@ exports.workflowRunStatusLabel = workflowRunStatusLabel;
|
|
|
4115
4732
|
exports.workflowStatus = workflowStatus;
|
|
4116
4733
|
exports.workflowToSkillMarkdown = workflowToSkillMarkdown;
|
|
4117
4734
|
exports.workflowTriggerType = workflowTriggerType;
|
|
4118
|
-
//# sourceMappingURL=chunk-
|
|
4119
|
-
//# sourceMappingURL=chunk-
|
|
4735
|
+
//# sourceMappingURL=chunk-3BI6EWKP.cjs.map
|
|
4736
|
+
//# sourceMappingURL=chunk-3BI6EWKP.cjs.map
|