@inf-monkeys-tech/monkeys-design 1.0.78 → 1.0.80
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/components/agent-workbench/index.d.mts +2 -2
- package/dist/components/agent-workbench/index.d.ts +2 -2
- package/dist/components/agent-workbench/index.js +104 -32
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +104 -32
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/{details-model-0c582b2c95a2.d.mts → details-model-0a4d9b50c99d.d.mts} +3 -1
- package/dist/{details-model-0c582b2c95a2.d.ts → details-model-0a4d9b50c99d.d.ts} +3 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +104 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -33
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1491,6 +1491,7 @@ function AgentWorkbenchSidebarSearch({
|
|
|
1491
1491
|
label,
|
|
1492
1492
|
placeholder = label,
|
|
1493
1493
|
className,
|
|
1494
|
+
variant = "default",
|
|
1494
1495
|
onChange
|
|
1495
1496
|
}) {
|
|
1496
1497
|
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
@@ -1506,47 +1507,60 @@ function AgentWorkbenchSidebarSearch({
|
|
|
1506
1507
|
window.addEventListener("keydown", handleShortcut);
|
|
1507
1508
|
return () => window.removeEventListener("keydown", handleShortcut);
|
|
1508
1509
|
}, []);
|
|
1509
|
-
return /* @__PURE__ */ jsxs(
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
"aria-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1510
|
+
return /* @__PURE__ */ jsxs(
|
|
1511
|
+
InputGroup,
|
|
1512
|
+
{
|
|
1513
|
+
className: cn2(
|
|
1514
|
+
variant === "trend" ? "h-12 rounded-[var(--radius)] border-border bg-card text-foreground" : "h-10 rounded-lg bg-card",
|
|
1515
|
+
className
|
|
1516
|
+
),
|
|
1517
|
+
children: [
|
|
1518
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Search, { className: "size-4", "aria-hidden": "true" }) }),
|
|
1519
|
+
/* @__PURE__ */ jsx(
|
|
1520
|
+
InputGroupInput,
|
|
1521
|
+
{
|
|
1522
|
+
ref: searchRef,
|
|
1523
|
+
type: "search",
|
|
1524
|
+
value,
|
|
1525
|
+
"aria-label": label,
|
|
1526
|
+
placeholder,
|
|
1527
|
+
className: "min-w-0 [&::-webkit-search-cancel-button]:hidden",
|
|
1528
|
+
onChange: (event) => onChange(event.target.value),
|
|
1529
|
+
onKeyDown: (event) => {
|
|
1530
|
+
if (event.key !== "Escape") return;
|
|
1531
|
+
onChange("");
|
|
1532
|
+
event.currentTarget.blur();
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
),
|
|
1536
|
+
value ? /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx(
|
|
1537
|
+
InputGroupButton,
|
|
1538
|
+
{
|
|
1539
|
+
size: "icon-xs",
|
|
1540
|
+
"aria-label": messages.clearSearch,
|
|
1541
|
+
onClick: () => onChange(""),
|
|
1542
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3.5", "aria-hidden": "true" })
|
|
1543
|
+
}
|
|
1544
|
+
) }) : /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx("kbd", { className: "border border-border px-1.5 py-0.5 text-[10px]", children: "Ctrl K" }) })
|
|
1545
|
+
]
|
|
1546
|
+
}
|
|
1547
|
+
);
|
|
1538
1548
|
}
|
|
1539
1549
|
function AgentWorkbenchSidebarNewSessionButton({
|
|
1540
1550
|
label,
|
|
1541
1551
|
className,
|
|
1552
|
+
variant = "default",
|
|
1542
1553
|
onClick
|
|
1543
1554
|
}) {
|
|
1544
1555
|
return /* @__PURE__ */ jsxs(
|
|
1545
1556
|
Button,
|
|
1546
1557
|
{
|
|
1547
1558
|
type: "button",
|
|
1548
|
-
variant: "ghost",
|
|
1549
|
-
className: cn2(
|
|
1559
|
+
variant: variant === "trend" ? "default" : "ghost",
|
|
1560
|
+
className: cn2(
|
|
1561
|
+
variant === "trend" ? "h-11 w-full justify-center gap-2 rounded-[var(--radius)] border border-primary/60 bg-primary px-3 font-semibold text-primary-foreground hover:bg-primary/90" : "h-9 w-full justify-start gap-2 px-3 text-sm",
|
|
1562
|
+
className
|
|
1563
|
+
),
|
|
1550
1564
|
onClick,
|
|
1551
1565
|
children: [
|
|
1552
1566
|
/* @__PURE__ */ jsx(SquarePen, { className: "size-4", "aria-hidden": "true" }),
|
|
@@ -1635,6 +1649,7 @@ function AgentWorkbenchSessionList({
|
|
|
1635
1649
|
retryLabel,
|
|
1636
1650
|
groupByMode = false,
|
|
1637
1651
|
showHeading = false,
|
|
1652
|
+
variant = "default",
|
|
1638
1653
|
className,
|
|
1639
1654
|
itemClassName,
|
|
1640
1655
|
capabilities,
|
|
@@ -1694,6 +1709,59 @@ function AgentWorkbenchSessionList({
|
|
|
1694
1709
|
if (sessions.length === 0) {
|
|
1695
1710
|
return /* @__PURE__ */ jsx("div", { className: "px-3 py-8 text-center text-sm text-muted-foreground", children: query ? noResultsLabel : emptyLabel });
|
|
1696
1711
|
}
|
|
1712
|
+
const renderTrendItems = (items) => /* @__PURE__ */ jsx("div", { className: "space-y-3", children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
1713
|
+
"div",
|
|
1714
|
+
{
|
|
1715
|
+
"aria-current": item.id === selectedSessionId ? "page" : void 0,
|
|
1716
|
+
className: "group flex h-10 w-full min-w-0 items-center rounded-[var(--radius)] border border-transparent bg-muted/60 text-foreground transition hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-primary/10",
|
|
1717
|
+
children: [
|
|
1718
|
+
/* @__PURE__ */ jsx(
|
|
1719
|
+
"button",
|
|
1720
|
+
{
|
|
1721
|
+
type: "button",
|
|
1722
|
+
title: item.title,
|
|
1723
|
+
className: "h-full min-w-0 flex-1 truncate px-3 text-left text-sm font-semibold",
|
|
1724
|
+
onClick: () => onSelect(item.id),
|
|
1725
|
+
children: item.title
|
|
1726
|
+
}
|
|
1727
|
+
),
|
|
1728
|
+
capabilities?.delete ? /* @__PURE__ */ jsx(
|
|
1729
|
+
"span",
|
|
1730
|
+
{
|
|
1731
|
+
"data-agent-workbench-item-actions": true,
|
|
1732
|
+
className: "mr-1 shrink-0 opacity-0 transition-opacity group-aria-[current=page]:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100",
|
|
1733
|
+
onClick: (event) => event.stopPropagation(),
|
|
1734
|
+
onKeyDown: (event) => event.stopPropagation(),
|
|
1735
|
+
children: /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
|
|
1736
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1737
|
+
Button,
|
|
1738
|
+
{
|
|
1739
|
+
type: "button",
|
|
1740
|
+
variant: "ghost",
|
|
1741
|
+
size: "icon",
|
|
1742
|
+
"aria-label": messages.actions,
|
|
1743
|
+
className: "size-8 text-muted-foreground",
|
|
1744
|
+
children: /* @__PURE__ */ jsx(Ellipsis, { className: "size-4", "aria-hidden": "true" })
|
|
1745
|
+
}
|
|
1746
|
+
) }),
|
|
1747
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: /* @__PURE__ */ jsxs(
|
|
1748
|
+
DropdownMenuItem,
|
|
1749
|
+
{
|
|
1750
|
+
className: "text-destructive-text",
|
|
1751
|
+
onSelect: () => onDelete?.(item.id),
|
|
1752
|
+
children: [
|
|
1753
|
+
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4", "aria-hidden": "true" }),
|
|
1754
|
+
messages.delete
|
|
1755
|
+
]
|
|
1756
|
+
}
|
|
1757
|
+
) })
|
|
1758
|
+
] })
|
|
1759
|
+
}
|
|
1760
|
+
) : null
|
|
1761
|
+
]
|
|
1762
|
+
},
|
|
1763
|
+
item.id
|
|
1764
|
+
)) });
|
|
1697
1765
|
const renderItems = (items) => /* @__PURE__ */ jsx("div", { className: "space-y-1", children: items.map((item) => {
|
|
1698
1766
|
const percent = item.contextUsage && item.contextUsage.maxTokens > 0 ? Math.min(
|
|
1699
1767
|
100,
|
|
@@ -1850,7 +1918,7 @@ function AgentWorkbenchSessionList({
|
|
|
1850
1918
|
}) });
|
|
1851
1919
|
return /* @__PURE__ */ jsxs("div", { className: cn2("space-y-2", className), children: [
|
|
1852
1920
|
showHeading && !groupByMode ? /* @__PURE__ */ jsx("h3", { className: "mb-2 px-3 text-xs font-medium text-muted-foreground", children: messages.recentSessions }) : null,
|
|
1853
|
-
groupByMode ? [
|
|
1921
|
+
variant === "trend" ? renderTrendItems(sessions) : groupByMode ? [
|
|
1854
1922
|
{
|
|
1855
1923
|
id: "chatbot",
|
|
1856
1924
|
label: messages.chats,
|
|
@@ -2279,6 +2347,7 @@ function AgentWorkbenchExploreSidebar({
|
|
|
2279
2347
|
error,
|
|
2280
2348
|
showDraftSession = !selectedSessionId,
|
|
2281
2349
|
deleteSessions = false,
|
|
2350
|
+
variant = "default",
|
|
2282
2351
|
defaultGroupId,
|
|
2283
2352
|
header,
|
|
2284
2353
|
footer,
|
|
@@ -2364,6 +2433,7 @@ function AgentWorkbenchExploreSidebar({
|
|
|
2364
2433
|
{
|
|
2365
2434
|
value: searchQuery,
|
|
2366
2435
|
label: labels.search,
|
|
2436
|
+
variant,
|
|
2367
2437
|
onChange: (query) => onIntent?.({ type: "change-search", query })
|
|
2368
2438
|
}
|
|
2369
2439
|
) : void 0,
|
|
@@ -2371,6 +2441,7 @@ function AgentWorkbenchExploreSidebar({
|
|
|
2371
2441
|
AgentWorkbenchSidebarNewSessionButton,
|
|
2372
2442
|
{
|
|
2373
2443
|
label: labels.newSession,
|
|
2444
|
+
variant,
|
|
2374
2445
|
onClick: () => onIntent?.({ type: "create-session" })
|
|
2375
2446
|
}
|
|
2376
2447
|
) : void 0,
|
|
@@ -2402,6 +2473,7 @@ function AgentWorkbenchExploreSidebar({
|
|
|
2402
2473
|
noResultsLabel: labels.noResults,
|
|
2403
2474
|
retryLabel: labels.retry,
|
|
2404
2475
|
groupByMode: resolvedConfig.navigationMode !== "default",
|
|
2476
|
+
variant,
|
|
2405
2477
|
capabilities: { delete: deleteSessions },
|
|
2406
2478
|
onSelect: (sessionId) => onIntent?.({ type: "select-session", sessionId }),
|
|
2407
2479
|
onDelete: (sessionId) => onIntent?.({ type: "delete-session", sessionId }),
|