@inf-monkeys-tech/monkeys-design 1.0.24 → 1.0.27
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 +8 -3
- package/dist/components/agent-workbench/index.d.ts +8 -3
- package/dist/components/agent-workbench/index.js +61 -21
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +61 -21
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/base/index.js +2 -0
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +2 -0
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js +2 -0
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +2 -0
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.js +2 -0
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +2 -0
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/runtime/index.js +2 -0
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +2 -0
- package/dist/components/runtime/index.mjs.map +1 -1
- package/dist/components/toast/index.d.mts +1 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/index.mjs +2 -0
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toolbar/index.js +2 -0
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/index.mjs +2 -0
- package/dist/components/toolbar/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +2 -0
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +2 -0
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/{details-model-235bb3448dca.d.mts → details-model-bc28e9593e3f.d.mts} +2 -1
- package/dist/{details-model-235bb3448dca.d.ts → details-model-bc28e9593e3f.d.ts} +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -13
- package/dist/index.mjs.map +1 -1
- package/dist/locale/index.d.mts +6 -2
- package/dist/locale/index.d.ts +6 -2
- package/dist/locale/index.js +4 -0
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.mjs +4 -0
- package/dist/locale/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +2 -2
- package/dist/provider/index.d.ts +2 -2
- package/dist/provider/index.js +4 -0
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +4 -0
- package/dist/provider/index.mjs.map +1 -1
- package/dist/{types-a81dc2d284e3.d.mts → types-4c3363833cff.d.mts} +2 -0
- package/dist/{types-a81dc2d284e3.d.ts → types-4c3363833cff.d.ts} +2 -0
- package/package.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
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 AgentWorkbenchSidebar, l as AgentWorkbenchSidebarClassNames, m as AgentWorkbenchSidebarIntent, n as AgentWorkbenchSidebarProps, o as AgentWorkbenchTaskDetails, p as AgentWorkbenchTaskDetailsClassNames, q as AgentWorkbenchTaskDetailsProps, r as AgentWorkbenchTerminalModel, s as AgentWorkbenchTool, t as AgentWorkbenchToolClassNames, u as AgentWorkbenchToolProps, v as createAgentWorkbenchActivityModel, w as createAgentWorkbenchDetailsModel } from '../../details-model-
|
|
3
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-bc28e9593e3f.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 AgentWorkbenchSidebar, l as AgentWorkbenchSidebarClassNames, m as AgentWorkbenchSidebarIntent, n as AgentWorkbenchSidebarProps, o as AgentWorkbenchTaskDetails, p as AgentWorkbenchTaskDetailsClassNames, q as AgentWorkbenchTaskDetailsProps, r as AgentWorkbenchTerminalModel, s as AgentWorkbenchTool, t as AgentWorkbenchToolClassNames, u as AgentWorkbenchToolProps, v as createAgentWorkbenchActivityModel, w as createAgentWorkbenchDetailsModel } from '../../details-model-bc28e9593e3f.mjs';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
type AgentWorkbenchComposerIntent = {
|
|
7
|
+
type: 'change-mode';
|
|
8
|
+
mode: 'agent' | 'chatbot';
|
|
9
|
+
} | {
|
|
7
10
|
type: 'change-permission';
|
|
8
11
|
value: AgentSessionPermissionProfile;
|
|
9
12
|
} | {
|
|
@@ -52,11 +55,13 @@ interface AgentWorkbenchComposerClassNames {
|
|
|
52
55
|
}
|
|
53
56
|
interface AgentWorkbenchComposerProps {
|
|
54
57
|
viewModel: AgentWorkbenchComposerViewModel;
|
|
58
|
+
modeSelectionEnabled?: boolean;
|
|
59
|
+
modeFilteringEnabled?: boolean;
|
|
55
60
|
className?: string;
|
|
56
61
|
classNames?: AgentWorkbenchComposerClassNames;
|
|
57
62
|
onIntent?: (intent: AgentWorkbenchComposerIntent) => void;
|
|
58
63
|
}
|
|
59
|
-
declare function AgentWorkbenchComposer({ viewModel, className, classNames, onIntent, }: AgentWorkbenchComposerProps): react_jsx_runtime.JSX.Element;
|
|
64
|
+
declare function AgentWorkbenchComposer({ viewModel, modeSelectionEnabled, modeFilteringEnabled, className, classNames, onIntent, }: AgentWorkbenchComposerProps): react_jsx_runtime.JSX.Element;
|
|
60
65
|
type MessageEvent = Extract<AgentSessionEvent, {
|
|
61
66
|
eventType: 'message';
|
|
62
67
|
}>;
|
|
@@ -1,9 +1,12 @@
|
|
|
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 AgentWorkbenchSidebar, l as AgentWorkbenchSidebarClassNames, m as AgentWorkbenchSidebarIntent, n as AgentWorkbenchSidebarProps, o as AgentWorkbenchTaskDetails, p as AgentWorkbenchTaskDetailsClassNames, q as AgentWorkbenchTaskDetailsProps, r as AgentWorkbenchTerminalModel, s as AgentWorkbenchTool, t as AgentWorkbenchToolClassNames, u as AgentWorkbenchToolProps, v as createAgentWorkbenchActivityModel, w as createAgentWorkbenchDetailsModel } from '../../details-model-
|
|
3
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-bc28e9593e3f.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 AgentWorkbenchSidebar, l as AgentWorkbenchSidebarClassNames, m as AgentWorkbenchSidebarIntent, n as AgentWorkbenchSidebarProps, o as AgentWorkbenchTaskDetails, p as AgentWorkbenchTaskDetailsClassNames, q as AgentWorkbenchTaskDetailsProps, r as AgentWorkbenchTerminalModel, s as AgentWorkbenchTool, t as AgentWorkbenchToolClassNames, u as AgentWorkbenchToolProps, v as createAgentWorkbenchActivityModel, w as createAgentWorkbenchDetailsModel } from '../../details-model-bc28e9593e3f.js';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
type AgentWorkbenchComposerIntent = {
|
|
7
|
+
type: 'change-mode';
|
|
8
|
+
mode: 'agent' | 'chatbot';
|
|
9
|
+
} | {
|
|
7
10
|
type: 'change-permission';
|
|
8
11
|
value: AgentSessionPermissionProfile;
|
|
9
12
|
} | {
|
|
@@ -52,11 +55,13 @@ interface AgentWorkbenchComposerClassNames {
|
|
|
52
55
|
}
|
|
53
56
|
interface AgentWorkbenchComposerProps {
|
|
54
57
|
viewModel: AgentWorkbenchComposerViewModel;
|
|
58
|
+
modeSelectionEnabled?: boolean;
|
|
59
|
+
modeFilteringEnabled?: boolean;
|
|
55
60
|
className?: string;
|
|
56
61
|
classNames?: AgentWorkbenchComposerClassNames;
|
|
57
62
|
onIntent?: (intent: AgentWorkbenchComposerIntent) => void;
|
|
58
63
|
}
|
|
59
|
-
declare function AgentWorkbenchComposer({ viewModel, className, classNames, onIntent, }: AgentWorkbenchComposerProps): react_jsx_runtime.JSX.Element;
|
|
64
|
+
declare function AgentWorkbenchComposer({ viewModel, modeSelectionEnabled, modeFilteringEnabled, className, classNames, onIntent, }: AgentWorkbenchComposerProps): react_jsx_runtime.JSX.Element;
|
|
60
65
|
type MessageEvent = Extract<AgentSessionEvent, {
|
|
61
66
|
eventType: 'message';
|
|
62
67
|
}>;
|
|
@@ -154,6 +154,7 @@ var enUS = {
|
|
|
154
154
|
attach: "Add photos or files",
|
|
155
155
|
voice: "Start voice input",
|
|
156
156
|
webSearch: "Web search",
|
|
157
|
+
chatMode: "Chat mode",
|
|
157
158
|
model: "Model",
|
|
158
159
|
reasoning: "Reasoning effort",
|
|
159
160
|
permissions: "Permissions",
|
|
@@ -203,6 +204,7 @@ var enUS = {
|
|
|
203
204
|
},
|
|
204
205
|
navigation: {
|
|
205
206
|
search: "Search agents and sessions",
|
|
207
|
+
searchSessions: "Search sessions",
|
|
206
208
|
searchShortcut: "Focus search",
|
|
207
209
|
clearSearch: "Clear search",
|
|
208
210
|
tabsLabel: "Agent workbench navigation",
|
|
@@ -678,6 +680,8 @@ function modelOptionValue(option) {
|
|
|
678
680
|
}
|
|
679
681
|
function AgentWorkbenchComposer({
|
|
680
682
|
viewModel,
|
|
683
|
+
modeSelectionEnabled = false,
|
|
684
|
+
modeFilteringEnabled = false,
|
|
681
685
|
className,
|
|
682
686
|
classNames,
|
|
683
687
|
onIntent
|
|
@@ -688,19 +692,25 @@ function AgentWorkbenchComposer({
|
|
|
688
692
|
const [editingDraftId, setEditingDraftId] = React2.useState();
|
|
689
693
|
const [editingText, setEditingText] = React2.useState("");
|
|
690
694
|
const [isNarrow, setIsNarrow] = React2.useState(false);
|
|
695
|
+
const narrowBreakpoint = modeSelectionEnabled ? 900 : 704;
|
|
691
696
|
const isBusy = viewModel.status === "loading" || viewModel.status === "streaming" || viewModel.status === "stopping";
|
|
692
697
|
const isStopping = viewModel.status === "stopping";
|
|
693
698
|
const isUploading = viewModel.attachments.some((attachment) => attachment.status === "uploading");
|
|
694
699
|
const canSubmit = !isStopping && !isUploading && (viewModel.value.trim().length > 0 || viewModel.attachments.some((item) => item.status === "ready"));
|
|
695
700
|
const showSubmitButton = !isBusy || canSubmit;
|
|
701
|
+
const filterModelsByMode = modeSelectionEnabled || modeFilteringEnabled;
|
|
702
|
+
const visibleModelOptions = React2.useMemo(
|
|
703
|
+
() => filterModelsByMode ? viewModel.model.options.filter((option) => option.mode === viewModel.mode) : viewModel.model.options,
|
|
704
|
+
[filterModelsByMode, viewModel.mode, viewModel.model.options]
|
|
705
|
+
);
|
|
696
706
|
const selectedModelValue = React2.useMemo(() => {
|
|
697
|
-
const selected =
|
|
698
|
-
return selected ? modelOptionValue(selected) : "";
|
|
699
|
-
}, [viewModel.
|
|
707
|
+
const selected = visibleModelOptions.find((option) => option.id === viewModel.model.selectedId && option.mode === viewModel.mode);
|
|
708
|
+
return selected ? modelOptionValue(selected) : visibleModelOptions[0] ? modelOptionValue(visibleModelOptions[0]) : "";
|
|
709
|
+
}, [viewModel.mode, viewModel.model.selectedId, visibleModelOptions]);
|
|
700
710
|
React2.useEffect(() => {
|
|
701
711
|
const surface = surfaceRef.current;
|
|
702
712
|
if (!surface) return void 0;
|
|
703
|
-
const updateLayout = () => setIsNarrow(surface.getBoundingClientRect().width <=
|
|
713
|
+
const updateLayout = () => setIsNarrow(surface.getBoundingClientRect().width <= narrowBreakpoint);
|
|
704
714
|
updateLayout();
|
|
705
715
|
window.addEventListener("resize", updateLayout);
|
|
706
716
|
if (typeof ResizeObserver === "undefined") {
|
|
@@ -716,7 +726,7 @@ function AgentWorkbenchComposer({
|
|
|
716
726
|
observer.disconnect();
|
|
717
727
|
window.removeEventListener("resize", updateLayout);
|
|
718
728
|
};
|
|
719
|
-
}, []);
|
|
729
|
+
}, [narrowBreakpoint]);
|
|
720
730
|
const submit = () => {
|
|
721
731
|
if (canSubmit) onIntent?.({ type: "submit" });
|
|
722
732
|
};
|
|
@@ -828,6 +838,28 @@ function AgentWorkbenchComposer({
|
|
|
828
838
|
messages.composer.webSearch,
|
|
829
839
|
/* @__PURE__ */ jsxRuntime.jsx(Switch, { checked: viewModel.webSearchEnabled, onCheckedChange: (enabled) => onIntent?.({ type: "toggle-web-search", enabled }) })
|
|
830
840
|
] }) : null,
|
|
841
|
+
modeSelectionEnabled ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
842
|
+
"div",
|
|
843
|
+
{
|
|
844
|
+
className: "flex h-8 shrink-0 items-center rounded-md border border-border bg-muted p-0.5",
|
|
845
|
+
role: "group",
|
|
846
|
+
"aria-label": messages.composer.chatMode,
|
|
847
|
+
children: ["chatbot", "agent"].map((mode) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
848
|
+
"button",
|
|
849
|
+
{
|
|
850
|
+
type: "button",
|
|
851
|
+
"aria-pressed": viewModel.mode === mode,
|
|
852
|
+
className: cn2(
|
|
853
|
+
"h-7 rounded px-2.5 text-xs font-medium transition-colors",
|
|
854
|
+
viewModel.mode === mode ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
855
|
+
),
|
|
856
|
+
onClick: () => onIntent?.({ type: "change-mode", mode }),
|
|
857
|
+
children: messages.modes[mode]
|
|
858
|
+
},
|
|
859
|
+
mode
|
|
860
|
+
))
|
|
861
|
+
}
|
|
862
|
+
) : null,
|
|
831
863
|
viewModel.capabilities.modelSelection ? /* @__PURE__ */ jsxRuntime.jsx("label", { className: "sr-only", htmlFor: "agent-workbench-model", children: messages.composer.model }) : null,
|
|
832
864
|
viewModel.capabilities.modelSelection ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
833
865
|
"select",
|
|
@@ -837,12 +869,12 @@ function AgentWorkbenchComposer({
|
|
|
837
869
|
"aria-label": messages.composer.model,
|
|
838
870
|
className: "h-8 w-48 min-w-36 shrink rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground",
|
|
839
871
|
onChange: (event) => {
|
|
840
|
-
const option =
|
|
872
|
+
const option = visibleModelOptions.find((item) => modelOptionValue(item) === event.target.value);
|
|
841
873
|
if (option) onIntent?.({ type: "select-model", modelId: option.id, mode: option.mode });
|
|
842
874
|
},
|
|
843
875
|
children: [
|
|
844
|
-
|
|
845
|
-
|
|
876
|
+
visibleModelOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: messages.composer.noModels }) : null,
|
|
877
|
+
visibleModelOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: modelOptionValue(option), disabled: option.disabled, children: [
|
|
846
878
|
option.label,
|
|
847
879
|
" \xB7 ",
|
|
848
880
|
messages.modes[option.mode]
|
|
@@ -989,9 +1021,17 @@ function SessionActions({
|
|
|
989
1021
|
] })
|
|
990
1022
|
] });
|
|
991
1023
|
}
|
|
992
|
-
function AgentWorkbenchSidebar({
|
|
1024
|
+
function AgentWorkbenchSidebar({
|
|
1025
|
+
viewModel,
|
|
1026
|
+
navigationMode = "agents-and-sessions",
|
|
1027
|
+
headerActions,
|
|
1028
|
+
className,
|
|
1029
|
+
classNames,
|
|
1030
|
+
onIntent
|
|
1031
|
+
}) {
|
|
993
1032
|
const { locale } = useMonkeysLocale();
|
|
994
1033
|
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
1034
|
+
const sessionsOnly = navigationMode === "sessions-only";
|
|
995
1035
|
const searchRef = React2.useRef(null);
|
|
996
1036
|
const renameInputRef = React2.useRef(null);
|
|
997
1037
|
const [editingSessionId, setEditingSessionId] = React2.useState();
|
|
@@ -1038,9 +1078,9 @@ function AgentWorkbenchSidebar({ viewModel, headerActions, className, classNames
|
|
|
1038
1078
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": messages.tabsLabel, className: cn2("h-full min-h-0", classNames?.root, className), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1039
1079
|
Tabs,
|
|
1040
1080
|
{
|
|
1041
|
-
value: viewModel.activeTab,
|
|
1081
|
+
value: sessionsOnly ? "sessions" : viewModel.activeTab,
|
|
1042
1082
|
onValueChange: (value) => {
|
|
1043
|
-
if (value === "agents" || value === "sessions") onIntent?.({ type: "change-tab", tab: value });
|
|
1083
|
+
if (!sessionsOnly && (value === "agents" || value === "sessions")) onIntent?.({ type: "change-tab", tab: value });
|
|
1044
1084
|
},
|
|
1045
1085
|
className: "flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
1046
1086
|
children: [
|
|
@@ -1053,8 +1093,8 @@ function AgentWorkbenchSidebar({ viewModel, headerActions, className, classNames
|
|
|
1053
1093
|
ref: searchRef,
|
|
1054
1094
|
type: "search",
|
|
1055
1095
|
value: viewModel.searchQuery,
|
|
1056
|
-
"aria-label": messages.search,
|
|
1057
|
-
placeholder: messages.search,
|
|
1096
|
+
"aria-label": sessionsOnly ? messages.searchSessions : messages.search,
|
|
1097
|
+
placeholder: sessionsOnly ? messages.searchSessions : messages.search,
|
|
1058
1098
|
className: "min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden",
|
|
1059
1099
|
onChange: (event) => onIntent?.({ type: "change-search", query: event.target.value }),
|
|
1060
1100
|
onKeyDown: (event) => {
|
|
@@ -1066,15 +1106,15 @@ function AgentWorkbenchSidebar({ viewModel, headerActions, className, classNames
|
|
|
1066
1106
|
),
|
|
1067
1107
|
viewModel.searchQuery ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "flex size-6 items-center justify-center rounded-md hover:bg-muted", "aria-label": messages.clearSearch, onClick: () => onIntent?.({ type: "change-search", query: "" }), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-3.5", "aria-hidden": "true" }) }) : /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground", children: "Ctrl K" })
|
|
1068
1108
|
] }),
|
|
1069
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1070
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: cn2("grid min-w-0 flex-1 grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
|
|
1109
|
+
!sessionsOnly || headerActions ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1110
|
+
!sessionsOnly ? /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: cn2("grid min-w-0 flex-1 grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
|
|
1071
1111
|
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "agents", children: messages.agents }),
|
|
1072
1112
|
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "sessions", children: messages.sessions })
|
|
1073
|
-
] }),
|
|
1113
|
+
] }) : null,
|
|
1074
1114
|
headerActions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center", children: headerActions }) : null
|
|
1075
|
-
] })
|
|
1115
|
+
] }) : null
|
|
1076
1116
|
] }),
|
|
1077
|
-
/* @__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: [
|
|
1117
|
+
!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: [
|
|
1078
1118
|
viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-agent" }), children: [
|
|
1079
1119
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4", "aria-hidden": "true" }),
|
|
1080
1120
|
messages.newAgent
|
|
@@ -1119,13 +1159,13 @@ function AgentWorkbenchSidebar({ viewModel, headerActions, className, classNames
|
|
|
1119
1159
|
},
|
|
1120
1160
|
item.id
|
|
1121
1161
|
)) })
|
|
1122
|
-
] }),
|
|
1162
|
+
] }) : null,
|
|
1123
1163
|
/* @__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: [
|
|
1124
1164
|
viewModel.capabilities.createSession ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-session" }), children: [
|
|
1125
1165
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SquarePen, { className: "size-4", "aria-hidden": "true" }),
|
|
1126
1166
|
messages.newSession
|
|
1127
1167
|
] }) : null,
|
|
1128
|
-
viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-capabilities" }), children: [
|
|
1168
|
+
!sessionsOnly && viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-capabilities" }), children: [
|
|
1129
1169
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Blocks, { className: "size-4", "aria-hidden": "true" }),
|
|
1130
1170
|
messages.capabilities
|
|
1131
1171
|
] }) : null,
|
|
@@ -1182,7 +1222,7 @@ function AgentWorkbenchSidebar({ viewModel, headerActions, className, classNames
|
|
|
1182
1222
|
] }, item.id);
|
|
1183
1223
|
}) })
|
|
1184
1224
|
] }),
|
|
1185
|
-
viewModel.capabilities.manageAgentSettings ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("shrink-0 border-t border-border p-4", classNames?.footer), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "flex h-10 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-agent-settings" }), children: [
|
|
1225
|
+
!sessionsOnly && viewModel.capabilities.manageAgentSettings ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("shrink-0 border-t border-border p-4", classNames?.footer), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "flex h-10 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-agent-settings" }), children: [
|
|
1186
1226
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-4", "aria-hidden": "true" }),
|
|
1187
1227
|
messages.settings
|
|
1188
1228
|
] }) }) : null
|