@mastra/playground-ui 22.0.0-alpha.2 → 22.0.0-alpha.4
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/CHANGELOG.md +25 -0
- package/dist/index.cjs.js +119 -111
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +21 -211
- package/dist/index.es.js +119 -113
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +4 -0
- package/dist/src/ds/components/MainSidebar/main-sidebar-root.d.ts +1 -2
- package/dist/src/ds/components/MainSidebar/main-sidebar-trigger.d.ts +4 -0
- package/dist/src/ds/components/MainSidebar/main-sidebar.d.ts +3 -0
- package/dist/src/ds/components/Tabs/tabs-list.d.ts +1 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 22.0.0-alpha.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added browser tools to the Agent details UI in Playground. Agents configured with browser support now show a "Browser Tools" section in metadata. ([#14998](https://github.com/mastra-ai/mastra/pull/14998))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`d87e6e6`](https://github.com/mastra-ai/mastra/commit/d87e6e61c42475a7b57768e71dfa12964326a632)]:
|
|
10
|
+
- @mastra/client-js@1.13.0-alpha.3
|
|
11
|
+
- @mastra/react@0.2.22-alpha.3
|
|
12
|
+
- @mastra/core@1.22.0-alpha.3
|
|
13
|
+
|
|
14
|
+
## 22.0.0-alpha.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Consolidated Tab button styles into the Tab component, removing duplicated child selectors from TabList. Removed unused alignment prop. Active underline now uses the neutral4 design token. ([#15004](https://github.com/mastra-ai/mastra/pull/15004))
|
|
19
|
+
|
|
20
|
+
- Matched tooltip panel background to dropdown and default button surface in Studio. ([#15009](https://github.com/mastra-ai/mastra/pull/15009))
|
|
21
|
+
|
|
22
|
+
- Fixed Scores Over Time chart to always show a 24-hour view by collapsing multi-day ranges into hourly averages across all days in the selected period ([#14981](https://github.com/mastra-ai/mastra/pull/14981))
|
|
23
|
+
|
|
24
|
+
- Aligned dropdown menu panel background with default button styling in Studio. ([#15009](https://github.com/mastra-ai/mastra/pull/15009))
|
|
25
|
+
|
|
26
|
+
- Refactored chat error messages to use the Alert design system component instead of inline hardcoded styles, fixing text overflow on long error messages ([#15012](https://github.com/mastra-ai/mastra/pull/15012))
|
|
27
|
+
|
|
3
28
|
## 22.0.0-alpha.2
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -3671,13 +3671,13 @@ const TooltipContent = React__namespace.forwardRef(({ className, sideOffset = 4,
|
|
|
3671
3671
|
ref,
|
|
3672
3672
|
sideOffset,
|
|
3673
3673
|
className: cn(
|
|
3674
|
-
"z-50 overflow-hidden rounded-md bg-
|
|
3674
|
+
"z-50 overflow-hidden rounded-md bg-surface3 px-3 py-1.5 text-xs text-neutral4 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3675
3675
|
className
|
|
3676
3676
|
),
|
|
3677
3677
|
...props,
|
|
3678
3678
|
children: [
|
|
3679
3679
|
children,
|
|
3680
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "fill-
|
|
3680
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "fill-surface3" })
|
|
3681
3681
|
]
|
|
3682
3682
|
}
|
|
3683
3683
|
) }));
|
|
@@ -3724,8 +3724,8 @@ const DialogContent = React__namespace.forwardRef(({ className, children, ...pro
|
|
|
3724
3724
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3725
3725
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3726
3726
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
3727
|
-
"data-[state=closed]:slide-out-to-
|
|
3728
|
-
"data-[state=open]:slide-in-from-
|
|
3727
|
+
"data-[state=closed]:slide-out-to-bottom-4",
|
|
3728
|
+
"data-[state=open]:slide-in-from-bottom-4",
|
|
3729
3729
|
className
|
|
3730
3730
|
),
|
|
3731
3731
|
...props,
|
|
@@ -13222,19 +13222,11 @@ const Tabs = ({ children, defaultTab, value, onValueChange, className }) => {
|
|
|
13222
13222
|
return /* @__PURE__ */ jsxRuntime.jsx(RadixTabs__namespace.Root, { value: currentTab, onValueChange: handleTabChange, className: cn("overflow-y-auto", className), children });
|
|
13223
13223
|
};
|
|
13224
13224
|
|
|
13225
|
-
const TabList = ({ children,
|
|
13225
|
+
const TabList = ({ children, className }) => {
|
|
13226
13226
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full overflow-x-auto", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13227
13227
|
RadixTabs__namespace.List,
|
|
13228
13228
|
{
|
|
13229
|
-
className: cn(
|
|
13230
|
-
"flex items-center relative w-max min-w-full",
|
|
13231
|
-
"text-ui-lg border-b border-border1",
|
|
13232
|
-
"[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:border-b-2 [&>button]:border-transparent",
|
|
13233
|
-
alignment === "full-width" && "[&>button]:flex-1",
|
|
13234
|
-
`[&>button]:${transitions.colors} [&>button]:hover:text-neutral4`,
|
|
13235
|
-
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-black/50 [&>button[data-state=active]]:dark:border-white/50",
|
|
13236
|
-
className
|
|
13237
|
-
),
|
|
13229
|
+
className: cn("flex items-center relative w-max min-w-full", "text-ui-lg border-b border-border1", className),
|
|
13238
13230
|
children
|
|
13239
13231
|
}
|
|
13240
13232
|
) });
|
|
@@ -13246,11 +13238,12 @@ const Tab = ({ children, value, onClick, onClose, className }) => {
|
|
|
13246
13238
|
{
|
|
13247
13239
|
value,
|
|
13248
13240
|
className: cn(
|
|
13249
|
-
"
|
|
13250
|
-
|
|
13241
|
+
"py-2 px-5 text-ui-md font-normal text-neutral3 border-b-2 border-transparent",
|
|
13242
|
+
"whitespace-nowrap shrink-0 flex items-center justify-center gap-1.5 outline-none",
|
|
13243
|
+
transitions.colors,
|
|
13251
13244
|
focusRing.visible,
|
|
13252
13245
|
"hover:text-neutral4",
|
|
13253
|
-
"data-[state=active]:text-neutral5 data-[state=active]:border-
|
|
13246
|
+
"data-[state=active]:text-neutral5 data-[state=active]:border-neutral3",
|
|
13254
13247
|
className
|
|
13255
13248
|
),
|
|
13256
13249
|
onClick,
|
|
@@ -14504,31 +14497,22 @@ const ErrorAwareText = () => {
|
|
|
14504
14497
|
const trimmedText = text.trim();
|
|
14505
14498
|
if (trimmedText.startsWith("__ERROR__:")) {
|
|
14506
14499
|
const errorMessage = trimmedText.substring("__ERROR__:".length);
|
|
14507
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14508
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14509
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14510
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-red-800 dark:text-red-200 mb-1", children: "Error" }),
|
|
14511
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-700 dark:text-red-300", children: errorMessage })
|
|
14512
|
-
] })
|
|
14500
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "destructive", children: [
|
|
14501
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { as: "h5", children: "Error" }),
|
|
14502
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { as: "p", children: errorMessage })
|
|
14513
14503
|
] });
|
|
14514
14504
|
} else if (trimmedText.startsWith("Error:")) {
|
|
14515
14505
|
const errorMessage = trimmedText.substring("Error:".length).trim();
|
|
14516
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14517
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14518
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14519
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-red-800 dark:text-red-200 mb-1", children: "Error" }),
|
|
14520
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-700 dark:text-red-300", children: errorMessage })
|
|
14521
|
-
] })
|
|
14506
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "destructive", children: [
|
|
14507
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { as: "h5", children: "Error" }),
|
|
14508
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { as: "p", children: errorMessage })
|
|
14522
14509
|
] });
|
|
14523
14510
|
}
|
|
14524
14511
|
return /* @__PURE__ */ jsxRuntime.jsx(MarkdownText, {});
|
|
14525
14512
|
} catch {
|
|
14526
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14527
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14528
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14529
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-red-800 dark:text-red-200 mb-1", children: "Error" }),
|
|
14530
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-700 dark:text-red-300", children: String(text) })
|
|
14531
|
-
] })
|
|
14513
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "destructive", children: [
|
|
14514
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { as: "h5", children: "Error" }),
|
|
14515
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { as: "p", children: String(text) })
|
|
14532
14516
|
] });
|
|
14533
14517
|
}
|
|
14534
14518
|
};
|
|
@@ -22464,6 +22448,7 @@ const AgentMetadata = ({ agentId }) => {
|
|
|
22464
22448
|
const workflows = Object.keys(agentWorkflows).map((key) => ({ id: key, ...agentWorkflows[key] }));
|
|
22465
22449
|
const skills = agent.skills ?? [];
|
|
22466
22450
|
const workspaceTools = agent.workspaceTools ?? [];
|
|
22451
|
+
const browserTools = agent.browserTools ?? [];
|
|
22467
22452
|
const workspaceId = agent.workspaceId;
|
|
22468
22453
|
const inputProcessors = agent.inputProcessors ?? [];
|
|
22469
22454
|
const outputProcessors = agent.outputProcessors ?? [];
|
|
@@ -22563,6 +22548,17 @@ const AgentMetadata = ({ agentId }) => {
|
|
|
22563
22548
|
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataWorkspaceToolsList, { tools: workspaceTools })
|
|
22564
22549
|
}
|
|
22565
22550
|
),
|
|
22551
|
+
browserTools.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
22552
|
+
AgentMetadataSection,
|
|
22553
|
+
{
|
|
22554
|
+
title: "Browser Tools",
|
|
22555
|
+
hint: {
|
|
22556
|
+
link: "https://mastra.ai/en/docs/agents/adding-browser-control",
|
|
22557
|
+
title: "Browser tools documentation"
|
|
22558
|
+
},
|
|
22559
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataBrowserToolsList, { tools: browserTools })
|
|
22560
|
+
}
|
|
22561
|
+
),
|
|
22566
22562
|
(inputProcessors.length > 0 || outputProcessors.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
22567
22563
|
AgentMetadataSection,
|
|
22568
22564
|
{
|
|
@@ -22664,6 +22660,12 @@ const AgentMetadataWorkspaceToolsList = ({ tools }) => {
|
|
|
22664
22660
|
}
|
|
22665
22661
|
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: tools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { className: "h-3 w-3 text-accent1" }), children: formatWorkspaceToolName(tool) }) }, tool)) });
|
|
22666
22662
|
};
|
|
22663
|
+
const AgentMetadataBrowserToolsList = ({ tools }) => {
|
|
22664
|
+
if (tools.length === 0) {
|
|
22665
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListEmpty, { children: "No browser tools" });
|
|
22666
|
+
}
|
|
22667
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: tools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "h-3 w-3 text-cyan-500" }), children: tool }) }, tool)) });
|
|
22668
|
+
};
|
|
22667
22669
|
const AgentMetadataCombinedProcessorList = ({
|
|
22668
22670
|
inputProcessors,
|
|
22669
22671
|
outputProcessors
|
|
@@ -27571,7 +27573,7 @@ const DropdownMenuSubTrigger = React__namespace.forwardRef(({ className, inset,
|
|
|
27571
27573
|
{
|
|
27572
27574
|
ref,
|
|
27573
27575
|
className: cn(
|
|
27574
|
-
"
|
|
27576
|
+
"hover:bg-surface4 focus:bg-surface4 active:bg-surface5 data-[state=open]:bg-surface4 flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 focus-visible:outline-hidden focus-visible:ring-0",
|
|
27575
27577
|
inset && "pl-8",
|
|
27576
27578
|
className
|
|
27577
27579
|
),
|
|
@@ -27588,7 +27590,7 @@ const DropdownMenuSubContent = React__namespace.forwardRef(({ className, ...prop
|
|
|
27588
27590
|
{
|
|
27589
27591
|
ref,
|
|
27590
27592
|
className: cn(
|
|
27591
|
-
"
|
|
27593
|
+
"bg-surface3 backdrop-blur-xl data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-50 min-w-32 overflow-auto overflow-x-hidden rounded-lg",
|
|
27592
27594
|
className
|
|
27593
27595
|
),
|
|
27594
27596
|
...props
|
|
@@ -27602,7 +27604,7 @@ const DropdownMenuContent = React__namespace.forwardRef(({ className, container,
|
|
|
27602
27604
|
ref,
|
|
27603
27605
|
sideOffset,
|
|
27604
27606
|
className: cn(
|
|
27605
|
-
"bg-
|
|
27607
|
+
"bg-surface3 data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 backdrop-blur-xl text-neutral4 z-50 min-w-32 overflow-auto rounded-lg p-2 shadow-md",
|
|
27606
27608
|
className
|
|
27607
27609
|
),
|
|
27608
27610
|
...props
|
|
@@ -27615,7 +27617,7 @@ const DropdownMenuItem = React__namespace.forwardRef(({ className, ...props }, r
|
|
|
27615
27617
|
{
|
|
27616
27618
|
ref,
|
|
27617
27619
|
className: cn(
|
|
27618
|
-
"relative flex cursor-pointer select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white
|
|
27620
|
+
"relative flex cursor-pointer select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 hover:bg-surface4 focus:bg-surface4 active:bg-surface5 data-disabled:pointer-events-none data-disabled:opacity-50 [&>span]:truncate [&_svg]:size-4 [&_svg]:shrink-0 focus-visible:outline-hidden focus-visible:ring-0",
|
|
27619
27621
|
"[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-50 [&>svg]:mx-[-.25em] [&:hover>svg]:opacity-100",
|
|
27620
27622
|
className
|
|
27621
27623
|
),
|
|
@@ -27628,7 +27630,7 @@ const DropdownMenuCheckboxItem = React__namespace.forwardRef(({ className, child
|
|
|
27628
27630
|
{
|
|
27629
27631
|
ref,
|
|
27630
27632
|
className: cn(
|
|
27631
|
-
"
|
|
27633
|
+
"hover:bg-surface4 focus:bg-surface4 active:bg-surface5 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 relative flex w-full cursor-pointer select-none items-center gap-4 rounded-md px-2 py-1.5 text-sm transition-colors text-neutral4 data-disabled:pointer-events-none data-disabled:opacity-50 focus-visible:outline-hidden focus-visible:ring-0",
|
|
27632
27634
|
className
|
|
27633
27635
|
),
|
|
27634
27636
|
checked,
|
|
@@ -27645,7 +27647,7 @@ const DropdownMenuRadioItem = React__namespace.forwardRef(({ className, children
|
|
|
27645
27647
|
{
|
|
27646
27648
|
ref,
|
|
27647
27649
|
className: cn(
|
|
27648
|
-
"relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white
|
|
27650
|
+
"relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm transition-colors text-neutral4 dark:hover:text-white dark:focus:text-white hover:text-neutral6 focus:text-neutral6 hover:bg-surface4 focus:bg-surface4 active:bg-surface5 data-disabled:pointer-events-none data-disabled:opacity-50 focus-visible:outline-hidden focus-visible:ring-0",
|
|
27649
27651
|
className
|
|
27650
27652
|
),
|
|
27651
27653
|
...props,
|
|
@@ -44546,35 +44548,38 @@ function useScoresMetrics() {
|
|
|
44546
44548
|
})
|
|
44547
44549
|
)
|
|
44548
44550
|
);
|
|
44549
|
-
const
|
|
44550
|
-
const rangeSpansDays = timestamp.end.toDateString() !== timestamp.start.toDateString();
|
|
44551
|
+
const hourBuckets = /* @__PURE__ */ new Map();
|
|
44551
44552
|
for (let i = 0; i < scorerNames.length; i++) {
|
|
44552
44553
|
const scorerId = scorerNames[i];
|
|
44553
44554
|
const series = timeSeriesResults[i]?.series ?? [];
|
|
44554
44555
|
for (const s of series) {
|
|
44555
44556
|
for (const point of s.points) {
|
|
44556
44557
|
const ts = new Date(point.timestamp);
|
|
44557
|
-
const
|
|
44558
|
-
|
|
44559
|
-
|
|
44560
|
-
|
|
44561
|
-
|
|
44562
|
-
|
|
44563
|
-
|
|
44564
|
-
|
|
44565
|
-
|
|
44566
|
-
|
|
44567
|
-
|
|
44568
|
-
minute: "2-digit",
|
|
44569
|
-
hour12: false
|
|
44570
|
-
})
|
|
44571
|
-
});
|
|
44558
|
+
const hourKey = ts.toLocaleTimeString("en-US", {
|
|
44559
|
+
hour: "2-digit",
|
|
44560
|
+
minute: "2-digit",
|
|
44561
|
+
hour12: false
|
|
44562
|
+
});
|
|
44563
|
+
if (!hourBuckets.has(hourKey)) {
|
|
44564
|
+
hourBuckets.set(hourKey, /* @__PURE__ */ new Map());
|
|
44565
|
+
}
|
|
44566
|
+
const scorerMap = hourBuckets.get(hourKey);
|
|
44567
|
+
if (!scorerMap.has(scorerId)) {
|
|
44568
|
+
scorerMap.set(scorerId, { sum: 0, count: 0 });
|
|
44572
44569
|
}
|
|
44573
|
-
|
|
44570
|
+
const acc = scorerMap.get(scorerId);
|
|
44571
|
+
acc.sum += point.value;
|
|
44572
|
+
acc.count += 1;
|
|
44574
44573
|
}
|
|
44575
44574
|
}
|
|
44576
44575
|
}
|
|
44577
|
-
const overTimeData = Array.from(
|
|
44576
|
+
const overTimeData = Array.from(hourBuckets.entries()).sort(([a], [b]) => a.localeCompare(b)).map(([hourKey, scorerMap]) => {
|
|
44577
|
+
const point = { time: hourKey };
|
|
44578
|
+
for (const [scorerId, acc] of scorerMap) {
|
|
44579
|
+
point[scorerId] = +(acc.sum / acc.count).toFixed(2);
|
|
44580
|
+
}
|
|
44581
|
+
return point;
|
|
44582
|
+
});
|
|
44578
44583
|
return {
|
|
44579
44584
|
summaryData,
|
|
44580
44585
|
overTimeData,
|
|
@@ -56957,21 +56962,9 @@ function MainSidebarProvider({ children }) {
|
|
|
56957
56962
|
return /* @__PURE__ */ jsxRuntime.jsx(MainSidebarContext.Provider, { value: contextValue, children });
|
|
56958
56963
|
}
|
|
56959
56964
|
|
|
56960
|
-
function MainSidebarRoot({ children, className
|
|
56965
|
+
function MainSidebarRoot({ children, className }) {
|
|
56961
56966
|
const { state, toggleSidebar } = useMainSidebar();
|
|
56962
56967
|
const isCollapsed = state === "collapsed";
|
|
56963
|
-
React.useEffect(() => {
|
|
56964
|
-
const handleKeyDown = (event) => {
|
|
56965
|
-
if (event.ctrlKey && event.key === "b") {
|
|
56966
|
-
event.preventDefault();
|
|
56967
|
-
toggleSidebar();
|
|
56968
|
-
}
|
|
56969
|
-
};
|
|
56970
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
56971
|
-
return () => {
|
|
56972
|
-
document.removeEventListener("keydown", handleKeyDown);
|
|
56973
|
-
};
|
|
56974
|
-
}, [toggleSidebar]);
|
|
56975
56968
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
56976
56969
|
"div",
|
|
56977
56970
|
{
|
|
@@ -56986,43 +56979,6 @@ function MainSidebarRoot({ children, className, footerSlot }) {
|
|
|
56986
56979
|
),
|
|
56987
56980
|
children: [
|
|
56988
56981
|
children,
|
|
56989
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-surface1 grid sticky bottom-0 pb-3", children: [
|
|
56990
|
-
/* @__PURE__ */ jsxRuntime.jsx(MainSidebarNavSeparator, {}),
|
|
56991
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-1", children: [
|
|
56992
|
-
!isCollapsed && footerSlot,
|
|
56993
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
56994
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
56995
|
-
"button",
|
|
56996
|
-
{
|
|
56997
|
-
onClick: toggleSidebar,
|
|
56998
|
-
className: cn(
|
|
56999
|
-
"inline-flex w-auto items-center text-neutral3 h-8 px-3 rounded-md",
|
|
57000
|
-
"hover:bg-surface4 hover:text-neutral5",
|
|
57001
|
-
"transition-all duration-normal ease-out-custom",
|
|
57002
|
-
"focus:outline-hidden focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
|
|
57003
|
-
"[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3 [&_svg]:transition-transform [&_svg]:duration-normal"
|
|
57004
|
-
),
|
|
57005
|
-
"aria-label": "Toggle sidebar",
|
|
57006
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
57007
|
-
lucideReact.PanelRightIcon,
|
|
57008
|
-
{
|
|
57009
|
-
className: cn({
|
|
57010
|
-
"rotate-180": isCollapsed
|
|
57011
|
-
})
|
|
57012
|
-
}
|
|
57013
|
-
)
|
|
57014
|
-
}
|
|
57015
|
-
) }),
|
|
57016
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TooltipContent, { children: [
|
|
57017
|
-
"Toggle Sidebar",
|
|
57018
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 [&>svg]:w-[1em] [&>svg]:h-[1em]", children: [
|
|
57019
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyboardIcon, {}),
|
|
57020
|
-
" Ctrl+B"
|
|
57021
|
-
] })
|
|
57022
|
-
] })
|
|
57023
|
-
] })
|
|
57024
|
-
] })
|
|
57025
|
-
] }),
|
|
57026
56982
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
57027
56983
|
"button",
|
|
57028
56984
|
{
|
|
@@ -57039,6 +56995,55 @@ function MainSidebarRoot({ children, className, footerSlot }) {
|
|
|
57039
56995
|
);
|
|
57040
56996
|
}
|
|
57041
56997
|
|
|
56998
|
+
function MainSidebarTrigger({ className }) {
|
|
56999
|
+
const { state, toggleSidebar } = useMainSidebar();
|
|
57000
|
+
const isCollapsed = state === "collapsed";
|
|
57001
|
+
React.useEffect(() => {
|
|
57002
|
+
const handleKeyDown = (event) => {
|
|
57003
|
+
if (event.ctrlKey && event.key === "b") {
|
|
57004
|
+
event.preventDefault();
|
|
57005
|
+
toggleSidebar();
|
|
57006
|
+
}
|
|
57007
|
+
};
|
|
57008
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
57009
|
+
return () => {
|
|
57010
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
57011
|
+
};
|
|
57012
|
+
}, [toggleSidebar]);
|
|
57013
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
57014
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
57015
|
+
"button",
|
|
57016
|
+
{
|
|
57017
|
+
onClick: toggleSidebar,
|
|
57018
|
+
className: cn(
|
|
57019
|
+
"inline-flex w-auto items-center text-neutral3 h-8 px-3 rounded-md",
|
|
57020
|
+
"hover:bg-surface4 hover:text-neutral5",
|
|
57021
|
+
"transition-all duration-normal ease-out-custom",
|
|
57022
|
+
"focus:outline-hidden focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
|
|
57023
|
+
"[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3 [&_svg]:transition-transform [&_svg]:duration-normal",
|
|
57024
|
+
className
|
|
57025
|
+
),
|
|
57026
|
+
"aria-label": "Toggle sidebar",
|
|
57027
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
57028
|
+
lucideReact.PanelRightIcon,
|
|
57029
|
+
{
|
|
57030
|
+
className: cn({
|
|
57031
|
+
"rotate-180": isCollapsed
|
|
57032
|
+
})
|
|
57033
|
+
}
|
|
57034
|
+
)
|
|
57035
|
+
}
|
|
57036
|
+
) }),
|
|
57037
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TooltipContent, { children: [
|
|
57038
|
+
"Toggle Sidebar",
|
|
57039
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 [&>svg]:w-[1em] [&>svg]:h-[1em]", children: [
|
|
57040
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyboardIcon, {}),
|
|
57041
|
+
" Ctrl+B"
|
|
57042
|
+
] })
|
|
57043
|
+
] })
|
|
57044
|
+
] });
|
|
57045
|
+
}
|
|
57046
|
+
|
|
57042
57047
|
const MainSidebar = Object.assign(MainSidebarRoot, {
|
|
57043
57048
|
Bottom: MainSidebarBottom,
|
|
57044
57049
|
Nav: MainSidebarNav,
|
|
@@ -57046,7 +57051,8 @@ const MainSidebar = Object.assign(MainSidebarRoot, {
|
|
|
57046
57051
|
NavLink: MainSidebarNavLink,
|
|
57047
57052
|
NavHeader: MainSidebarNavHeader,
|
|
57048
57053
|
NavList: MainSidebarNavList,
|
|
57049
|
-
NavSeparator: MainSidebarNavSeparator
|
|
57054
|
+
NavSeparator: MainSidebarNavSeparator,
|
|
57055
|
+
Trigger: MainSidebarTrigger
|
|
57050
57056
|
});
|
|
57051
57057
|
|
|
57052
57058
|
function PageHeader({ title, description, icon, className }) {
|
|
@@ -59738,6 +59744,7 @@ exports.AgentInformationTabLayout = AgentInformationTabLayout;
|
|
|
59738
59744
|
exports.AgentLayout = AgentLayout;
|
|
59739
59745
|
exports.AgentMemory = AgentMemory;
|
|
59740
59746
|
exports.AgentMetadata = AgentMetadata;
|
|
59747
|
+
exports.AgentMetadataBrowserToolsList = AgentMetadataBrowserToolsList;
|
|
59741
59748
|
exports.AgentMetadataCombinedProcessorList = AgentMetadataCombinedProcessorList;
|
|
59742
59749
|
exports.AgentMetadataList = AgentMetadataList;
|
|
59743
59750
|
exports.AgentMetadataListEmpty = AgentMetadataListEmpty;
|
|
@@ -59983,6 +59990,7 @@ exports.MainContentLayout = MainContentLayout;
|
|
|
59983
59990
|
exports.MainHeader = MainHeader;
|
|
59984
59991
|
exports.MainSidebar = MainSidebar;
|
|
59985
59992
|
exports.MainSidebarProvider = MainSidebarProvider;
|
|
59993
|
+
exports.MainSidebarTrigger = MainSidebarTrigger;
|
|
59986
59994
|
exports.MarkdownRenderer = MarkdownRenderer;
|
|
59987
59995
|
exports.MastraPackagesInfo = MastraPackagesInfo;
|
|
59988
59996
|
exports.MastraVersionFooter = MastraVersionFooter;
|