@datatechsolutions/ui 2.11.18 → 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/index.js +26 -38
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +27 -39
- package/dist/astrlabe/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/astrlabe/index.js
CHANGED
|
@@ -358,23 +358,7 @@ function AgentCapabilityCard({ elo, setElo, models, selectedModelId, setSelected
|
|
|
358
358
|
] })
|
|
359
359
|
] });
|
|
360
360
|
}
|
|
361
|
-
function ConfigTab({
|
|
362
|
-
const [promptText, setPromptText] = react.useState(agent.systemPrompt ?? "");
|
|
363
|
-
const handleTemperatureChange = react.useCallback((event) => {
|
|
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;
|
|
361
|
+
function ConfigTab({ models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework, markDirty }) {
|
|
378
362
|
const frameworkKeys = Object.keys(chunk4X7ITYP2_js.FRAMEWORK_META);
|
|
379
363
|
const compatibleModels = chunk4X7ITYP2_js.getCompatibleModels(models, selectedFramework);
|
|
380
364
|
const handleFrameworkChange = react.useCallback((newFramework) => {
|
|
@@ -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
|
}
|
|
@@ -761,6 +747,7 @@ function AgentModal({ onSaved }) {
|
|
|
761
747
|
const sections = [
|
|
762
748
|
{ id: "profile", label: t("agentDrawer.profileSection"), icon: outline.UserCircleIcon, group: t("agentDrawer.agentGroup") },
|
|
763
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") },
|
|
764
751
|
{ id: "tools", label: `${t("agentDrawer.toolsTab")}${enabledToolIds.size > 0 ? ` (${enabledToolIds.size})` : ""}`, icon: outline.CommandLineIcon, group: t("agentDrawer.configGroup") },
|
|
765
752
|
{ id: "models", label: `${t("agentDrawer.modelsTab")}${selectedProviderId ? " \u2713" : ""}`, icon: outline.KeyIcon, group: t("agentDrawer.configGroup") },
|
|
766
753
|
{ id: "results", label: t("agentDrawer.resultsTab"), icon: outline.PlayCircleIcon, group: t("agentDrawer.executionGroup") }
|
|
@@ -798,7 +785,8 @@ function AgentModal({ onSaved }) {
|
|
|
798
785
|
sidebarFooter,
|
|
799
786
|
children: [
|
|
800
787
|
activeTab === "profile" && /* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
|
|
801
|
-
activeTab === "framework" && /* @__PURE__ */ jsxRuntime.jsx(ConfigTab, {
|
|
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 }),
|
|
802
790
|
activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
|
|
803
791
|
activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
804
792
|
ModelsTab,
|