@inf-monkeys-tech/monkeys-design 1.0.61 → 1.0.62-canary.196.1.609ab65
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 +85 -50
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +86 -51
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.d.mts +3 -3
- package/dist/components/data-explorer/index.d.ts +3 -3
- package/dist/components/data-explorer/index.js +128 -29
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +128 -29
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/navigation-sidebar/index.d.mts +204 -0
- package/dist/components/navigation-sidebar/index.d.ts +204 -0
- package/dist/components/navigation-sidebar/index.js +2509 -0
- package/dist/components/navigation-sidebar/index.js.map +1 -0
- package/dist/components/navigation-sidebar/index.mjs +2487 -0
- package/dist/components/navigation-sidebar/index.mjs.map +1 -0
- package/dist/components/workbench/index.js +2347 -453
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +2348 -455
- package/dist/components/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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +11562 -10681
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11563 -10683
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +1 -1
- package/dist/provider/index.d.ts +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-7ae346c5b5d1.d.mts → theme-a36c2d7f58e5.d.mts} +2 -2
- package/dist/{theme-18525cb7bef0.d.ts → theme-bfbd415c3c15.d.ts} +2 -2
- 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/dist/{types-c2dd7eeeadcd.d.mts → types-9ddd7c5a3462.d.mts} +12 -0
- package/dist/{types-c2dd7eeeadcd.d.ts → types-9ddd7c5a3462.d.ts} +12 -0
- package/package.json +6 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { AgentWorkbenchComposerViewModel, AgentSessionPermissionProfile, AgentSessionViewModel, AgentSessionEvent } from '@inf-monkeys-tech/monkeys';
|
|
3
|
-
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-
|
|
4
|
-
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, E as AgentWorkbenchExploreCardMedia, F as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, G as AgentWorkbenchExploreMediaTreatment, H as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-
|
|
3
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-db4bd679f88e.mjs';
|
|
4
|
+
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, E as AgentWorkbenchExploreCardMedia, F as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, G as AgentWorkbenchExploreMediaTreatment, H as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-db4bd679f88e.mjs';
|
|
5
5
|
import { ReactNode, ComponentType } from 'react';
|
|
6
6
|
type AgentWorkbenchComposerIntent = {
|
|
7
7
|
type: 'change-mode';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { AgentWorkbenchComposerViewModel, AgentSessionPermissionProfile, AgentSessionViewModel, AgentSessionEvent } from '@inf-monkeys-tech/monkeys';
|
|
3
|
-
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-
|
|
4
|
-
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, E as AgentWorkbenchExploreCardMedia, F as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, G as AgentWorkbenchExploreMediaTreatment, H as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-
|
|
3
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-db4bd679f88e.js';
|
|
4
|
+
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, E as AgentWorkbenchExploreCardMedia, F as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, G as AgentWorkbenchExploreMediaTreatment, H as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-db4bd679f88e.js';
|
|
5
5
|
import { ReactNode, ComponentType } from 'react';
|
|
6
6
|
type AgentWorkbenchComposerIntent = {
|
|
7
7
|
type: 'change-mode';
|
|
@@ -1476,7 +1476,7 @@ function CollectionState({
|
|
|
1476
1476
|
}
|
|
1477
1477
|
if (status === "error") {
|
|
1478
1478
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 px-3 py-8 text-center", children: [
|
|
1479
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", role: "alert", children: error }),
|
|
1479
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-full break-words text-sm text-muted-foreground", role: "alert", children: error }),
|
|
1480
1480
|
/* @__PURE__ */ jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "gap-1.5 px-0 text-sm text-primary hover:text-primary", onClick: onRetry, children: [
|
|
1481
1481
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
|
|
1482
1482
|
messages.retry
|
|
@@ -1580,7 +1580,7 @@ function AgentWorkbenchSidebar({
|
|
|
1580
1580
|
};
|
|
1581
1581
|
const renderSessionItems = (items) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: items.map((item) => {
|
|
1582
1582
|
const percent = item.contextUsage && item.contextUsage.maxTokens > 0 ? Math.min(100, Math.round(item.contextUsage.usedTokens / item.contextUsage.maxTokens * 100)) : void 0;
|
|
1583
|
-
return /* @__PURE__ */ jsxRuntime.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: [
|
|
1583
|
+
return /* @__PURE__ */ jsxRuntime.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: [
|
|
1584
1584
|
editingSessionId === item.id ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
1585
1585
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(SessionAvatar, { item }) }),
|
|
1586
1586
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
@@ -1609,14 +1609,14 @@ function AgentWorkbenchSidebar({
|
|
|
1609
1609
|
),
|
|
1610
1610
|
/* @__PURE__ */ jsxRuntime.jsx(SessionMeta, { item, locale })
|
|
1611
1611
|
] })
|
|
1612
|
-
] }) : /* @__PURE__ */ jsxRuntime.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: [
|
|
1612
|
+
] }) : /* @__PURE__ */ jsxRuntime.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: [
|
|
1613
1613
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(SessionAvatar, { item }) }),
|
|
1614
1614
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1615
1615
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-sm font-medium", children: item.title }),
|
|
1616
1616
|
/* @__PURE__ */ jsxRuntime.jsx(SessionMeta, { item, locale })
|
|
1617
1617
|
] })
|
|
1618
1618
|
] }),
|
|
1619
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
1619
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { "data-agent-workbench-item-actions": true, className: "flex shrink-0 items-center gap-1", children: [
|
|
1620
1620
|
percent !== void 0 && item.status === "idle" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-foreground", "aria-label": messages.contextUsage({ percent }), children: [
|
|
1621
1621
|
percent,
|
|
1622
1622
|
"%"
|
|
@@ -1668,7 +1668,7 @@ function AgentWorkbenchSidebar({
|
|
|
1668
1668
|
headerActions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center", children: headerActions }) : null
|
|
1669
1669
|
] }) : null
|
|
1670
1670
|
] }),
|
|
1671
|
-
!sessionsOnly ? /* @__PURE__ */ jsxRuntime.jsxs(TabsContent, { value: "agents", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
1671
|
+
!sessionsOnly ? /* @__PURE__ */ jsxRuntime.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: [
|
|
1672
1672
|
viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxRuntime.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: [
|
|
1673
1673
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4", "aria-hidden": "true" }),
|
|
1674
1674
|
messages.newAgent
|
|
@@ -1679,16 +1679,16 @@ function AgentWorkbenchSidebar({
|
|
|
1679
1679
|
"div",
|
|
1680
1680
|
{
|
|
1681
1681
|
"aria-current": item.id === viewModel.selectedAgentItem ? "page" : void 0,
|
|
1682
|
-
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),
|
|
1682
|
+
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),
|
|
1683
1683
|
children: [
|
|
1684
|
-
/* @__PURE__ */ jsxRuntime.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: [
|
|
1684
|
+
/* @__PURE__ */ jsxRuntime.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: [
|
|
1685
1685
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(ItemAvatar, { item }) }),
|
|
1686
1686
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1687
1687
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-sm font-medium", children: item.name }),
|
|
1688
1688
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-foreground/80", children: item.description || messages.noDescription })
|
|
1689
1689
|
] })
|
|
1690
1690
|
] }),
|
|
1691
|
-
item.builtIn ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
|
|
1691
|
+
item.builtIn ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
|
|
1692
1692
|
viewModel.capabilities.pinAgents ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1693
1693
|
Button,
|
|
1694
1694
|
{
|
|
@@ -1716,7 +1716,7 @@ function AgentWorkbenchSidebar({
|
|
|
1716
1716
|
item.id
|
|
1717
1717
|
)) })
|
|
1718
1718
|
] }) : null,
|
|
1719
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsContent, { value: "sessions", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
1719
|
+
/* @__PURE__ */ jsxRuntime.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: [
|
|
1720
1720
|
viewModel.capabilities.createSession ? /* @__PURE__ */ jsxRuntime.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: [
|
|
1721
1721
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SquarePen, { className: "size-4", "aria-hidden": "true" }),
|
|
1722
1722
|
messages.newSession
|
|
@@ -1732,8 +1732,8 @@ function AgentWorkbenchSidebar({
|
|
|
1732
1732
|
{ id: "agent", label: messages.agents, icon: lucideReact.Bot, items: agentSessions }
|
|
1733
1733
|
].map(({ id, label, icon: Icon2, items }) => /* @__PURE__ */ jsxRuntime.jsxs("details", { open: true, "aria-label": label, children: [
|
|
1734
1734
|
/* @__PURE__ */ jsxRuntime.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: [
|
|
1735
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4 text-muted-foreground", "aria-hidden": "true" }),
|
|
1736
|
-
label
|
|
1735
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
|
|
1736
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: label })
|
|
1737
1737
|
] }),
|
|
1738
1738
|
renderSessionItems(items)
|
|
1739
1739
|
] }, id)) }) : !sessionsOnly ? renderSessionItems(sessions) : null
|
|
@@ -1762,7 +1762,7 @@ function AgentWorkbenchExploreCardMedia({
|
|
|
1762
1762
|
"span",
|
|
1763
1763
|
{
|
|
1764
1764
|
className: cn2(
|
|
1765
|
-
isLogo ? "flex size-full items-center justify-center bg-[var(--monkeys-color-
|
|
1765
|
+
isLogo ? "flex size-full items-center justify-center bg-[hsl(var(--monkeys-color-media-surface))] p-5" : "block size-full",
|
|
1766
1766
|
className
|
|
1767
1767
|
),
|
|
1768
1768
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1780,10 +1780,19 @@ function AgentWorkbenchExploreCardMedia({
|
|
|
1780
1780
|
)
|
|
1781
1781
|
}
|
|
1782
1782
|
),
|
|
1783
|
-
showLabel ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1783
|
+
showLabel ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1784
|
+
"span",
|
|
1785
|
+
{
|
|
1786
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-8 text-[hsl(var(--monkeys-color-media-foreground))]",
|
|
1787
|
+
style: {
|
|
1788
|
+
backgroundImage: "linear-gradient(to top, hsl(var(--monkeys-color-media-overlay) / 0.8), hsl(var(--monkeys-color-media-overlay) / 0.3), transparent)"
|
|
1789
|
+
},
|
|
1790
|
+
children: [
|
|
1791
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-base font-semibold leading-tight", children: item.title }),
|
|
1792
|
+
item.subtitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 block text-[11px] leading-tight opacity-75", children: item.subtitle }) : null
|
|
1793
|
+
]
|
|
1794
|
+
}
|
|
1795
|
+
) : null
|
|
1787
1796
|
] });
|
|
1788
1797
|
}
|
|
1789
1798
|
function AgentWorkbenchExploreSidebar({
|
|
@@ -1793,6 +1802,7 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1793
1802
|
selectedSessionId,
|
|
1794
1803
|
searchQuery = "",
|
|
1795
1804
|
loading = false,
|
|
1805
|
+
error,
|
|
1796
1806
|
showDraftSession = !selectedSessionId,
|
|
1797
1807
|
defaultGroupId,
|
|
1798
1808
|
className,
|
|
@@ -1871,34 +1881,59 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1871
1881
|
}
|
|
1872
1882
|
)
|
|
1873
1883
|
] }),
|
|
1874
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1884
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1885
|
+
"div",
|
|
1886
|
+
{
|
|
1887
|
+
"data-agent-workbench-session-scroll-region": true,
|
|
1888
|
+
className: "min-h-[160px] flex-[0_1_280px] overflow-x-hidden overflow-y-auto overscroll-contain px-4 pb-3",
|
|
1889
|
+
children: error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-24 flex-col items-center justify-center gap-2 px-3 py-6 text-center", role: "alert", children: [
|
|
1890
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "size-5 shrink-0 text-destructive-text", "aria-hidden": "true" }),
|
|
1891
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-full break-words text-sm text-muted-foreground", children: error }),
|
|
1892
|
+
labels.retry ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1893
|
+
Button,
|
|
1894
|
+
{
|
|
1895
|
+
type: "button",
|
|
1896
|
+
variant: "ghost",
|
|
1897
|
+
size: "sm",
|
|
1898
|
+
className: "gap-1.5 text-primary",
|
|
1899
|
+
onClick: () => onIntent?.({ type: "retry-sessions" }),
|
|
1900
|
+
children: [
|
|
1901
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
|
|
1902
|
+
labels.retry
|
|
1903
|
+
]
|
|
1904
|
+
}
|
|
1905
|
+
) : null
|
|
1906
|
+
] }) : loading && sessions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-24 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-5 animate-spin" }) }) : filteredSessions.length === 0 && !draftVisible ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-8 text-center text-sm text-muted-foreground", children: normalizedQuery ? labels.noResults : labels.emptySessions }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1907
|
+
draftVisible ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1908
|
+
"button",
|
|
1909
|
+
{
|
|
1910
|
+
type: "button",
|
|
1911
|
+
"aria-current": "page",
|
|
1912
|
+
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",
|
|
1913
|
+
onClick: () => onIntent?.({ type: "create-session" }),
|
|
1914
|
+
children: labels.draftSession
|
|
1915
|
+
}
|
|
1916
|
+
) : null,
|
|
1917
|
+
filteredSessions.map((session) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1918
|
+
"button",
|
|
1919
|
+
{
|
|
1920
|
+
type: "button",
|
|
1921
|
+
title: session.title,
|
|
1922
|
+
"aria-current": session.id === selectedSessionId ? "page" : void 0,
|
|
1923
|
+
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",
|
|
1924
|
+
onClick: () => onIntent?.({ type: "select-session", sessionId: session.id }),
|
|
1925
|
+
children: session.title
|
|
1926
|
+
},
|
|
1927
|
+
session.id
|
|
1928
|
+
))
|
|
1929
|
+
] })
|
|
1930
|
+
}
|
|
1931
|
+
),
|
|
1932
|
+
activeGroup ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 border-t border-border px-4 pb-4 pt-3", children: /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { value: activeGroup.id, onValueChange: changeGroup, children: [
|
|
1933
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1899
1934
|
TabsList,
|
|
1900
1935
|
{
|
|
1901
|
-
className: "grid h-10 w-full rounded-[var(--radius)] bg-muted p-0.5 text-
|
|
1936
|
+
className: "grid h-10 w-full rounded-[var(--radius)] bg-muted p-0.5 text-foreground",
|
|
1902
1937
|
style: {
|
|
1903
1938
|
gridTemplateColumns: `repeat(${groups.length}, minmax(0, 1fr))`
|
|
1904
1939
|
},
|
|
@@ -1906,30 +1941,30 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1906
1941
|
TabsTrigger,
|
|
1907
1942
|
{
|
|
1908
1943
|
value: group.id,
|
|
1909
|
-
className: "rounded-md text-sm font-semibold text-
|
|
1944
|
+
className: "rounded-md text-sm font-semibold text-foreground data-[state=active]:border data-[state=active]:border-border data-[state=active]:bg-background",
|
|
1910
1945
|
children: group.label
|
|
1911
1946
|
},
|
|
1912
1947
|
group.id
|
|
1913
1948
|
))
|
|
1914
1949
|
}
|
|
1915
|
-
)
|
|
1916
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1950
|
+
),
|
|
1951
|
+
groups.map((group) => /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: group.id, className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2", children: group.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1917
1952
|
"button",
|
|
1918
1953
|
{
|
|
1919
1954
|
type: "button",
|
|
1920
1955
|
"aria-label": item.title,
|
|
1921
1956
|
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",
|
|
1922
|
-
style: Number.isFinite(
|
|
1957
|
+
style: Number.isFinite(group.itemAspectRatio) && Number(group.itemAspectRatio) > 0 ? { aspectRatio: group.itemAspectRatio } : void 0,
|
|
1923
1958
|
onClick: () => onIntent?.({
|
|
1924
1959
|
type: "select-item",
|
|
1925
|
-
groupId:
|
|
1960
|
+
groupId: group.id,
|
|
1926
1961
|
item
|
|
1927
1962
|
}),
|
|
1928
|
-
children: renderItemMedia?.(item,
|
|
1963
|
+
children: renderItemMedia?.(item, group) ?? /* @__PURE__ */ jsxRuntime.jsx(AgentWorkbenchExploreCardMedia, { item })
|
|
1929
1964
|
},
|
|
1930
1965
|
item.id
|
|
1931
|
-
)) })
|
|
1932
|
-
] }) : null
|
|
1966
|
+
)) }) }, group.id))
|
|
1967
|
+
] }) }) : null
|
|
1933
1968
|
]
|
|
1934
1969
|
}
|
|
1935
1970
|
);
|