@datatechsolutions/ui 2.11.17 → 2.11.19
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/astrlabe/contracts.d.mts +1 -1
- package/dist/astrlabe/contracts.d.ts +1 -1
- package/dist/astrlabe/index.js +260 -220
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +162 -122
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.js +2 -2
- package/dist/astrlabe/workflow-canvas.mjs +1 -1
- package/dist/{chunk-PNN6KWXQ.js → chunk-4X7ITYP2.js} +113 -16
- package/dist/chunk-4X7ITYP2.js.map +1 -0
- package/dist/{chunk-57OBMWRA.mjs → chunk-LIYKHVLG.mjs} +113 -16
- package/dist/chunk-LIYKHVLG.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-57OBMWRA.mjs.map +0 -1
- package/dist/chunk-PNN6KWXQ.js.map +0 -1
package/dist/astrlabe/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
require('../chunk-55H6WZQP.js');
|
|
5
5
|
var chunk3GE3MBUZ_js = require('../chunk-3GE3MBUZ.js');
|
|
6
|
-
var
|
|
6
|
+
var chunk4X7ITYP2_js = require('../chunk-4X7ITYP2.js');
|
|
7
7
|
var chunk4XID6LOC_js = require('../chunk-4XID6LOC.js');
|
|
8
8
|
require('../chunk-S7KHTUHA.js');
|
|
9
9
|
require('../chunk-UZ3CMNUJ.js');
|
|
@@ -83,7 +83,7 @@ function OutputCard({ label, value }) {
|
|
|
83
83
|
function AgentProfileHeader({ agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged }) {
|
|
84
84
|
const modelName = models.find((model) => model.id === selectedModelId)?.name ?? selectedModelId ?? "\u2014";
|
|
85
85
|
const avatarUrl = agent.avatar;
|
|
86
|
-
const frameworkMeta =
|
|
86
|
+
const frameworkMeta = chunk4X7ITYP2_js.getFrameworkMeta(selectedFramework);
|
|
87
87
|
const tierInfo = getEloTier(elo);
|
|
88
88
|
const difficultyConfig = {
|
|
89
89
|
beginner: { color: "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400", labelKey: "agentDrawer.tierBeginner" },
|
|
@@ -358,29 +358,13 @@ function AgentCapabilityCard({ elo, setElo, models, selectedModelId, setSelected
|
|
|
358
358
|
] })
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
function ConfigTab({
|
|
362
|
-
const
|
|
363
|
-
const
|
|
364
|
-
setTemperature(parseFloat(event.target.value));
|
|
365
|
-
markDirty();
|
|
366
|
-
}, []);
|
|
367
|
-
const handlePromptChange = react.useCallback((event) => {
|
|
368
|
-
setPromptText(event.target.value);
|
|
369
|
-
markDirty();
|
|
370
|
-
}, []);
|
|
371
|
-
react.useCallback(() => {
|
|
372
|
-
markSaved();
|
|
373
|
-
}, [markSaved]);
|
|
374
|
-
const temperaturePercent = temperature * 100;
|
|
375
|
-
const isPrecise = temperature <= 0.3;
|
|
376
|
-
const isBalanced = temperature > 0.3 && temperature <= 0.7;
|
|
377
|
-
const isCreative = temperature > 0.7;
|
|
378
|
-
const frameworkKeys = Object.keys(chunkPNN6KWXQ_js.FRAMEWORK_META);
|
|
379
|
-
const compatibleModels = chunkPNN6KWXQ_js.getCompatibleModels(models, selectedFramework);
|
|
361
|
+
function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework, markDirty }) {
|
|
362
|
+
const frameworkKeys = Object.keys(chunk4X7ITYP2_js.FRAMEWORK_META);
|
|
363
|
+
const compatibleModels = chunk4X7ITYP2_js.getCompatibleModels(models, selectedFramework);
|
|
380
364
|
const handleFrameworkChange = react.useCallback((newFramework) => {
|
|
381
365
|
setSelectedFramework(newFramework);
|
|
382
|
-
if (!
|
|
383
|
-
const compatible =
|
|
366
|
+
if (!chunk4X7ITYP2_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
|
|
367
|
+
const compatible = chunk4X7ITYP2_js.getCompatibleModels(models, newFramework);
|
|
384
368
|
if (compatible.length > 0) {
|
|
385
369
|
setSelectedModelId(compatible[0].id);
|
|
386
370
|
}
|
|
@@ -391,9 +375,9 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
391
375
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
392
376
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.framework") }),
|
|
393
377
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: frameworkKeys.map((key) => {
|
|
394
|
-
const meta =
|
|
378
|
+
const meta = chunk4X7ITYP2_js.FRAMEWORK_META[key];
|
|
395
379
|
const isSelected = key === selectedFramework;
|
|
396
|
-
const compatCount =
|
|
380
|
+
const compatCount = chunk4X7ITYP2_js.getCompatibleModels(models, key).length;
|
|
397
381
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
398
382
|
"button",
|
|
399
383
|
{
|
|
@@ -423,7 +407,7 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
423
407
|
] }),
|
|
424
408
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2", children: models.map((model) => {
|
|
425
409
|
const isSelected = model.id === selectedModelId;
|
|
426
|
-
const isCompatible =
|
|
410
|
+
const isCompatible = chunk4X7ITYP2_js.isModelCompatibleWithFramework(model.id, selectedFramework);
|
|
427
411
|
const { IconComponent, color, providerLabel } = getModelIcon(model.id);
|
|
428
412
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
429
413
|
"button",
|
|
@@ -446,7 +430,24 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
446
430
|
model.id
|
|
447
431
|
);
|
|
448
432
|
}) })
|
|
449
|
-
] })
|
|
433
|
+
] })
|
|
434
|
+
] });
|
|
435
|
+
}
|
|
436
|
+
function PromptTab({ agent, temperature, setTemperature, markDirty, t }) {
|
|
437
|
+
const [promptText, setPromptText] = react.useState(agent.systemPrompt ?? "");
|
|
438
|
+
const handleTemperatureChange = react.useCallback((event) => {
|
|
439
|
+
setTemperature(parseFloat(event.target.value));
|
|
440
|
+
markDirty();
|
|
441
|
+
}, []);
|
|
442
|
+
const handlePromptChange = react.useCallback((event) => {
|
|
443
|
+
setPromptText(event.target.value);
|
|
444
|
+
markDirty();
|
|
445
|
+
}, []);
|
|
446
|
+
const temperaturePercent = temperature * 100;
|
|
447
|
+
const isPrecise = temperature <= 0.3;
|
|
448
|
+
const isBalanced = temperature > 0.3 && temperature <= 0.7;
|
|
449
|
+
const isCreative = temperature > 0.7;
|
|
450
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5 p-4", children: [
|
|
450
451
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
451
452
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
452
453
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.temperature") }),
|
|
@@ -457,10 +458,7 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
457
458
|
"div",
|
|
458
459
|
{
|
|
459
460
|
className: "h-full rounded-full transition-all duration-300 ease-out",
|
|
460
|
-
style: {
|
|
461
|
-
width: `${temperaturePercent}%`,
|
|
462
|
-
background: `linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)`
|
|
463
|
-
}
|
|
461
|
+
style: { width: `${temperaturePercent}%`, background: "linear-gradient(90deg, #3b82f6, #8b5cf6 50%, #ec4899)" }
|
|
464
462
|
}
|
|
465
463
|
) }),
|
|
466
464
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -473,24 +471,12 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
473
471
|
value: temperature,
|
|
474
472
|
onChange: handleTemperatureChange,
|
|
475
473
|
"aria-label": t("agentDrawer.temperature"),
|
|
476
|
-
"aria-valuemin": 0,
|
|
477
|
-
"aria-valuemax": 1,
|
|
478
474
|
"aria-valuenow": temperature,
|
|
479
475
|
"aria-valuetext": `${temperature.toFixed(2)} \u2014 ${isPrecise ? t("agentDrawer.precise") : isBalanced ? t("agentDrawer.balanced") : t("agentDrawer.creative")}`,
|
|
480
|
-
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900"
|
|
481
|
-
style: {
|
|
482
|
-
// Thumb color based on temperature zone
|
|
483
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
484
|
-
["--thumb-color"]: isPrecise ? "#3b82f6" : isBalanced ? "#8b5cf6" : "#ec4899"
|
|
485
|
-
}
|
|
476
|
+
className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900"
|
|
486
477
|
}
|
|
487
478
|
),
|
|
488
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
489
|
-
input[type="range"]::-webkit-slider-thumb {
|
|
490
|
-
background: ${isPrecise ? "#3b82f6" : isBalanced ? "#8b5cf6" : "#ec4899"};
|
|
491
|
-
box-shadow: 0 0 8px ${isPrecise ? "rgba(59,130,246,0.5)" : isBalanced ? "rgba(139,92,246,0.5)" : "rgba(236,72,153,0.5)"};
|
|
492
|
-
}
|
|
493
|
-
` })
|
|
479
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `input[type="range"]::-webkit-slider-thumb { background: ${isPrecise ? "#3b82f6" : isBalanced ? "#8b5cf6" : "#ec4899"}; box-shadow: 0 0 8px ${isPrecise ? "rgba(59,130,246,0.5)" : isBalanced ? "rgba(139,92,246,0.5)" : "rgba(236,72,153,0.5)"}; }` })
|
|
494
480
|
] }),
|
|
495
481
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1 flex items-center justify-between", children: [
|
|
496
482
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] font-medium transition-colors ${isPrecise ? "text-blue-500" : "text-gray-400 dark:text-gray-500"}`, children: t("agentDrawer.precise") }),
|
|
@@ -511,7 +497,7 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
511
497
|
{
|
|
512
498
|
value: promptText,
|
|
513
499
|
onChange: handlePromptChange,
|
|
514
|
-
rows:
|
|
500
|
+
rows: 12,
|
|
515
501
|
className: "w-full resize-y rounded-lg border border-gray-200/50 bg-gray-50/50 px-3 py-2.5 font-mono text-xs leading-relaxed text-gray-700 outline-none transition-colors placeholder:text-gray-400 focus:border-indigo-300/50 focus:ring-1 focus:ring-indigo-300/30 dark:border-white/10 dark:bg-white/5 dark:text-gray-300 dark:placeholder:text-gray-500 dark:focus:border-indigo-500/30 dark:focus:ring-indigo-500/20",
|
|
516
502
|
placeholder: t("agentDrawer.systemPromptPlaceholder")
|
|
517
503
|
}
|
|
@@ -520,7 +506,7 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
520
506
|
] });
|
|
521
507
|
}
|
|
522
508
|
function ResultsTab({ agentId, t }) {
|
|
523
|
-
const nodeResults =
|
|
509
|
+
const nodeResults = chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodeResults);
|
|
524
510
|
const agentResult = react.useMemo(() => {
|
|
525
511
|
return nodeResults[agentId] ?? null;
|
|
526
512
|
}, [nodeResults, agentId]);
|
|
@@ -560,7 +546,7 @@ var PROVIDER_LOGOS = {
|
|
|
560
546
|
azure_openai: SI("microsoftazure", "0078D4"),
|
|
561
547
|
anthropic_api: SI("anthropic", "D4A27F")
|
|
562
548
|
};
|
|
563
|
-
function ModelsTab({ modelProviders, selectedProviderId, onSelectProvider, t }) {
|
|
549
|
+
function ModelsTab({ modelProviders, selectedProviderId, onSelectProvider, models, selectedModelId, onSelectModel, agentFramework, t }) {
|
|
564
550
|
if (modelProviders.length === 0) {
|
|
565
551
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
|
|
566
552
|
/* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "mb-2 h-8 w-8 text-gray-400 dark:text-gray-500" }),
|
|
@@ -568,35 +554,87 @@ function ModelsTab({ modelProviders, selectedProviderId, onSelectProvider, t })
|
|
|
568
554
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.dragProviderHint") })
|
|
569
555
|
] });
|
|
570
556
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
|
|
576
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
577
|
-
"button",
|
|
578
|
-
{
|
|
579
|
-
type: "button",
|
|
580
|
-
onClick: () => onSelectProvider(provider.id),
|
|
581
|
-
className: `flex w-full items-center gap-3 rounded-xl border px-4 py-3 text-left transition-all ${isSelected ? "border-rose-500/30 bg-rose-50/50 ring-1 ring-rose-500/20 dark:border-rose-400/20 dark:bg-rose-500/5" : "border-gray-200/50 bg-gray-50/30 hover:border-gray-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"}`,
|
|
582
|
-
children: [
|
|
583
|
-
logo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-white/10 p-1.5", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "", className: "h-6 w-6 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-rose-500 to-pink-600", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5 text-white" }) }),
|
|
584
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
585
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-sm font-medium ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: provider.name }),
|
|
586
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-0.5 flex items-center gap-2 text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
587
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
588
|
-
provider.modelCount,
|
|
589
|
-
" models"
|
|
590
|
-
] }),
|
|
591
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full px-1.5 py-0.5 text-[9px] font-medium ${provider.configured ? "bg-green-100 text-green-600 dark:bg-green-500/10 dark:text-green-400" : "bg-amber-100 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400"}`, children: provider.configured ? t("agentDrawer.providerConfigured") : t("agentDrawer.providerSetup") })
|
|
592
|
-
] })
|
|
593
|
-
] }),
|
|
594
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-all ${isSelected ? "bg-rose-500 text-white" : "border border-gray-300 dark:border-gray-600"}`, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-3 w-3" }) })
|
|
595
|
-
]
|
|
596
|
-
},
|
|
597
|
-
provider.id
|
|
598
|
-
);
|
|
557
|
+
const modelsByProvider = modelProviders.map((provider) => ({
|
|
558
|
+
provider,
|
|
559
|
+
models: models.filter((m) => {
|
|
560
|
+
const modelProvider = m.id.split(".")[0];
|
|
561
|
+
return provider.provider === modelProvider || provider.provider === "amazon" && modelProvider === "anthropic" || provider.provider === "amazon" && modelProvider === "amazon" || provider.provider === "amazon" && modelProvider === "meta";
|
|
599
562
|
})
|
|
563
|
+
}));
|
|
564
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4", children: [
|
|
565
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
566
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.selectProvider") }),
|
|
567
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: modelProviders.map((provider) => {
|
|
568
|
+
const isSelected = selectedProviderId === provider.id;
|
|
569
|
+
const logo = PROVIDER_LOGOS[provider.provider];
|
|
570
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
571
|
+
"button",
|
|
572
|
+
{
|
|
573
|
+
type: "button",
|
|
574
|
+
onClick: () => onSelectProvider(provider.id),
|
|
575
|
+
className: `flex w-full items-center gap-3 rounded-xl border px-3 py-2.5 text-left transition-all ${isSelected ? "border-indigo-500/30 bg-indigo-50/50 ring-1 ring-indigo-500/20 dark:border-indigo-400/20 dark:bg-indigo-500/5" : "border-gray-200/50 bg-gray-50/30 hover:border-gray-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"}`,
|
|
576
|
+
children: [
|
|
577
|
+
logo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-white/10 p-1", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "", className: "h-5 w-5 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-slate-500 to-gray-600", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-4 w-4 text-white" }) }),
|
|
578
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
579
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xs font-medium ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: provider.name }),
|
|
580
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
581
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
582
|
+
provider.modelCount,
|
|
583
|
+
" models"
|
|
584
|
+
] }),
|
|
585
|
+
provider.configured && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-green-500" })
|
|
586
|
+
] })
|
|
587
|
+
] }),
|
|
588
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-full transition-all ${isSelected ? "bg-indigo-500 text-white" : "border border-gray-300 dark:border-gray-600"}`, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-2.5 w-2.5" }) })
|
|
589
|
+
]
|
|
590
|
+
},
|
|
591
|
+
provider.id
|
|
592
|
+
);
|
|
593
|
+
}) })
|
|
594
|
+
] }),
|
|
595
|
+
selectedProviderId && (() => {
|
|
596
|
+
const providerModels = modelsByProvider.find((p) => p.provider.id === selectedProviderId);
|
|
597
|
+
if (!providerModels || providerModels.models.length === 0) return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.noModelsForProvider") });
|
|
598
|
+
const compatibleModels = providerModels.models.filter(
|
|
599
|
+
(m) => chunk4X7ITYP2_js.isModelCompatibleWithFramework(m.id, agentFramework)
|
|
600
|
+
);
|
|
601
|
+
const incompatibleModels = providerModels.models.filter(
|
|
602
|
+
(m) => !chunk4X7ITYP2_js.isModelCompatibleWithFramework(m.id, agentFramework)
|
|
603
|
+
);
|
|
604
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
605
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.selectModel") }),
|
|
606
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
607
|
+
compatibleModels.map((model) => {
|
|
608
|
+
const isSelected = selectedModelId === model.id;
|
|
609
|
+
const { IconComponent, color, providerLabel } = getModelIcon(model.id);
|
|
610
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
611
|
+
"button",
|
|
612
|
+
{
|
|
613
|
+
type: "button",
|
|
614
|
+
onClick: () => onSelectModel(model.id),
|
|
615
|
+
className: `flex w-full items-center gap-2.5 rounded-lg border px-3 py-2 text-left transition-all ${isSelected ? "border-indigo-500/50 bg-indigo-50/50 ring-1 ring-indigo-500/30 dark:border-indigo-400/40 dark:bg-indigo-500/10" : "border-gray-200/50 bg-gray-50/50 hover:border-gray-300 dark:border-white/10 dark:bg-white/5 dark:hover:border-white/20"}`,
|
|
616
|
+
children: [
|
|
617
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: `h-4 w-4 flex-shrink-0 ${isSelected ? color : "text-gray-400 dark:text-gray-500"}` }),
|
|
618
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
619
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-xs font-semibold ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-300"}`, children: model.name }),
|
|
620
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: providerLabel })
|
|
621
|
+
] }),
|
|
622
|
+
isSelected && /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-3.5 w-3.5 shrink-0 text-indigo-500" })
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
model.id
|
|
626
|
+
);
|
|
627
|
+
}),
|
|
628
|
+
incompatibleModels.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
629
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 mb-1 text-[9px] font-medium text-gray-400 dark:text-gray-500", children: t("agentDrawer.incompatibleWithFramework") }),
|
|
630
|
+
incompatibleModels.map((model) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5 rounded-lg border border-gray-200/30 px-3 py-2 opacity-40 dark:border-white/5", children: [
|
|
631
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4 text-gray-400" }),
|
|
632
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: model.name })
|
|
633
|
+
] }, model.id))
|
|
634
|
+
] })
|
|
635
|
+
] })
|
|
636
|
+
] });
|
|
637
|
+
})()
|
|
600
638
|
] });
|
|
601
639
|
}
|
|
602
640
|
function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
@@ -634,7 +672,7 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
|
634
672
|
] }),
|
|
635
673
|
tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.description }),
|
|
636
674
|
tool.compatibleFrameworks && tool.compatibleFrameworks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap gap-0.5", children: tool.compatibleFrameworks.map((framework) => {
|
|
637
|
-
const meta =
|
|
675
|
+
const meta = chunk4X7ITYP2_js.getFrameworkMeta(framework);
|
|
638
676
|
const isCurrentFw = framework === agentFramework;
|
|
639
677
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[8px] font-medium ${isCurrentFw ? meta.badgeColor : "bg-gray-100 text-gray-500 dark:bg-white/5 dark:text-gray-400"}`, children: [
|
|
640
678
|
/* @__PURE__ */ jsxRuntime.jsx(meta.IconComponent, { className: "h-2.5 w-2.5" }),
|
|
@@ -652,15 +690,15 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
|
652
690
|
}
|
|
653
691
|
function AgentModal({ onSaved }) {
|
|
654
692
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
655
|
-
const activeModal =
|
|
656
|
-
const agentData =
|
|
657
|
-
const closeModal =
|
|
693
|
+
const activeModal = chunk4X7ITYP2_js.useModalStore((s) => s.activeModal);
|
|
694
|
+
const agentData = chunk4X7ITYP2_js.useModalStore((s) => s.agentData);
|
|
695
|
+
const closeModal = chunk4X7ITYP2_js.useModalStore((s) => s.closeModal);
|
|
658
696
|
const open = activeModal === "agent";
|
|
659
697
|
const agent = agentData?.agent ?? null;
|
|
660
698
|
const models = agentData?.models ?? [];
|
|
661
699
|
const availableAgentTools = agentData?.agentTools ?? [];
|
|
662
700
|
const isCreateMode = agentData?.isCreateMode ?? false;
|
|
663
|
-
const [activeTab, setActiveTab] = react.useState("
|
|
701
|
+
const [activeTab, setActiveTab] = react.useState("profile");
|
|
664
702
|
const [selectedModelId, setSelectedModelId] = react.useState("");
|
|
665
703
|
const [selectedFramework, setSelectedFramework] = react.useState("custom");
|
|
666
704
|
const [temperature, setTemperature] = react.useState(0.7);
|
|
@@ -677,7 +715,7 @@ function AgentModal({ onSaved }) {
|
|
|
677
715
|
setTemperature(agent.temperature ?? 0.7);
|
|
678
716
|
setElo(Number(agent.elo ?? 1e3));
|
|
679
717
|
setSaved(!isCreateMode);
|
|
680
|
-
setActiveTab("
|
|
718
|
+
setActiveTab("profile");
|
|
681
719
|
const agentToolIds = agent.agentToolIds;
|
|
682
720
|
setEnabledToolIds(new Set(agentToolIds ?? availableAgentTools.filter((t2) => t2.enabled).map((t2) => t2.agentToolId)));
|
|
683
721
|
setSelectedProviderId(agent.modelProviderId ?? "");
|
|
@@ -706,64 +744,66 @@ function AgentModal({ onSaved }) {
|
|
|
706
744
|
onSaved?.();
|
|
707
745
|
}, [markSaved, onSaved]);
|
|
708
746
|
if (!agent) return null;
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
"
|
|
712
|
-
{
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
type: "button",
|
|
731
|
-
onClick: handleClose,
|
|
732
|
-
className: "rounded-lg border border-gray-200/50 px-4 py-2 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-100/50 dark:border-white/10 dark:text-gray-300 dark:hover:bg-white/5",
|
|
733
|
-
children: t("agentDrawer.cancel")
|
|
734
|
-
}
|
|
735
|
-
),
|
|
736
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
737
|
-
"button",
|
|
738
|
-
{
|
|
739
|
-
type: "button",
|
|
740
|
-
onClick: handleMarkSaved,
|
|
741
|
-
disabled: !dirty,
|
|
742
|
-
className: `rounded-lg px-4 py-2 text-xs font-semibold text-white shadow-sm transition-all ${dirty ? "bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
|
|
743
|
-
children: t("agentDrawer.save")
|
|
744
|
-
}
|
|
745
|
-
)
|
|
746
|
-
] })
|
|
747
|
+
const sections = [
|
|
748
|
+
{ id: "profile", label: t("agentDrawer.profileSection"), icon: outline.UserCircleIcon, group: t("agentDrawer.agentGroup") },
|
|
749
|
+
{ id: "framework", label: t("agentDrawer.frameworkSection"), icon: outline.Cog6ToothIcon, group: t("agentDrawer.agentGroup") },
|
|
750
|
+
{ id: "prompt", label: t("agentDrawer.promptSection"), icon: outline.SparklesIcon, group: t("agentDrawer.agentGroup") },
|
|
751
|
+
{ id: "tools", label: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`, icon: outline.CommandLineIcon, group: t("agentDrawer.configGroup") },
|
|
752
|
+
{ id: "models", label: `${t("agentDrawer.modelsTab")}${selectedProviderId ? " \u2713" : ""}`, icon: outline.KeyIcon, group: t("agentDrawer.configGroup") },
|
|
753
|
+
{ id: "results", label: t("agentDrawer.resultsTab"), icon: outline.PlayCircleIcon, group: t("agentDrawer.executionGroup") }
|
|
754
|
+
];
|
|
755
|
+
const avatarUrl = agent.avatar;
|
|
756
|
+
const sidebarFooter = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [
|
|
757
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", className: "flex-1 text-xs", children: dirty ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-amber-500 dark:text-amber-400", children: t("agentDrawer.unsavedChanges") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-emerald-500 dark:text-emerald-400", children: t("agentDrawer.saved") }) }),
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
759
|
+
"button",
|
|
760
|
+
{
|
|
761
|
+
type: "button",
|
|
762
|
+
onClick: handleMarkSaved,
|
|
763
|
+
disabled: !dirty,
|
|
764
|
+
className: `rounded-lg px-3 py-1.5 text-xs font-semibold text-white shadow-sm transition-all ${dirty ? "bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
|
|
765
|
+
children: t("agentDrawer.save")
|
|
766
|
+
}
|
|
767
|
+
)
|
|
747
768
|
] });
|
|
748
769
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
749
|
-
chunk4XID6LOC_js.
|
|
770
|
+
chunk4XID6LOC_js.SettingsDialog,
|
|
750
771
|
{
|
|
751
772
|
open,
|
|
752
773
|
onClose: handleClose,
|
|
753
774
|
title: agent.name,
|
|
754
|
-
subtitle:
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
775
|
+
subtitle: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
|
|
776
|
+
sections,
|
|
777
|
+
activeSectionId: activeTab,
|
|
778
|
+
onSectionChange: (sectionId) => setActiveTab(sectionId),
|
|
779
|
+
identity: {
|
|
780
|
+
displayName: agent.name,
|
|
781
|
+
profileInitial: agent.name.charAt(0).toUpperCase(),
|
|
782
|
+
avatarUrl,
|
|
783
|
+
role: agent.role
|
|
784
|
+
},
|
|
785
|
+
sidebarFooter,
|
|
762
786
|
children: [
|
|
763
|
-
/* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
|
|
764
|
-
activeTab === "
|
|
787
|
+
activeTab === "profile" && /* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
|
|
788
|
+
activeTab === "framework" && /* @__PURE__ */ jsxRuntime.jsx(ConfigTab, { models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework: (fw) => setSelectedFramework(fw), markDirty }),
|
|
789
|
+
activeTab === "prompt" && /* @__PURE__ */ jsxRuntime.jsx(PromptTab, { agent, temperature, setTemperature, markDirty, t }),
|
|
765
790
|
activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
|
|
766
|
-
activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
791
|
+
activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
792
|
+
ModelsTab,
|
|
793
|
+
{
|
|
794
|
+
modelProviders: availableModelProviders,
|
|
795
|
+
selectedProviderId,
|
|
796
|
+
onSelectProvider: handleSelectProvider,
|
|
797
|
+
models,
|
|
798
|
+
selectedModelId,
|
|
799
|
+
onSelectModel: (modelId) => {
|
|
800
|
+
setSelectedModelId(modelId);
|
|
801
|
+
markDirty();
|
|
802
|
+
},
|
|
803
|
+
agentFramework: selectedFramework,
|
|
804
|
+
t
|
|
805
|
+
}
|
|
806
|
+
),
|
|
767
807
|
activeTab === "results" && /* @__PURE__ */ jsxRuntime.jsx(ResultsTab, { agentId: agent.agentId, t })
|
|
768
808
|
]
|
|
769
809
|
}
|
|
@@ -874,7 +914,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
874
914
|
const markDirty = useSubworkflowStore((s) => s.markDirty);
|
|
875
915
|
const markSaved = useSubworkflowStore((s) => s.markSaved);
|
|
876
916
|
const closeModal = useSubworkflowStore((s) => s.closeModal);
|
|
877
|
-
const agentBehind =
|
|
917
|
+
const agentBehind = chunk4X7ITYP2_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
|
|
878
918
|
const isCreateMode = !tool?.toolId;
|
|
879
919
|
const initialGraph = react.useMemo(() => {
|
|
880
920
|
const config = tool?.config;
|
|
@@ -903,9 +943,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
903
943
|
}, [tool, onSaved, name, category, description, timeoutMs, latestGraphRef, markSaved]);
|
|
904
944
|
if (!tool) return null;
|
|
905
945
|
const categoryKey = category ?? "external";
|
|
906
|
-
const gradient = tool.color ??
|
|
907
|
-
const categoryPill =
|
|
908
|
-
const IconComponent =
|
|
946
|
+
const gradient = tool.color ?? chunk4X7ITYP2_js.CATEGORY_COLORS[categoryKey] ?? chunk4X7ITYP2_js.CATEGORY_COLORS.external;
|
|
947
|
+
const categoryPill = chunk4X7ITYP2_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunk4X7ITYP2_js.CATEGORY_PILL_COLORS.external;
|
|
948
|
+
const IconComponent = chunk4X7ITYP2_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
|
|
909
949
|
const graph = latestGraphRef.current;
|
|
910
950
|
const startNode = graph.nodes.find((n) => n.type === "start");
|
|
911
951
|
const endNode = graph.nodes.find((n) => n.type === "end");
|
|
@@ -970,7 +1010,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
970
1010
|
{
|
|
971
1011
|
type: "button",
|
|
972
1012
|
onClick: () => setCategory(cat),
|
|
973
|
-
className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${
|
|
1013
|
+
className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunk4X7ITYP2_js.CATEGORY_PILL_COLORS[cat] ?? chunk4X7ITYP2_js.CATEGORY_PILL_COLORS.external} ring-1 ring-current/20` : "bg-white/30 text-gray-500 hover:bg-white/50 dark:bg-white/5 dark:text-gray-400"}`,
|
|
974
1014
|
children: cat
|
|
975
1015
|
},
|
|
976
1016
|
cat
|
|
@@ -1057,7 +1097,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
1057
1097
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto" })
|
|
1058
1098
|
] }),
|
|
1059
1099
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1060
|
-
|
|
1100
|
+
chunk4X7ITYP2_js.WorkflowCanvas,
|
|
1061
1101
|
{
|
|
1062
1102
|
initialGraph,
|
|
1063
1103
|
agents: [],
|
|
@@ -1115,9 +1155,9 @@ function WorkspaceModal({
|
|
|
1115
1155
|
}
|
|
1116
1156
|
function PipelineSettingsModal({ onSave }) {
|
|
1117
1157
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
1118
|
-
const activeModal =
|
|
1119
|
-
const data =
|
|
1120
|
-
const closeModal =
|
|
1158
|
+
const activeModal = chunk4X7ITYP2_js.useModalStore((s) => s.activeModal);
|
|
1159
|
+
const data = chunk4X7ITYP2_js.useModalStore((s) => s.pipelineSettingsData);
|
|
1160
|
+
const closeModal = chunk4X7ITYP2_js.useModalStore((s) => s.closeModal);
|
|
1121
1161
|
const open = activeModal === "pipeline-settings";
|
|
1122
1162
|
const [nameValue, setNameValue] = react.useState("");
|
|
1123
1163
|
const [descriptionValue, setDescriptionValue] = react.useState("");
|
|
@@ -1326,8 +1366,8 @@ function CollapsibleSection({ title, icon, colorClass, defaultOpen = true, count
|
|
|
1326
1366
|
] });
|
|
1327
1367
|
}
|
|
1328
1368
|
function LogicNodeItemCard({ item, translationFunction }) {
|
|
1329
|
-
const IconComponent =
|
|
1330
|
-
const gradient =
|
|
1369
|
+
const IconComponent = chunk4X7ITYP2_js.LOGIC_ICON_MAP[item.nodeType];
|
|
1370
|
+
const gradient = chunk4X7ITYP2_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
|
|
1331
1371
|
const defaultConfig = chunkPWBWP5FJ_js.createDefaultLogicNodeConfig(item.nodeType);
|
|
1332
1372
|
const configJson = defaultConfig ? JSON.stringify(defaultConfig) : void 0;
|
|
1333
1373
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1548,8 +1588,8 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1548
1588
|
limit: entity.defaultLimit
|
|
1549
1589
|
});
|
|
1550
1590
|
const dsLogo = getDatasourceLogo(entity.id);
|
|
1551
|
-
const EntityIcon =
|
|
1552
|
-
const entityGradient =
|
|
1591
|
+
const EntityIcon = chunk4X7ITYP2_js.getEntityIcon(entity.id);
|
|
1592
|
+
const entityGradient = chunk4X7ITYP2_js.getEntityGradient(entity.id);
|
|
1553
1593
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1554
1594
|
"div",
|
|
1555
1595
|
{
|
|
@@ -1931,9 +1971,9 @@ function formatDuration2(durationMs) {
|
|
|
1931
1971
|
}
|
|
1932
1972
|
function RunPanel({ open, onClose, onRun, onStop }) {
|
|
1933
1973
|
const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.runPanel");
|
|
1934
|
-
const nodes =
|
|
1935
|
-
const isRunning =
|
|
1936
|
-
const nodeResults =
|
|
1974
|
+
const nodes = chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodes);
|
|
1975
|
+
const isRunning = chunk4X7ITYP2_js.useWorkflowStore((state) => state.isRunning);
|
|
1976
|
+
const nodeResults = chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodeResults);
|
|
1937
1977
|
const startNode = nodes.find((node) => node.type === "start");
|
|
1938
1978
|
const hasEndNode = nodes.some((node) => node.type === "end");
|
|
1939
1979
|
const hasValidStartConfig = Boolean(
|
|
@@ -2218,8 +2258,8 @@ function inferVariables(config, nodeType) {
|
|
|
2218
2258
|
}
|
|
2219
2259
|
function VariableInspector({ open, onClose }) {
|
|
2220
2260
|
const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.variableInspector");
|
|
2221
|
-
const nodes =
|
|
2222
|
-
const edges =
|
|
2261
|
+
const nodes = chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodes);
|
|
2262
|
+
const edges = chunk4X7ITYP2_js.useWorkflowStore((state) => state.edges);
|
|
2223
2263
|
const [expandedNodes, setExpandedNodes] = react.useState(/* @__PURE__ */ new Set());
|
|
2224
2264
|
const toggleNodeExpansion = react.useCallback((nodeId) => {
|
|
2225
2265
|
setExpandedNodes((current) => {
|
|
@@ -2281,8 +2321,8 @@ function VariableInspector({ open, onClose }) {
|
|
|
2281
2321
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: translations("noNodes") })
|
|
2282
2322
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: nodeVariableEntries.map((entry) => {
|
|
2283
2323
|
const isExpanded = expandedNodes.has(entry.nodeId);
|
|
2284
|
-
const IconComponent =
|
|
2285
|
-
const gradient =
|
|
2324
|
+
const IconComponent = chunk4X7ITYP2_js.LOGIC_ICON_MAP[entry.nodeType];
|
|
2325
|
+
const gradient = chunk4X7ITYP2_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
|
|
2286
2326
|
const inputVariables = entry.variables.filter((variable) => variable.direction === "input");
|
|
2287
2327
|
const outputVariables = entry.variables.filter((variable) => variable.direction === "output");
|
|
2288
2328
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `variable-node-${entry.nodeId}`, children: [
|
|
@@ -2348,7 +2388,7 @@ function RunInputDialog({
|
|
|
2348
2388
|
onRun
|
|
2349
2389
|
}) {
|
|
2350
2390
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow.runInputDialog");
|
|
2351
|
-
const nodes =
|
|
2391
|
+
const nodes = chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodes);
|
|
2352
2392
|
const [values, setValues] = react.useState({});
|
|
2353
2393
|
const inputVariableNames = react.useMemo(() => {
|
|
2354
2394
|
const storeStartNode = nodes.find((node) => node.type === "start");
|
|
@@ -2430,8 +2470,8 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
2430
2470
|
const [isLoadingRuns, setIsLoadingRuns] = react.useState(false);
|
|
2431
2471
|
const [selectedRun, setSelectedRun] = react.useState(null);
|
|
2432
2472
|
const [selectedNode, setSelectedNode] = react.useState(null);
|
|
2433
|
-
const isRunning =
|
|
2434
|
-
const nodeResults =
|
|
2473
|
+
const isRunning = chunk4X7ITYP2_js.useWorkflowStore((state) => state.isRunning);
|
|
2474
|
+
const nodeResults = chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodeResults);
|
|
2435
2475
|
const refreshRuns = react.useCallback(async () => {
|
|
2436
2476
|
setIsLoadingRuns(true);
|
|
2437
2477
|
try {
|
|
@@ -2587,7 +2627,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
|
|
|
2587
2627
|
onAutoSaveGraph(graph);
|
|
2588
2628
|
}, [onAutoSaveGraph, onGraphSnapshot]);
|
|
2589
2629
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2590
|
-
|
|
2630
|
+
chunk4X7ITYP2_js.Workspace,
|
|
2591
2631
|
{
|
|
2592
2632
|
...workspaceProps,
|
|
2593
2633
|
onGraphChange: handleGraphChange
|
|
@@ -2960,14 +3000,14 @@ function DslImportModal({ open, onClose, onImport }) {
|
|
|
2960
3000
|
}
|
|
2961
3001
|
|
|
2962
3002
|
// src/astrlabe/store/selectors.ts
|
|
2963
|
-
var useCanUndo = () =>
|
|
2964
|
-
var useCanRedo = () =>
|
|
2965
|
-
var useHasCopied = () =>
|
|
2966
|
-
var useContextMenu = () =>
|
|
2967
|
-
var useEditingNodeId = () =>
|
|
2968
|
-
var useSelectedNodeCount = () =>
|
|
2969
|
-
var useIsRunning = () =>
|
|
2970
|
-
var useNodeResults = () =>
|
|
3003
|
+
var useCanUndo = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.past.length > 0);
|
|
3004
|
+
var useCanRedo = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.future.length > 0);
|
|
3005
|
+
var useHasCopied = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.clipboard !== null);
|
|
3006
|
+
var useContextMenu = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.contextMenu);
|
|
3007
|
+
var useEditingNodeId = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.editingNodeId);
|
|
3008
|
+
var useSelectedNodeCount = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
|
|
3009
|
+
var useIsRunning = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.isRunning);
|
|
3010
|
+
var useNodeResults = () => chunk4X7ITYP2_js.useWorkflowStore((state) => state.nodeResults);
|
|
2971
3011
|
var DEFAULT_MAX_HISTORY = 50;
|
|
2972
3012
|
function useUndoRedo(nodes, edges, setNodes, setEdges, maxHistory = DEFAULT_MAX_HISTORY) {
|
|
2973
3013
|
const pastRef = react.useRef([]);
|
|
@@ -3255,227 +3295,227 @@ Object.defineProperty(exports, "validateWorkflowGraph", {
|
|
|
3255
3295
|
});
|
|
3256
3296
|
Object.defineProperty(exports, "AgentFlowNode", {
|
|
3257
3297
|
enumerable: true,
|
|
3258
|
-
get: function () { return
|
|
3298
|
+
get: function () { return chunk4X7ITYP2_js.AgentFlowNode; }
|
|
3259
3299
|
});
|
|
3260
3300
|
Object.defineProperty(exports, "AgentToolFlowNode", {
|
|
3261
3301
|
enumerable: true,
|
|
3262
|
-
get: function () { return
|
|
3302
|
+
get: function () { return chunk4X7ITYP2_js.AgentToolFlowNode; }
|
|
3263
3303
|
});
|
|
3264
3304
|
Object.defineProperty(exports, "AnswerFlowNode", {
|
|
3265
3305
|
enumerable: true,
|
|
3266
|
-
get: function () { return
|
|
3306
|
+
get: function () { return chunk4X7ITYP2_js.AnswerFlowNode; }
|
|
3267
3307
|
});
|
|
3268
3308
|
Object.defineProperty(exports, "AnthropicIcon", {
|
|
3269
3309
|
enumerable: true,
|
|
3270
|
-
get: function () { return
|
|
3310
|
+
get: function () { return chunk4X7ITYP2_js.AnthropicIcon; }
|
|
3271
3311
|
});
|
|
3272
3312
|
Object.defineProperty(exports, "CodeFlowNode", {
|
|
3273
3313
|
enumerable: true,
|
|
3274
|
-
get: function () { return
|
|
3314
|
+
get: function () { return chunk4X7ITYP2_js.CodeFlowNode; }
|
|
3275
3315
|
});
|
|
3276
3316
|
Object.defineProperty(exports, "CrewAIIcon", {
|
|
3277
3317
|
enumerable: true,
|
|
3278
|
-
get: function () { return
|
|
3318
|
+
get: function () { return chunk4X7ITYP2_js.CrewAIIcon; }
|
|
3279
3319
|
});
|
|
3280
3320
|
Object.defineProperty(exports, "DocumentExtractorFlowNode", {
|
|
3281
3321
|
enumerable: true,
|
|
3282
|
-
get: function () { return
|
|
3322
|
+
get: function () { return chunk4X7ITYP2_js.DocumentExtractorFlowNode; }
|
|
3283
3323
|
});
|
|
3284
3324
|
Object.defineProperty(exports, "EndFlowNode", {
|
|
3285
3325
|
enumerable: true,
|
|
3286
|
-
get: function () { return
|
|
3326
|
+
get: function () { return chunk4X7ITYP2_js.EndFlowNode; }
|
|
3287
3327
|
});
|
|
3288
3328
|
Object.defineProperty(exports, "EntityFlowNode", {
|
|
3289
3329
|
enumerable: true,
|
|
3290
|
-
get: function () { return
|
|
3330
|
+
get: function () { return chunk4X7ITYP2_js.EntityFlowNode; }
|
|
3291
3331
|
});
|
|
3292
3332
|
Object.defineProperty(exports, "FRAMEWORK_META", {
|
|
3293
3333
|
enumerable: true,
|
|
3294
|
-
get: function () { return
|
|
3334
|
+
get: function () { return chunk4X7ITYP2_js.FRAMEWORK_META; }
|
|
3295
3335
|
});
|
|
3296
3336
|
Object.defineProperty(exports, "GoogleADKIcon", {
|
|
3297
3337
|
enumerable: true,
|
|
3298
|
-
get: function () { return
|
|
3338
|
+
get: function () { return chunk4X7ITYP2_js.GoogleADKIcon; }
|
|
3299
3339
|
});
|
|
3300
3340
|
Object.defineProperty(exports, "GroupFlowNode", {
|
|
3301
3341
|
enumerable: true,
|
|
3302
|
-
get: function () { return
|
|
3342
|
+
get: function () { return chunk4X7ITYP2_js.GroupFlowNode; }
|
|
3303
3343
|
});
|
|
3304
3344
|
Object.defineProperty(exports, "HttpRequestFlowNode", {
|
|
3305
3345
|
enumerable: true,
|
|
3306
|
-
get: function () { return
|
|
3346
|
+
get: function () { return chunk4X7ITYP2_js.HttpRequestFlowNode; }
|
|
3307
3347
|
});
|
|
3308
3348
|
Object.defineProperty(exports, "IfElseFlowNode", {
|
|
3309
3349
|
enumerable: true,
|
|
3310
|
-
get: function () { return
|
|
3350
|
+
get: function () { return chunk4X7ITYP2_js.IfElseFlowNode; }
|
|
3311
3351
|
});
|
|
3312
3352
|
Object.defineProperty(exports, "IterationFlowNode", {
|
|
3313
3353
|
enumerable: true,
|
|
3314
|
-
get: function () { return
|
|
3354
|
+
get: function () { return chunk4X7ITYP2_js.IterationFlowNode; }
|
|
3315
3355
|
});
|
|
3316
3356
|
Object.defineProperty(exports, "IterationStartFlowNode", {
|
|
3317
3357
|
enumerable: true,
|
|
3318
|
-
get: function () { return
|
|
3358
|
+
get: function () { return chunk4X7ITYP2_js.IterationStartFlowNode; }
|
|
3319
3359
|
});
|
|
3320
3360
|
Object.defineProperty(exports, "KnowledgeBaseFlowNode", {
|
|
3321
3361
|
enumerable: true,
|
|
3322
|
-
get: function () { return
|
|
3362
|
+
get: function () { return chunk4X7ITYP2_js.KnowledgeBaseFlowNode; }
|
|
3323
3363
|
});
|
|
3324
3364
|
Object.defineProperty(exports, "LOGIC_ICON_MAP", {
|
|
3325
3365
|
enumerable: true,
|
|
3326
|
-
get: function () { return
|
|
3366
|
+
get: function () { return chunk4X7ITYP2_js.LOGIC_ICON_MAP; }
|
|
3327
3367
|
});
|
|
3328
3368
|
Object.defineProperty(exports, "LOGIC_NODE_BADGE_COLORS", {
|
|
3329
3369
|
enumerable: true,
|
|
3330
|
-
get: function () { return
|
|
3370
|
+
get: function () { return chunk4X7ITYP2_js.LOGIC_NODE_BADGE_COLORS; }
|
|
3331
3371
|
});
|
|
3332
3372
|
Object.defineProperty(exports, "LOGIC_NODE_GRADIENTS", {
|
|
3333
3373
|
enumerable: true,
|
|
3334
|
-
get: function () { return
|
|
3374
|
+
get: function () { return chunk4X7ITYP2_js.LOGIC_NODE_GRADIENTS; }
|
|
3335
3375
|
});
|
|
3336
3376
|
Object.defineProperty(exports, "LOGIC_NODE_HANDLE_COLORS", {
|
|
3337
3377
|
enumerable: true,
|
|
3338
|
-
get: function () { return
|
|
3378
|
+
get: function () { return chunk4X7ITYP2_js.LOGIC_NODE_HANDLE_COLORS; }
|
|
3339
3379
|
});
|
|
3340
3380
|
Object.defineProperty(exports, "LangChainIcon", {
|
|
3341
3381
|
enumerable: true,
|
|
3342
|
-
get: function () { return
|
|
3382
|
+
get: function () { return chunk4X7ITYP2_js.LangChainIcon; }
|
|
3343
3383
|
});
|
|
3344
3384
|
Object.defineProperty(exports, "ListOperatorFlowNode", {
|
|
3345
3385
|
enumerable: true,
|
|
3346
|
-
get: function () { return
|
|
3386
|
+
get: function () { return chunk4X7ITYP2_js.ListOperatorFlowNode; }
|
|
3347
3387
|
});
|
|
3348
3388
|
Object.defineProperty(exports, "LogicNodeModal", {
|
|
3349
3389
|
enumerable: true,
|
|
3350
|
-
get: function () { return
|
|
3390
|
+
get: function () { return chunk4X7ITYP2_js.LogicNodeModal; }
|
|
3351
3391
|
});
|
|
3352
3392
|
Object.defineProperty(exports, "MINIMAP_NODE_COLORS", {
|
|
3353
3393
|
enumerable: true,
|
|
3354
|
-
get: function () { return
|
|
3394
|
+
get: function () { return chunk4X7ITYP2_js.MINIMAP_NODE_COLORS; }
|
|
3355
3395
|
});
|
|
3356
3396
|
Object.defineProperty(exports, "ModelProviderFlowNode", {
|
|
3357
3397
|
enumerable: true,
|
|
3358
|
-
get: function () { return
|
|
3398
|
+
get: function () { return chunk4X7ITYP2_js.ModelProviderFlowNode; }
|
|
3359
3399
|
});
|
|
3360
3400
|
Object.defineProperty(exports, "NodeCard", {
|
|
3361
3401
|
enumerable: true,
|
|
3362
|
-
get: function () { return
|
|
3402
|
+
get: function () { return chunk4X7ITYP2_js.NodeCard; }
|
|
3363
3403
|
});
|
|
3364
3404
|
Object.defineProperty(exports, "NodeContextMenu", {
|
|
3365
3405
|
enumerable: true,
|
|
3366
|
-
get: function () { return
|
|
3406
|
+
get: function () { return chunk4X7ITYP2_js.NodeContextMenu; }
|
|
3367
3407
|
});
|
|
3368
3408
|
Object.defineProperty(exports, "NoteFlowNode", {
|
|
3369
3409
|
enumerable: true,
|
|
3370
|
-
get: function () { return
|
|
3410
|
+
get: function () { return chunk4X7ITYP2_js.NoteFlowNode; }
|
|
3371
3411
|
});
|
|
3372
3412
|
Object.defineProperty(exports, "OpenAIIcon", {
|
|
3373
3413
|
enumerable: true,
|
|
3374
|
-
get: function () { return
|
|
3414
|
+
get: function () { return chunk4X7ITYP2_js.OpenAIIcon; }
|
|
3375
3415
|
});
|
|
3376
3416
|
Object.defineProperty(exports, "PanelContextMenu", {
|
|
3377
3417
|
enumerable: true,
|
|
3378
|
-
get: function () { return
|
|
3418
|
+
get: function () { return chunk4X7ITYP2_js.PanelContextMenu; }
|
|
3379
3419
|
});
|
|
3380
3420
|
Object.defineProperty(exports, "ParameterExtractorFlowNode", {
|
|
3381
3421
|
enumerable: true,
|
|
3382
|
-
get: function () { return
|
|
3422
|
+
get: function () { return chunk4X7ITYP2_js.ParameterExtractorFlowNode; }
|
|
3383
3423
|
});
|
|
3384
3424
|
Object.defineProperty(exports, "QuestionClassifierFlowNode", {
|
|
3385
3425
|
enumerable: true,
|
|
3386
|
-
get: function () { return
|
|
3426
|
+
get: function () { return chunk4X7ITYP2_js.QuestionClassifierFlowNode; }
|
|
3387
3427
|
});
|
|
3388
3428
|
Object.defineProperty(exports, "RuleFlowNode", {
|
|
3389
3429
|
enumerable: true,
|
|
3390
|
-
get: function () { return
|
|
3430
|
+
get: function () { return chunk4X7ITYP2_js.RuleFlowNode; }
|
|
3391
3431
|
});
|
|
3392
3432
|
Object.defineProperty(exports, "SelectionContextMenu", {
|
|
3393
3433
|
enumerable: true,
|
|
3394
|
-
get: function () { return
|
|
3434
|
+
get: function () { return chunk4X7ITYP2_js.SelectionContextMenu; }
|
|
3395
3435
|
});
|
|
3396
3436
|
Object.defineProperty(exports, "StartFlowNode", {
|
|
3397
3437
|
enumerable: true,
|
|
3398
|
-
get: function () { return
|
|
3438
|
+
get: function () { return chunk4X7ITYP2_js.StartFlowNode; }
|
|
3399
3439
|
});
|
|
3400
3440
|
Object.defineProperty(exports, "StrandsIcon", {
|
|
3401
3441
|
enumerable: true,
|
|
3402
|
-
get: function () { return
|
|
3442
|
+
get: function () { return chunk4X7ITYP2_js.StrandsIcon; }
|
|
3403
3443
|
});
|
|
3404
3444
|
Object.defineProperty(exports, "TemplateTransformFlowNode", {
|
|
3405
3445
|
enumerable: true,
|
|
3406
|
-
get: function () { return
|
|
3446
|
+
get: function () { return chunk4X7ITYP2_js.TemplateTransformFlowNode; }
|
|
3407
3447
|
});
|
|
3408
3448
|
Object.defineProperty(exports, "ToolFlowNode", {
|
|
3409
3449
|
enumerable: true,
|
|
3410
|
-
get: function () { return
|
|
3450
|
+
get: function () { return chunk4X7ITYP2_js.ToolFlowNode; }
|
|
3411
3451
|
});
|
|
3412
3452
|
Object.defineProperty(exports, "VariableAggregatorFlowNode", {
|
|
3413
3453
|
enumerable: true,
|
|
3414
|
-
get: function () { return
|
|
3454
|
+
get: function () { return chunk4X7ITYP2_js.VariableAggregatorFlowNode; }
|
|
3415
3455
|
});
|
|
3416
3456
|
Object.defineProperty(exports, "VariableAssignerFlowNode", {
|
|
3417
3457
|
enumerable: true,
|
|
3418
|
-
get: function () { return
|
|
3458
|
+
get: function () { return chunk4X7ITYP2_js.VariableAssignerFlowNode; }
|
|
3419
3459
|
});
|
|
3420
3460
|
Object.defineProperty(exports, "WorkflowBuilderProvider", {
|
|
3421
3461
|
enumerable: true,
|
|
3422
|
-
get: function () { return
|
|
3462
|
+
get: function () { return chunk4X7ITYP2_js.WorkflowBuilderProvider; }
|
|
3423
3463
|
});
|
|
3424
3464
|
Object.defineProperty(exports, "Workspace", {
|
|
3425
3465
|
enumerable: true,
|
|
3426
|
-
get: function () { return
|
|
3466
|
+
get: function () { return chunk4X7ITYP2_js.Workspace; }
|
|
3427
3467
|
});
|
|
3428
3468
|
Object.defineProperty(exports, "getCompatibleModels", {
|
|
3429
3469
|
enumerable: true,
|
|
3430
|
-
get: function () { return
|
|
3470
|
+
get: function () { return chunk4X7ITYP2_js.getCompatibleModels; }
|
|
3431
3471
|
});
|
|
3432
3472
|
Object.defineProperty(exports, "getDefaultFrameworkForModel", {
|
|
3433
3473
|
enumerable: true,
|
|
3434
|
-
get: function () { return
|
|
3474
|
+
get: function () { return chunk4X7ITYP2_js.getDefaultFrameworkForModel; }
|
|
3435
3475
|
});
|
|
3436
3476
|
Object.defineProperty(exports, "getEntityBadgeColor", {
|
|
3437
3477
|
enumerable: true,
|
|
3438
|
-
get: function () { return
|
|
3478
|
+
get: function () { return chunk4X7ITYP2_js.getEntityBadgeColor; }
|
|
3439
3479
|
});
|
|
3440
3480
|
Object.defineProperty(exports, "getEntityGradient", {
|
|
3441
3481
|
enumerable: true,
|
|
3442
|
-
get: function () { return
|
|
3482
|
+
get: function () { return chunk4X7ITYP2_js.getEntityGradient; }
|
|
3443
3483
|
});
|
|
3444
3484
|
Object.defineProperty(exports, "getEntityHandleColor", {
|
|
3445
3485
|
enumerable: true,
|
|
3446
|
-
get: function () { return
|
|
3486
|
+
get: function () { return chunk4X7ITYP2_js.getEntityHandleColor; }
|
|
3447
3487
|
});
|
|
3448
3488
|
Object.defineProperty(exports, "getEntityIcon", {
|
|
3449
3489
|
enumerable: true,
|
|
3450
|
-
get: function () { return
|
|
3490
|
+
get: function () { return chunk4X7ITYP2_js.getEntityIcon; }
|
|
3451
3491
|
});
|
|
3452
3492
|
Object.defineProperty(exports, "getEntityMinimapColor", {
|
|
3453
3493
|
enumerable: true,
|
|
3454
|
-
get: function () { return
|
|
3494
|
+
get: function () { return chunk4X7ITYP2_js.getEntityMinimapColor; }
|
|
3455
3495
|
});
|
|
3456
3496
|
Object.defineProperty(exports, "getFrameworkMeta", {
|
|
3457
3497
|
enumerable: true,
|
|
3458
|
-
get: function () { return
|
|
3498
|
+
get: function () { return chunk4X7ITYP2_js.getFrameworkMeta; }
|
|
3459
3499
|
});
|
|
3460
3500
|
Object.defineProperty(exports, "isModelCompatibleWithFramework", {
|
|
3461
3501
|
enumerable: true,
|
|
3462
|
-
get: function () { return
|
|
3502
|
+
get: function () { return chunk4X7ITYP2_js.isModelCompatibleWithFramework; }
|
|
3463
3503
|
});
|
|
3464
3504
|
Object.defineProperty(exports, "useModalStore", {
|
|
3465
3505
|
enumerable: true,
|
|
3466
|
-
get: function () { return
|
|
3506
|
+
get: function () { return chunk4X7ITYP2_js.useModalStore; }
|
|
3467
3507
|
});
|
|
3468
3508
|
Object.defineProperty(exports, "useWorkflowBuilderClient", {
|
|
3469
3509
|
enumerable: true,
|
|
3470
|
-
get: function () { return
|
|
3510
|
+
get: function () { return chunk4X7ITYP2_js.useWorkflowBuilderClient; }
|
|
3471
3511
|
});
|
|
3472
3512
|
Object.defineProperty(exports, "useWorkflowBuilderClientOptional", {
|
|
3473
3513
|
enumerable: true,
|
|
3474
|
-
get: function () { return
|
|
3514
|
+
get: function () { return chunk4X7ITYP2_js.useWorkflowBuilderClientOptional; }
|
|
3475
3515
|
});
|
|
3476
3516
|
Object.defineProperty(exports, "useWorkflowStore", {
|
|
3477
3517
|
enumerable: true,
|
|
3478
|
-
get: function () { return
|
|
3518
|
+
get: function () { return chunk4X7ITYP2_js.useWorkflowStore; }
|
|
3479
3519
|
});
|
|
3480
3520
|
Object.defineProperty(exports, "GraphNodeBadge", {
|
|
3481
3521
|
enumerable: true,
|