@inf-monkeys-tech/monkeys-design 1.0.52 → 1.0.53-canary.172.1.fa92e64
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 +155 -0
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +156 -2
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/{details-model-bc28e9593e3f.d.mts → details-model-2eb132663bb1.d.mts} +50 -2
- package/dist/{details-model-bc28e9593e3f.d.ts → details-model-2eb132663bb1.d.ts} +50 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +155 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +156 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -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, k as
|
|
3
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-2eb132663bb1.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, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, 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-2eb132663bb1.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, k as
|
|
3
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-2eb132663bb1.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, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, 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-2eb132663bb1.js';
|
|
5
5
|
import { ReactNode, ComponentType } from 'react';
|
|
6
6
|
type AgentWorkbenchComposerIntent = {
|
|
7
7
|
type: 'change-mode';
|
|
@@ -1746,6 +1746,160 @@ function AgentWorkbenchSidebar({
|
|
|
1746
1746
|
}
|
|
1747
1747
|
) });
|
|
1748
1748
|
}
|
|
1749
|
+
function AgentWorkbenchExploreSidebar({
|
|
1750
|
+
sessions,
|
|
1751
|
+
groups,
|
|
1752
|
+
labels,
|
|
1753
|
+
selectedSessionId,
|
|
1754
|
+
searchQuery = "",
|
|
1755
|
+
loading = false,
|
|
1756
|
+
showDraftSession = !selectedSessionId,
|
|
1757
|
+
defaultGroupId,
|
|
1758
|
+
className,
|
|
1759
|
+
renderItemMedia,
|
|
1760
|
+
onIntent
|
|
1761
|
+
}) {
|
|
1762
|
+
const searchRef = React5.useRef(null);
|
|
1763
|
+
const [activeGroupId, setActiveGroupId] = React5.useState(
|
|
1764
|
+
defaultGroupId ?? groups[0]?.id ?? ""
|
|
1765
|
+
);
|
|
1766
|
+
const activeGroup = groups.find((group) => group.id === activeGroupId) ?? groups[0];
|
|
1767
|
+
const normalizedQuery = searchQuery.trim().toLocaleLowerCase();
|
|
1768
|
+
const draftVisible = showDraftSession && (!normalizedQuery || labels.draftSession.toLocaleLowerCase().includes(normalizedQuery));
|
|
1769
|
+
const filteredSessions = React5.useMemo(
|
|
1770
|
+
() => sessions.filter(
|
|
1771
|
+
(session) => !normalizedQuery || session.title.toLocaleLowerCase().includes(normalizedQuery)
|
|
1772
|
+
),
|
|
1773
|
+
[normalizedQuery, sessions]
|
|
1774
|
+
);
|
|
1775
|
+
React5.useEffect(() => {
|
|
1776
|
+
if (groups.some((group) => group.id === activeGroupId)) return;
|
|
1777
|
+
setActiveGroupId(defaultGroupId ?? groups[0]?.id ?? "");
|
|
1778
|
+
}, [activeGroupId, defaultGroupId, groups]);
|
|
1779
|
+
React5.useEffect(() => {
|
|
1780
|
+
const handleShortcut = (event) => {
|
|
1781
|
+
if (!(event.ctrlKey || event.metaKey) || event.key.toLocaleLowerCase() !== "k")
|
|
1782
|
+
return;
|
|
1783
|
+
event.preventDefault();
|
|
1784
|
+
searchRef.current?.focus();
|
|
1785
|
+
searchRef.current?.select();
|
|
1786
|
+
};
|
|
1787
|
+
window.addEventListener("keydown", handleShortcut);
|
|
1788
|
+
return () => window.removeEventListener("keydown", handleShortcut);
|
|
1789
|
+
}, []);
|
|
1790
|
+
const changeGroup = (groupId) => {
|
|
1791
|
+
setActiveGroupId(groupId);
|
|
1792
|
+
onIntent?.({ type: "change-group", groupId });
|
|
1793
|
+
};
|
|
1794
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1795
|
+
"nav",
|
|
1796
|
+
{
|
|
1797
|
+
"data-sidebar-style": "explore",
|
|
1798
|
+
"aria-label": labels.navigation,
|
|
1799
|
+
className: cn2(
|
|
1800
|
+
"flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
1801
|
+
className
|
|
1802
|
+
),
|
|
1803
|
+
children: [
|
|
1804
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 space-y-3 px-4 pb-2 pt-4", children: [
|
|
1805
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className: "h-12 rounded-2xl border-white/15 bg-white/[0.04] text-white", children: [
|
|
1806
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "size-4 text-white/70", "aria-hidden": "true" }) }),
|
|
1807
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1808
|
+
InputGroupInput,
|
|
1809
|
+
{
|
|
1810
|
+
ref: searchRef,
|
|
1811
|
+
type: "search",
|
|
1812
|
+
value: searchQuery,
|
|
1813
|
+
"aria-label": labels.search,
|
|
1814
|
+
placeholder: labels.search,
|
|
1815
|
+
className: "min-w-0 text-white placeholder:text-white/55 [&::-webkit-search-cancel-button]:hidden",
|
|
1816
|
+
onChange: (event) => onIntent?.({ type: "change-search", query: event.target.value })
|
|
1817
|
+
}
|
|
1818
|
+
),
|
|
1819
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "rounded border border-white/20 px-1.5 py-0.5 text-[10px] text-white/70", children: "Ctrl K" }) })
|
|
1820
|
+
] }),
|
|
1821
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1822
|
+
Button,
|
|
1823
|
+
{
|
|
1824
|
+
type: "button",
|
|
1825
|
+
className: "h-11 w-full justify-start gap-2 rounded-xl border border-primary/60 bg-primary px-3 font-semibold text-primary-foreground hover:bg-primary/90",
|
|
1826
|
+
onClick: () => onIntent?.({ type: "create-session" }),
|
|
1827
|
+
children: [
|
|
1828
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SquarePen, { className: "size-4", "aria-hidden": "true" }),
|
|
1829
|
+
labels.newSession
|
|
1830
|
+
]
|
|
1831
|
+
}
|
|
1832
|
+
)
|
|
1833
|
+
] }),
|
|
1834
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[160px] flex-[0_1_280px] overflow-y-auto px-4 pb-3", children: loading && sessions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-24 items-center justify-center text-white/60", 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-white/55", children: normalizedQuery ? labels.noResults : labels.emptySessions }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1835
|
+
draftVisible ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1836
|
+
"button",
|
|
1837
|
+
{
|
|
1838
|
+
type: "button",
|
|
1839
|
+
"aria-current": "page",
|
|
1840
|
+
className: "block h-10 w-full truncate rounded-xl border border-primary bg-white/10 px-3 text-left text-sm font-semibold text-white",
|
|
1841
|
+
onClick: () => onIntent?.({ type: "create-session" }),
|
|
1842
|
+
children: labels.draftSession
|
|
1843
|
+
}
|
|
1844
|
+
) : null,
|
|
1845
|
+
filteredSessions.map((session) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1846
|
+
"button",
|
|
1847
|
+
{
|
|
1848
|
+
type: "button",
|
|
1849
|
+
"aria-current": session.id === selectedSessionId ? "page" : void 0,
|
|
1850
|
+
className: "block h-10 w-full truncate rounded-xl border border-transparent bg-white/10 px-3 text-left text-sm font-semibold text-white transition hover:bg-white/15 aria-[current=page]:border-primary",
|
|
1851
|
+
onClick: () => onIntent?.({ type: "select-session", sessionId: session.id }),
|
|
1852
|
+
children: session.title
|
|
1853
|
+
},
|
|
1854
|
+
session.id
|
|
1855
|
+
))
|
|
1856
|
+
] }) }),
|
|
1857
|
+
activeGroup ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 border-t border-white/10 px-4 pb-4 pt-3", children: [
|
|
1858
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tabs, { value: activeGroup.id, onValueChange: changeGroup, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1859
|
+
TabsList,
|
|
1860
|
+
{
|
|
1861
|
+
className: "grid h-10 w-full rounded-xl bg-white/10 p-0.5 text-white/55",
|
|
1862
|
+
style: {
|
|
1863
|
+
gridTemplateColumns: `repeat(${groups.length}, minmax(0, 1fr))`
|
|
1864
|
+
},
|
|
1865
|
+
children: groups.map((group) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1866
|
+
TabsTrigger,
|
|
1867
|
+
{
|
|
1868
|
+
value: group.id,
|
|
1869
|
+
className: "rounded-[10px] text-sm font-semibold text-white/55 data-[state=active]:border data-[state=active]:border-white/15 data-[state=active]:bg-background data-[state=active]:text-white",
|
|
1870
|
+
children: group.label
|
|
1871
|
+
},
|
|
1872
|
+
group.id
|
|
1873
|
+
))
|
|
1874
|
+
}
|
|
1875
|
+
) }),
|
|
1876
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 grid grid-cols-2 gap-2", children: activeGroup.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1877
|
+
"button",
|
|
1878
|
+
{
|
|
1879
|
+
type: "button",
|
|
1880
|
+
"aria-label": item.title,
|
|
1881
|
+
className: "group relative aspect-[1.27] overflow-hidden rounded-xl border border-white/15 bg-card text-left transition hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
1882
|
+
onClick: () => onIntent?.({
|
|
1883
|
+
type: "select-item",
|
|
1884
|
+
groupId: activeGroup.id,
|
|
1885
|
+
item
|
|
1886
|
+
}),
|
|
1887
|
+
children: renderItemMedia?.(item, activeGroup) ?? (item.imageUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1888
|
+
"img",
|
|
1889
|
+
{
|
|
1890
|
+
src: item.imageUrl,
|
|
1891
|
+
alt: "",
|
|
1892
|
+
className: "size-full object-cover transition-transform duration-300 group-hover:scale-[1.03]"
|
|
1893
|
+
}
|
|
1894
|
+
) : null)
|
|
1895
|
+
},
|
|
1896
|
+
item.id
|
|
1897
|
+
)) })
|
|
1898
|
+
] }) : null
|
|
1899
|
+
]
|
|
1900
|
+
}
|
|
1901
|
+
);
|
|
1902
|
+
}
|
|
1749
1903
|
|
|
1750
1904
|
// src/components/agent-workbench/activity-model.ts
|
|
1751
1905
|
var EVENT_CAPABILITIES = {
|
|
@@ -3431,6 +3585,7 @@ exports.AgentWorkbenchActivity = AgentWorkbenchActivity;
|
|
|
3431
3585
|
exports.AgentWorkbenchArtifactSummary = AgentWorkbenchArtifactSummary;
|
|
3432
3586
|
exports.AgentWorkbenchArtifactWorkspace = AgentWorkbenchArtifactWorkspace;
|
|
3433
3587
|
exports.AgentWorkbenchComposer = AgentWorkbenchComposer;
|
|
3588
|
+
exports.AgentWorkbenchExploreSidebar = AgentWorkbenchExploreSidebar;
|
|
3434
3589
|
exports.AgentWorkbenchProcess = AgentWorkbenchProcess;
|
|
3435
3590
|
exports.AgentWorkbenchQuickStart = AgentWorkbenchQuickStart;
|
|
3436
3591
|
exports.AgentWorkbenchSidebar = AgentWorkbenchSidebar;
|