@inf-monkeys-tech/monkeys-design 1.0.62 → 1.0.63
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 +14 -3
- package/dist/components/agent-workbench/index.d.ts +14 -3
- package/dist/components/agent-workbench/index.js +106 -50
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +107 -51
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/{details-model-765193fe43be.d.mts → details-model-db4bd679f88e.d.mts} +5 -1
- package/dist/{details-model-765193fe43be.d.ts → details-model-db4bd679f88e.d.ts} +5 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +88 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +89 -51
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.js +3 -0
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +3 -0
- package/dist/provider/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme-system/index.js +3 -0
- package/dist/theme-system/index.js.map +1 -1
- package/dist/theme-system/index.mjs +3 -0
- package/dist/theme-system/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, Mic, Send, Square, ShoppingBag, Code2,
|
|
1
|
+
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, FileText, Mic, Send, Square, ShoppingBag, Code2, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, TerminalSquare, Clock3, FileOutput, Download, CircleAlert, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, CheckCircle2, XCircle, CircleStop, GitFork, PencilLine, Copy, RotateCcw, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2, Ellipsis } from 'lucide-react';
|
|
2
2
|
import * as React5 from 'react';
|
|
3
3
|
import { useImperativeHandle, createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
|
|
4
4
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -988,6 +988,8 @@ function AgentWorkbenchComposer({
|
|
|
988
988
|
const selected = visibleModelOptions.find((option) => option.id === viewModel.model.selectedId && option.mode === viewModel.mode);
|
|
989
989
|
return selected ? modelOptionValue(selected) : visibleModelOptions[0] ? modelOptionValue(visibleModelOptions[0]) : "";
|
|
990
990
|
}, [viewModel.mode, viewModel.model.selectedId, visibleModelOptions]);
|
|
991
|
+
const inputActions = viewModel.inputActions || [];
|
|
992
|
+
const selectedInputActionId = viewModel.selectedInputActionId;
|
|
991
993
|
useEffect(() => {
|
|
992
994
|
const surface = surfaceRef.current;
|
|
993
995
|
if (!surface) return void 0;
|
|
@@ -1118,6 +1120,25 @@ function AgentWorkbenchComposer({
|
|
|
1118
1120
|
}
|
|
1119
1121
|
)
|
|
1120
1122
|
] }) : null,
|
|
1123
|
+
inputActions.map((action) => {
|
|
1124
|
+
const ActionIcon = action.icon === "image" ? Image : FileText;
|
|
1125
|
+
return /* @__PURE__ */ jsxs(
|
|
1126
|
+
Button,
|
|
1127
|
+
{
|
|
1128
|
+
type: "button",
|
|
1129
|
+
variant: selectedInputActionId === action.id ? "secondary" : "ghost",
|
|
1130
|
+
size: "sm",
|
|
1131
|
+
className: "h-8 shrink-0 gap-1.5 px-2 text-xs",
|
|
1132
|
+
"aria-pressed": selectedInputActionId === action.id,
|
|
1133
|
+
onClick: () => onIntent?.({ type: "select-input-action", actionId: action.id }),
|
|
1134
|
+
children: [
|
|
1135
|
+
/* @__PURE__ */ jsx(ActionIcon, { className: "size-3.5" }),
|
|
1136
|
+
action.label
|
|
1137
|
+
]
|
|
1138
|
+
},
|
|
1139
|
+
action.id
|
|
1140
|
+
);
|
|
1141
|
+
}),
|
|
1121
1142
|
viewModel.capabilities.voiceInput ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: iconButtonClass, "aria-label": messages.composer.voice, onClick: () => onIntent?.({ type: "request-voice-input" }), children: /* @__PURE__ */ jsx(Mic, { className: "size-4" }) }) : null,
|
|
1122
1143
|
viewModel.capabilities.webSearch ? /* @__PURE__ */ jsxs("label", { className: "flex shrink-0 items-center gap-1.5 whitespace-nowrap px-1 text-xs font-medium text-foreground", children: [
|
|
1123
1144
|
messages.composer.webSearch,
|
|
@@ -1445,7 +1466,7 @@ function CollectionState({
|
|
|
1445
1466
|
}
|
|
1446
1467
|
if (status === "error") {
|
|
1447
1468
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 px-3 py-8 text-center", children: [
|
|
1448
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", role: "alert", children: error }),
|
|
1469
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-full break-words text-sm text-muted-foreground", role: "alert", children: error }),
|
|
1449
1470
|
/* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "gap-1.5 px-0 text-sm text-primary hover:text-primary", onClick: onRetry, children: [
|
|
1450
1471
|
/* @__PURE__ */ jsx(RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
|
|
1451
1472
|
messages.retry
|
|
@@ -1549,7 +1570,7 @@ function AgentWorkbenchSidebar({
|
|
|
1549
1570
|
};
|
|
1550
1571
|
const renderSessionItems = (items) => /* @__PURE__ */ jsx("div", { className: "space-y-1", children: items.map((item) => {
|
|
1551
1572
|
const percent = item.contextUsage && item.contextUsage.maxTokens > 0 ? Math.min(100, Math.round(item.contextUsage.usedTokens / item.contextUsage.maxTokens * 100)) : void 0;
|
|
1552
|
-
return /* @__PURE__ */ jsxs("div", { "aria-current": item.id === viewModel.selectedSessionItem ? "page" : void 0, className: cn2("group flex w-full items-center gap-3 rounded-lg border border-transparent px-3 py-2 text-left hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-muted", classNames?.item), children: [
|
|
1573
|
+
return /* @__PURE__ */ jsxs("div", { "aria-current": item.id === viewModel.selectedSessionItem ? "page" : void 0, className: cn2("group flex w-full min-w-0 items-center gap-3 rounded-lg border border-transparent px-3 py-2 text-left hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-muted", classNames?.item), children: [
|
|
1553
1574
|
editingSessionId === item.id ? /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
1554
1575
|
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(SessionAvatar, { item }) }),
|
|
1555
1576
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
@@ -1578,14 +1599,14 @@ function AgentWorkbenchSidebar({
|
|
|
1578
1599
|
),
|
|
1579
1600
|
/* @__PURE__ */ jsx(SessionMeta, { item, locale })
|
|
1580
1601
|
] })
|
|
1581
|
-
] }) : /* @__PURE__ */ jsxs("button", { type: "button", className: "flex min-w-0 flex-1 items-center gap-3 text-left", onClick: () => onIntent?.({ type: "select-session", sessionId: item.id }), children: [
|
|
1602
|
+
] }) : /* @__PURE__ */ jsxs("button", { type: "button", title: item.title, className: "flex min-w-0 flex-1 items-center gap-3 text-left", onClick: () => onIntent?.({ type: "select-session", sessionId: item.id }), children: [
|
|
1582
1603
|
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(SessionAvatar, { item }) }),
|
|
1583
1604
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1584
1605
|
/* @__PURE__ */ jsx("span", { className: "block truncate text-sm font-medium", children: item.title }),
|
|
1585
1606
|
/* @__PURE__ */ jsx(SessionMeta, { item, locale })
|
|
1586
1607
|
] })
|
|
1587
1608
|
] }),
|
|
1588
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
1609
|
+
/* @__PURE__ */ jsxs("span", { "data-agent-workbench-item-actions": true, className: "flex shrink-0 items-center gap-1", children: [
|
|
1589
1610
|
percent !== void 0 && item.status === "idle" ? /* @__PURE__ */ jsxs("span", { className: "text-xs text-foreground", "aria-label": messages.contextUsage({ percent }), children: [
|
|
1590
1611
|
percent,
|
|
1591
1612
|
"%"
|
|
@@ -1637,7 +1658,7 @@ function AgentWorkbenchSidebar({
|
|
|
1637
1658
|
headerActions ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center", children: headerActions }) : null
|
|
1638
1659
|
] }) : null
|
|
1639
1660
|
] }),
|
|
1640
|
-
!sessionsOnly ? /* @__PURE__ */ jsxs(TabsContent, { value: "agents", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
1661
|
+
!sessionsOnly ? /* @__PURE__ */ jsxs(TabsContent, { value: "agents", "data-agent-workbench-scroll-region": true, className: cn2("mt-0 min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain px-4 pb-4", classNames?.body), children: [
|
|
1641
1662
|
viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", className: "mb-3 h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "create-agent" }), children: [
|
|
1642
1663
|
/* @__PURE__ */ jsx(Plus, { className: "size-4", "aria-hidden": "true" }),
|
|
1643
1664
|
messages.newAgent
|
|
@@ -1648,16 +1669,16 @@ function AgentWorkbenchSidebar({
|
|
|
1648
1669
|
"div",
|
|
1649
1670
|
{
|
|
1650
1671
|
"aria-current": item.id === viewModel.selectedAgentItem ? "page" : void 0,
|
|
1651
|
-
className: cn2("group flex w-full items-center gap-3 rounded-lg border border-transparent px-3 py-2 text-left hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-muted", classNames?.item),
|
|
1672
|
+
className: cn2("group flex w-full min-w-0 items-center gap-3 rounded-lg border border-transparent px-3 py-2 text-left hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-muted", classNames?.item),
|
|
1652
1673
|
children: [
|
|
1653
|
-
/* @__PURE__ */ jsxs("button", { type: "button", className: "flex min-w-0 flex-1 items-center gap-3 text-left", onClick: () => onIntent?.({ type: "select-agent", itemId: item.id }), children: [
|
|
1674
|
+
/* @__PURE__ */ jsxs("button", { type: "button", title: item.name, className: "flex min-w-0 flex-1 items-center gap-3 text-left", onClick: () => onIntent?.({ type: "select-agent", itemId: item.id }), children: [
|
|
1654
1675
|
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(ItemAvatar, { item }) }),
|
|
1655
1676
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1656
1677
|
/* @__PURE__ */ jsx("span", { className: "block truncate text-sm font-medium", children: item.name }),
|
|
1657
1678
|
/* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-foreground/80", children: item.description || messages.noDescription })
|
|
1658
1679
|
] })
|
|
1659
1680
|
] }),
|
|
1660
|
-
item.builtIn ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
|
|
1681
|
+
item.builtIn ? /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
|
|
1661
1682
|
viewModel.capabilities.pinAgents ? /* @__PURE__ */ jsx(
|
|
1662
1683
|
Button,
|
|
1663
1684
|
{
|
|
@@ -1685,7 +1706,7 @@ function AgentWorkbenchSidebar({
|
|
|
1685
1706
|
item.id
|
|
1686
1707
|
)) })
|
|
1687
1708
|
] }) : null,
|
|
1688
|
-
/* @__PURE__ */ jsxs(TabsContent, { value: "sessions", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
1709
|
+
/* @__PURE__ */ jsxs(TabsContent, { value: "sessions", "data-agent-workbench-scroll-region": true, className: cn2("mt-0 min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain px-4 pb-4", classNames?.body), children: [
|
|
1689
1710
|
viewModel.capabilities.createSession ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", className: "h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "create-session" }), children: [
|
|
1690
1711
|
/* @__PURE__ */ jsx(SquarePen, { className: "size-4", "aria-hidden": "true" }),
|
|
1691
1712
|
messages.newSession
|
|
@@ -1701,8 +1722,8 @@ function AgentWorkbenchSidebar({
|
|
|
1701
1722
|
{ id: "agent", label: messages.agents, icon: Bot, items: agentSessions }
|
|
1702
1723
|
].map(({ id, label, icon: Icon2, items }) => /* @__PURE__ */ jsxs("details", { open: true, "aria-label": label, children: [
|
|
1703
1724
|
/* @__PURE__ */ jsxs("summary", { className: "flex h-9 cursor-pointer list-none items-center gap-2 rounded-md px-3 text-sm font-semibold hover:bg-muted", children: [
|
|
1704
|
-
/* @__PURE__ */ jsx(Icon2, { className: "size-4 text-muted-foreground", "aria-hidden": "true" }),
|
|
1705
|
-
label
|
|
1725
|
+
/* @__PURE__ */ jsx(Icon2, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
|
|
1726
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: label })
|
|
1706
1727
|
] }),
|
|
1707
1728
|
renderSessionItems(items)
|
|
1708
1729
|
] }, id)) }) : !sessionsOnly ? renderSessionItems(sessions) : null
|
|
@@ -1731,7 +1752,7 @@ function AgentWorkbenchExploreCardMedia({
|
|
|
1731
1752
|
"span",
|
|
1732
1753
|
{
|
|
1733
1754
|
className: cn2(
|
|
1734
|
-
isLogo ? "flex size-full items-center justify-center bg-[var(--monkeys-color-
|
|
1755
|
+
isLogo ? "flex size-full items-center justify-center bg-[hsl(var(--monkeys-color-media-surface))] p-5" : "block size-full",
|
|
1735
1756
|
className
|
|
1736
1757
|
),
|
|
1737
1758
|
children: /* @__PURE__ */ jsx(
|
|
@@ -1749,10 +1770,19 @@ function AgentWorkbenchExploreCardMedia({
|
|
|
1749
1770
|
)
|
|
1750
1771
|
}
|
|
1751
1772
|
),
|
|
1752
|
-
showLabel ? /* @__PURE__ */ jsxs(
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1773
|
+
showLabel ? /* @__PURE__ */ jsxs(
|
|
1774
|
+
"span",
|
|
1775
|
+
{
|
|
1776
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-8 text-[hsl(var(--monkeys-color-media-foreground))]",
|
|
1777
|
+
style: {
|
|
1778
|
+
backgroundImage: "linear-gradient(to top, hsl(var(--monkeys-color-media-overlay) / 0.8), hsl(var(--monkeys-color-media-overlay) / 0.3), transparent)"
|
|
1779
|
+
},
|
|
1780
|
+
children: [
|
|
1781
|
+
/* @__PURE__ */ jsx("span", { className: "block text-base font-semibold leading-tight", children: item.title }),
|
|
1782
|
+
item.subtitle ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[11px] leading-tight opacity-75", children: item.subtitle }) : null
|
|
1783
|
+
]
|
|
1784
|
+
}
|
|
1785
|
+
) : null
|
|
1756
1786
|
] });
|
|
1757
1787
|
}
|
|
1758
1788
|
function AgentWorkbenchExploreSidebar({
|
|
@@ -1762,6 +1792,7 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1762
1792
|
selectedSessionId,
|
|
1763
1793
|
searchQuery = "",
|
|
1764
1794
|
loading = false,
|
|
1795
|
+
error,
|
|
1765
1796
|
showDraftSession = !selectedSessionId,
|
|
1766
1797
|
defaultGroupId,
|
|
1767
1798
|
className,
|
|
@@ -1840,34 +1871,59 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1840
1871
|
}
|
|
1841
1872
|
)
|
|
1842
1873
|
] }),
|
|
1843
|
-
/* @__PURE__ */ jsx(
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1874
|
+
/* @__PURE__ */ jsx(
|
|
1875
|
+
"div",
|
|
1876
|
+
{
|
|
1877
|
+
"data-agent-workbench-session-scroll-region": true,
|
|
1878
|
+
className: "min-h-[160px] flex-[0_1_280px] overflow-x-hidden overflow-y-auto overscroll-contain px-4 pb-3",
|
|
1879
|
+
children: error ? /* @__PURE__ */ jsxs("div", { className: "flex min-h-24 flex-col items-center justify-center gap-2 px-3 py-6 text-center", role: "alert", children: [
|
|
1880
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "size-5 shrink-0 text-destructive-text", "aria-hidden": "true" }),
|
|
1881
|
+
/* @__PURE__ */ jsx("p", { className: "max-w-full break-words text-sm text-muted-foreground", children: error }),
|
|
1882
|
+
labels.retry ? /* @__PURE__ */ jsxs(
|
|
1883
|
+
Button,
|
|
1884
|
+
{
|
|
1885
|
+
type: "button",
|
|
1886
|
+
variant: "ghost",
|
|
1887
|
+
size: "sm",
|
|
1888
|
+
className: "gap-1.5 text-primary",
|
|
1889
|
+
onClick: () => onIntent?.({ type: "retry-sessions" }),
|
|
1890
|
+
children: [
|
|
1891
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
|
|
1892
|
+
labels.retry
|
|
1893
|
+
]
|
|
1894
|
+
}
|
|
1895
|
+
) : null
|
|
1896
|
+
] }) : loading && sessions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-24 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsx(Loader2, { className: "size-5 animate-spin" }) }) : filteredSessions.length === 0 && !draftVisible ? /* @__PURE__ */ jsx("div", { className: "px-3 py-8 text-center text-sm text-muted-foreground", children: normalizedQuery ? labels.noResults : labels.emptySessions }) : /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
1897
|
+
draftVisible ? /* @__PURE__ */ jsx(
|
|
1898
|
+
"button",
|
|
1899
|
+
{
|
|
1900
|
+
type: "button",
|
|
1901
|
+
"aria-current": "page",
|
|
1902
|
+
className: "block h-10 w-full min-w-0 truncate rounded-[var(--radius)] border border-primary bg-primary/10 px-3 text-left text-sm font-semibold text-foreground",
|
|
1903
|
+
onClick: () => onIntent?.({ type: "create-session" }),
|
|
1904
|
+
children: labels.draftSession
|
|
1905
|
+
}
|
|
1906
|
+
) : null,
|
|
1907
|
+
filteredSessions.map((session) => /* @__PURE__ */ jsx(
|
|
1908
|
+
"button",
|
|
1909
|
+
{
|
|
1910
|
+
type: "button",
|
|
1911
|
+
title: session.title,
|
|
1912
|
+
"aria-current": session.id === selectedSessionId ? "page" : void 0,
|
|
1913
|
+
className: "block h-10 w-full min-w-0 truncate rounded-[var(--radius)] border border-transparent bg-muted/60 px-3 text-left text-sm font-semibold text-foreground transition hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-primary/10",
|
|
1914
|
+
onClick: () => onIntent?.({ type: "select-session", sessionId: session.id }),
|
|
1915
|
+
children: session.title
|
|
1916
|
+
},
|
|
1917
|
+
session.id
|
|
1918
|
+
))
|
|
1919
|
+
] })
|
|
1920
|
+
}
|
|
1921
|
+
),
|
|
1922
|
+
activeGroup ? /* @__PURE__ */ jsx("div", { className: "shrink-0 border-t border-border px-4 pb-4 pt-3", children: /* @__PURE__ */ jsxs(Tabs, { value: activeGroup.id, onValueChange: changeGroup, children: [
|
|
1923
|
+
/* @__PURE__ */ jsx(
|
|
1868
1924
|
TabsList,
|
|
1869
1925
|
{
|
|
1870
|
-
className: "grid h-10 w-full rounded-[var(--radius)] bg-muted p-0.5 text-
|
|
1926
|
+
className: "grid h-10 w-full rounded-[var(--radius)] bg-muted p-0.5 text-foreground",
|
|
1871
1927
|
style: {
|
|
1872
1928
|
gridTemplateColumns: `repeat(${groups.length}, minmax(0, 1fr))`
|
|
1873
1929
|
},
|
|
@@ -1875,30 +1931,30 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1875
1931
|
TabsTrigger,
|
|
1876
1932
|
{
|
|
1877
1933
|
value: group.id,
|
|
1878
|
-
className: "rounded-md text-sm font-semibold text-
|
|
1934
|
+
className: "rounded-md text-sm font-semibold text-foreground data-[state=active]:border data-[state=active]:border-border data-[state=active]:bg-background",
|
|
1879
1935
|
children: group.label
|
|
1880
1936
|
},
|
|
1881
1937
|
group.id
|
|
1882
1938
|
))
|
|
1883
1939
|
}
|
|
1884
|
-
)
|
|
1885
|
-
/* @__PURE__ */ jsx(
|
|
1940
|
+
),
|
|
1941
|
+
groups.map((group) => /* @__PURE__ */ jsx(TabsContent, { value: group.id, className: "mt-3", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2", children: group.items.map((item) => /* @__PURE__ */ jsx(
|
|
1886
1942
|
"button",
|
|
1887
1943
|
{
|
|
1888
1944
|
type: "button",
|
|
1889
1945
|
"aria-label": item.title,
|
|
1890
1946
|
className: "group relative aspect-[1.27] overflow-hidden rounded-[var(--radius)] border border-border bg-card text-left transition hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1891
|
-
style: Number.isFinite(
|
|
1947
|
+
style: Number.isFinite(group.itemAspectRatio) && Number(group.itemAspectRatio) > 0 ? { aspectRatio: group.itemAspectRatio } : void 0,
|
|
1892
1948
|
onClick: () => onIntent?.({
|
|
1893
1949
|
type: "select-item",
|
|
1894
|
-
groupId:
|
|
1950
|
+
groupId: group.id,
|
|
1895
1951
|
item
|
|
1896
1952
|
}),
|
|
1897
|
-
children: renderItemMedia?.(item,
|
|
1953
|
+
children: renderItemMedia?.(item, group) ?? /* @__PURE__ */ jsx(AgentWorkbenchExploreCardMedia, { item })
|
|
1898
1954
|
},
|
|
1899
1955
|
item.id
|
|
1900
|
-
)) })
|
|
1901
|
-
] }) : null
|
|
1956
|
+
)) }) }, group.id))
|
|
1957
|
+
] }) }) : null
|
|
1902
1958
|
]
|
|
1903
1959
|
}
|
|
1904
1960
|
);
|