@inf-monkeys-tech/monkeys-design 1.0.74 → 1.0.75
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 +117 -7
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +118 -9
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/{details-model-49d05d8a4e6d.d.mts → details-model-eb8fafc32d00.d.mts} +35 -3
- package/dist/{details-model-49d05d8a4e6d.d.ts → details-model-eb8fafc32d00.d.ts} +35 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +117 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -9
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, LoaderCircle, CircleAlert, RotateCcw, X, Paperclip, FileText, Mic, Send, Square, ShoppingBag, Code2, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, Clock3, TerminalSquare, FileOutput, Download, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, CheckCircle2, XCircle, CircleStop, GitFork, PencilLine, Copy, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2
|
|
1
|
+
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, LoaderCircle, CircleAlert, RotateCcw, X, Paperclip, FileText, Mic, Send, Square, ShoppingBag, Code2, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, Ellipsis, Clock3, TerminalSquare, FileOutput, Download, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, CheckCircle2, XCircle, CircleStop, GitFork, PencilLine, Copy, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2 } from 'lucide-react';
|
|
2
2
|
import * as React5 from 'react';
|
|
3
3
|
import { useImperativeHandle, forwardRef, createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
|
|
4
4
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -1804,11 +1804,13 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1804
1804
|
loading = false,
|
|
1805
1805
|
error,
|
|
1806
1806
|
showDraftSession = !selectedSessionId,
|
|
1807
|
+
deleteSessions = false,
|
|
1807
1808
|
defaultGroupId,
|
|
1808
1809
|
className,
|
|
1809
1810
|
renderItemMedia,
|
|
1810
1811
|
onIntent
|
|
1811
1812
|
}) {
|
|
1813
|
+
const navigationMessages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
1812
1814
|
const searchRef = useRef(null);
|
|
1813
1815
|
const [activeGroupId, setActiveGroupId] = useState(
|
|
1814
1816
|
defaultGroupId ?? groups[0]?.id ?? ""
|
|
@@ -1914,15 +1916,50 @@ function AgentWorkbenchExploreSidebar({
|
|
|
1914
1916
|
children: labels.draftSession
|
|
1915
1917
|
}
|
|
1916
1918
|
) : null,
|
|
1917
|
-
filteredSessions.map((session) => /* @__PURE__ */
|
|
1918
|
-
"
|
|
1919
|
+
filteredSessions.map((session) => /* @__PURE__ */ jsxs(
|
|
1920
|
+
"div",
|
|
1919
1921
|
{
|
|
1920
|
-
type: "button",
|
|
1921
|
-
title: session.title,
|
|
1922
1922
|
"aria-current": session.id === selectedSessionId ? "page" : void 0,
|
|
1923
|
-
className: "
|
|
1924
|
-
|
|
1925
|
-
|
|
1923
|
+
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",
|
|
1924
|
+
children: [
|
|
1925
|
+
/* @__PURE__ */ jsx(
|
|
1926
|
+
"button",
|
|
1927
|
+
{
|
|
1928
|
+
type: "button",
|
|
1929
|
+
title: session.title,
|
|
1930
|
+
className: "h-full min-w-0 flex-1 truncate px-3 text-left text-sm font-semibold",
|
|
1931
|
+
onClick: () => onIntent?.({ type: "select-session", sessionId: session.id }),
|
|
1932
|
+
children: session.title
|
|
1933
|
+
}
|
|
1934
|
+
),
|
|
1935
|
+
deleteSessions ? /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
|
|
1936
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1937
|
+
Button,
|
|
1938
|
+
{
|
|
1939
|
+
type: "button",
|
|
1940
|
+
variant: "ghost",
|
|
1941
|
+
size: "icon",
|
|
1942
|
+
"aria-label": navigationMessages.actions,
|
|
1943
|
+
className: "mr-1 size-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-aria-[current=page]:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100",
|
|
1944
|
+
children: /* @__PURE__ */ jsx(Ellipsis, { className: "size-4", "aria-hidden": "true" })
|
|
1945
|
+
}
|
|
1946
|
+
) }),
|
|
1947
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: /* @__PURE__ */ jsxs(
|
|
1948
|
+
DropdownMenuItem,
|
|
1949
|
+
{
|
|
1950
|
+
className: "text-destructive-text",
|
|
1951
|
+
onSelect: () => onIntent?.({
|
|
1952
|
+
type: "delete-session",
|
|
1953
|
+
sessionId: session.id
|
|
1954
|
+
}),
|
|
1955
|
+
children: [
|
|
1956
|
+
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4", "aria-hidden": "true" }),
|
|
1957
|
+
navigationMessages.delete
|
|
1958
|
+
]
|
|
1959
|
+
}
|
|
1960
|
+
) })
|
|
1961
|
+
] }) : null
|
|
1962
|
+
]
|
|
1926
1963
|
},
|
|
1927
1964
|
session.id
|
|
1928
1965
|
))
|
|
@@ -3327,6 +3364,78 @@ var AgentWorkbenchThreadShell = forwardRef(
|
|
|
3327
3364
|
);
|
|
3328
3365
|
}
|
|
3329
3366
|
);
|
|
3367
|
+
function cssSize(value) {
|
|
3368
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
3369
|
+
}
|
|
3370
|
+
function AgentWorkbenchShell({
|
|
3371
|
+
sidebar,
|
|
3372
|
+
children,
|
|
3373
|
+
details,
|
|
3374
|
+
sidebarOpen = true,
|
|
3375
|
+
detailsOpen = true,
|
|
3376
|
+
sidebarWidth = 280,
|
|
3377
|
+
detailsWidth = 360,
|
|
3378
|
+
className,
|
|
3379
|
+
classNames,
|
|
3380
|
+
style,
|
|
3381
|
+
...rootProps
|
|
3382
|
+
}) {
|
|
3383
|
+
const hasSidebar = sidebar !== void 0 && sidebarOpen;
|
|
3384
|
+
const hasDetails = details !== void 0 && detailsOpen;
|
|
3385
|
+
const shellStyle = {
|
|
3386
|
+
"--agent-workbench-sidebar-width": hasSidebar ? cssSize(sidebarWidth) : "0px",
|
|
3387
|
+
"--agent-workbench-details-width": hasDetails ? cssSize(detailsWidth) : "0px",
|
|
3388
|
+
gridTemplateColumns: hasSidebar && hasDetails ? "var(--agent-workbench-sidebar-width) minmax(0, 1fr) var(--agent-workbench-details-width)" : hasSidebar ? "var(--agent-workbench-sidebar-width) minmax(0, 1fr)" : hasDetails ? "minmax(0, 1fr) var(--agent-workbench-details-width)" : "minmax(0, 1fr)",
|
|
3389
|
+
...style
|
|
3390
|
+
};
|
|
3391
|
+
return /* @__PURE__ */ jsxs(
|
|
3392
|
+
"div",
|
|
3393
|
+
{
|
|
3394
|
+
...rootProps,
|
|
3395
|
+
"data-agent-workbench-shell": "true",
|
|
3396
|
+
"data-sidebar-open": hasSidebar ? "true" : "false",
|
|
3397
|
+
"data-details-open": hasDetails ? "true" : "false",
|
|
3398
|
+
className: cn2(
|
|
3399
|
+
"grid size-full min-h-0 min-w-0 overflow-hidden bg-background text-foreground",
|
|
3400
|
+
classNames?.root,
|
|
3401
|
+
className
|
|
3402
|
+
),
|
|
3403
|
+
style: shellStyle,
|
|
3404
|
+
children: [
|
|
3405
|
+
hasSidebar ? /* @__PURE__ */ jsx(
|
|
3406
|
+
"aside",
|
|
3407
|
+
{
|
|
3408
|
+
"data-agent-workbench-region": "sidebar",
|
|
3409
|
+
className: cn2(
|
|
3410
|
+
"min-h-0 min-w-0 overflow-hidden border-r border-border bg-background",
|
|
3411
|
+
classNames?.sidebar
|
|
3412
|
+
),
|
|
3413
|
+
children: sidebar
|
|
3414
|
+
}
|
|
3415
|
+
) : null,
|
|
3416
|
+
/* @__PURE__ */ jsx(
|
|
3417
|
+
"main",
|
|
3418
|
+
{
|
|
3419
|
+
"data-agent-workbench-region": "main",
|
|
3420
|
+
className: cn2("min-h-0 min-w-0 overflow-hidden", classNames?.main),
|
|
3421
|
+
children
|
|
3422
|
+
}
|
|
3423
|
+
),
|
|
3424
|
+
hasDetails ? /* @__PURE__ */ jsx(
|
|
3425
|
+
"aside",
|
|
3426
|
+
{
|
|
3427
|
+
"data-agent-workbench-region": "details",
|
|
3428
|
+
className: cn2(
|
|
3429
|
+
"min-h-0 min-w-0 overflow-hidden border-l border-border bg-background",
|
|
3430
|
+
classNames?.details
|
|
3431
|
+
),
|
|
3432
|
+
children: details
|
|
3433
|
+
}
|
|
3434
|
+
) : null
|
|
3435
|
+
]
|
|
3436
|
+
}
|
|
3437
|
+
);
|
|
3438
|
+
}
|
|
3330
3439
|
function formatDuration3(durationMs) {
|
|
3331
3440
|
const totalSeconds = Math.max(0, Math.floor(durationMs / 1e3));
|
|
3332
3441
|
const hours = Math.floor(totalSeconds / 3600);
|
|
@@ -3792,6 +3901,6 @@ function AgentWorkbenchArtifactWorkspace({
|
|
|
3792
3901
|
);
|
|
3793
3902
|
}
|
|
3794
3903
|
|
|
3795
|
-
export { AgentWorkbenchAction, AgentWorkbenchActivity, AgentWorkbenchApproval, AgentWorkbenchArtifactSummary, AgentWorkbenchArtifactWorkspace, AgentWorkbenchComposer, AgentWorkbenchExploreCardMedia, AgentWorkbenchExploreSidebar, AgentWorkbenchMessage, AgentWorkbenchMessageAction, AgentWorkbenchMessageActions, AgentWorkbenchMessageContent, AgentWorkbenchProcess, AgentWorkbenchQuickStart, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchThread, AgentWorkbenchThreadShell, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
3904
|
+
export { AgentWorkbenchAction, AgentWorkbenchActivity, AgentWorkbenchApproval, AgentWorkbenchArtifactSummary, AgentWorkbenchArtifactWorkspace, AgentWorkbenchComposer, AgentWorkbenchExploreCardMedia, AgentWorkbenchExploreSidebar, AgentWorkbenchMessage, AgentWorkbenchMessageAction, AgentWorkbenchMessageActions, AgentWorkbenchMessageContent, AgentWorkbenchProcess, AgentWorkbenchQuickStart, AgentWorkbenchShell, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchThread, AgentWorkbenchThreadShell, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
3796
3905
|
//# sourceMappingURL=index.mjs.map
|
|
3797
3906
|
//# sourceMappingURL=index.mjs.map
|