@inf-monkeys-tech/monkeys-design 1.0.13 → 1.0.14-canary.76.1.f2d536e
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 +41 -166
- package/dist/components/agent-workbench/index.d.ts +41 -166
- package/dist/components/agent-workbench/index.js +239 -5
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +240 -7
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/base/index.js +23 -0
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +23 -0
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js +23 -0
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +23 -0
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.js +23 -0
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +23 -0
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/runtime/index.js +23 -0
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +23 -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 +23 -0
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/index.mjs +23 -0
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toolbar/index.js +23 -0
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/index.mjs +23 -0
- package/dist/components/toolbar/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +23 -0
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +23 -0
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/details-model-36745da2e20f.d.mts +186 -0
- package/dist/details-model-36745da2e20f.d.ts +186 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +58 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -5
- package/dist/index.mjs.map +1 -1
- package/dist/locale/index.d.mts +66 -2
- package/dist/locale/index.d.ts +66 -2
- package/dist/locale/index.js +50 -0
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.mjs +50 -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 +50 -0
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +50 -0
- package/dist/provider/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-37967a434f7c.d.mts → types-fad7f358d712.d.mts} +24 -0
- package/dist/{types-37967a434f7c.d.ts → types-fad7f358d712.d.ts} +24 -0
- package/package.json +3 -3
|
@@ -45,7 +45,7 @@ var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
|
45
45
|
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
46
46
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
47
47
|
|
|
48
|
-
// src/components/agent-workbench/
|
|
48
|
+
// src/components/agent-workbench/AgentWorkbenchComposer.tsx
|
|
49
49
|
|
|
50
50
|
// src/locale/en-US.ts
|
|
51
51
|
var enUS = {
|
|
@@ -146,6 +146,29 @@ var enUS = {
|
|
|
146
146
|
reasoning: "Reasoning",
|
|
147
147
|
plan: "Plan",
|
|
148
148
|
taskNoDetail: "No additional details",
|
|
149
|
+
composer: {
|
|
150
|
+
send: "Send message",
|
|
151
|
+
stop: "Stop generating",
|
|
152
|
+
queue: "Queue message",
|
|
153
|
+
attach: "Add photos or files",
|
|
154
|
+
voice: "Start voice input",
|
|
155
|
+
webSearch: "Web search",
|
|
156
|
+
model: "Model",
|
|
157
|
+
reasoning: "Reasoning effort",
|
|
158
|
+
permissions: "Permissions",
|
|
159
|
+
removeAttachment: "Remove attachment",
|
|
160
|
+
editQueued: "Edit queued message",
|
|
161
|
+
deleteQueued: "Delete queued message",
|
|
162
|
+
moveUp: "Move message up",
|
|
163
|
+
moveDown: "Move message down",
|
|
164
|
+
queued: "Queued messages",
|
|
165
|
+
uploading: "Uploading",
|
|
166
|
+
noModels: "No models available",
|
|
167
|
+
message: "Message",
|
|
168
|
+
attachmentOnly: "Attachment",
|
|
169
|
+
reasoningOptions: { low: "Low", medium: "Medium", high: "High", xhigh: "Extra high" },
|
|
170
|
+
permissionOptions: { "approval-required": "Approval required", "auto-approve": "Auto approve", "full-access": "Full access" }
|
|
171
|
+
},
|
|
149
172
|
tool: {
|
|
150
173
|
input: "Input",
|
|
151
174
|
output: "Output",
|
|
@@ -641,6 +664,213 @@ var SelectSeparator = React2__namespace.forwardRef(
|
|
|
641
664
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
|
|
642
665
|
);
|
|
643
666
|
SelectSeparator.displayName = "SelectSeparator";
|
|
667
|
+
var iconButtonClass = "inline-flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40";
|
|
668
|
+
function modelOptionValue(option) {
|
|
669
|
+
return `${option.mode}:${option.id}`;
|
|
670
|
+
}
|
|
671
|
+
function AgentWorkbenchComposer({
|
|
672
|
+
viewModel,
|
|
673
|
+
className,
|
|
674
|
+
classNames,
|
|
675
|
+
onIntent
|
|
676
|
+
}) {
|
|
677
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench;
|
|
678
|
+
const fileInputRef = React2.useRef(null);
|
|
679
|
+
const [editingDraftId, setEditingDraftId] = React2.useState();
|
|
680
|
+
const [editingText, setEditingText] = React2.useState("");
|
|
681
|
+
const isBusy = viewModel.status === "loading" || viewModel.status === "streaming" || viewModel.status === "stopping";
|
|
682
|
+
const isStopping = viewModel.status === "stopping";
|
|
683
|
+
const isUploading = viewModel.attachments.some((attachment) => attachment.status === "uploading");
|
|
684
|
+
const canSubmit = !isStopping && !isUploading && (viewModel.value.trim().length > 0 || viewModel.attachments.some((item) => item.status === "ready"));
|
|
685
|
+
const showSubmitButton = !isBusy || canSubmit;
|
|
686
|
+
const selectedModelValue = React2.useMemo(() => {
|
|
687
|
+
const selected = viewModel.model.options.find((option) => option.id === viewModel.model.selectedId);
|
|
688
|
+
return selected ? modelOptionValue(selected) : "";
|
|
689
|
+
}, [viewModel.model.options, viewModel.model.selectedId]);
|
|
690
|
+
const submit = () => {
|
|
691
|
+
if (canSubmit) onIntent?.({ type: "submit" });
|
|
692
|
+
};
|
|
693
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
694
|
+
"form",
|
|
695
|
+
{
|
|
696
|
+
className: cn2("agent-workbench-composer flex min-w-0 w-full flex-col gap-2", className, classNames?.root),
|
|
697
|
+
"aria-label": messages.composer.message,
|
|
698
|
+
onSubmit: (event) => {
|
|
699
|
+
event.preventDefault();
|
|
700
|
+
submit();
|
|
701
|
+
},
|
|
702
|
+
children: [
|
|
703
|
+
viewModel.capabilities.queue && viewModel.queuedDrafts.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
704
|
+
"section",
|
|
705
|
+
{
|
|
706
|
+
"aria-label": messages.composer.queued,
|
|
707
|
+
className: cn2("min-w-0 max-w-full rounded-md border border-border bg-muted/40 p-2", classNames?.queue),
|
|
708
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "space-y-1.5", children: viewModel.queuedDrafts.map((draft, index) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex min-h-9 min-w-0 max-w-full items-center gap-2 overflow-hidden rounded-md bg-background px-2 py-1.5 text-sm", children: [
|
|
709
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-5 shrink-0 text-center text-xs text-muted-foreground", children: index + 1 }),
|
|
710
|
+
editingDraftId === draft.id ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
711
|
+
"input",
|
|
712
|
+
{
|
|
713
|
+
autoFocus: true,
|
|
714
|
+
value: editingText,
|
|
715
|
+
"aria-label": messages.composer.editQueued,
|
|
716
|
+
className: "min-w-0 flex-1 rounded border border-input bg-background px-2 py-1 outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
717
|
+
onChange: (event) => setEditingText(event.target.value),
|
|
718
|
+
onBlur: () => {
|
|
719
|
+
if (editingText.trim()) onIntent?.({ type: "edit-queued-draft", draftId: draft.id, text: editingText });
|
|
720
|
+
setEditingDraftId(void 0);
|
|
721
|
+
},
|
|
722
|
+
onKeyDown: (event) => {
|
|
723
|
+
if (event.key === "Escape") setEditingDraftId(void 0);
|
|
724
|
+
if (event.key === "Enter" && editingText.trim()) {
|
|
725
|
+
event.preventDefault();
|
|
726
|
+
onIntent?.({ type: "edit-queued-draft", draftId: draft.id, text: editingText });
|
|
727
|
+
setEditingDraftId(void 0);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children: draft.text || messages.composer.attachmentOnly }),
|
|
732
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-0.5", children: [
|
|
733
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.moveUp, disabled: index === 0, onClick: () => onIntent?.({ type: "move-queued-draft", draftId: draft.id, direction: "up" }), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "size-3.5" }) }),
|
|
734
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.moveDown, disabled: index === viewModel.queuedDrafts.length - 1, onClick: () => onIntent?.({ type: "move-queued-draft", draftId: draft.id, direction: "down" }), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "size-3.5" }) }),
|
|
735
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.editQueued, onClick: () => {
|
|
736
|
+
setEditingDraftId(draft.id);
|
|
737
|
+
setEditingText(draft.text);
|
|
738
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-3.5" }) }),
|
|
739
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: cn2(iconButtonClass, "text-destructive-text"), "aria-label": messages.composer.deleteQueued, onClick: () => onIntent?.({ type: "delete-queued-draft", draftId: draft.id }), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "size-3.5" }) })
|
|
740
|
+
] })
|
|
741
|
+
] }, draft.id)) })
|
|
742
|
+
}
|
|
743
|
+
) : null,
|
|
744
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 max-w-full rounded-lg border border-input bg-background p-3 shadow-sm focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/30", children: [
|
|
745
|
+
viewModel.attachments.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("mb-2 flex max-w-full gap-2 overflow-x-auto", classNames?.attachments), children: viewModel.attachments.map((attachment) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex size-16 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted", children: [
|
|
746
|
+
attachment.previewUrl && attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: attachment.previewUrl, alt: "", className: "size-full object-cover" }) : attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "size-5 text-muted-foreground" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.File, { className: "size-5 text-muted-foreground" }),
|
|
747
|
+
attachment.status === "uploading" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center bg-background/80 text-[10px] font-medium", children: messages.composer.uploading }) : null,
|
|
748
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
749
|
+
"button",
|
|
750
|
+
{
|
|
751
|
+
type: "button",
|
|
752
|
+
className: "absolute right-1 top-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground shadow",
|
|
753
|
+
"aria-label": messages.composer.removeAttachment,
|
|
754
|
+
onClick: () => onIntent?.({ type: "remove-attachment", attachmentId: attachment.id }),
|
|
755
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-3" })
|
|
756
|
+
}
|
|
757
|
+
),
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-x-0 bottom-0 truncate bg-background/85 px-1 py-0.5 text-[9px]", children: attachment.name })
|
|
759
|
+
] }, attachment.id)) }) : null,
|
|
760
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
761
|
+
"textarea",
|
|
762
|
+
{
|
|
763
|
+
value: viewModel.value,
|
|
764
|
+
rows: 2,
|
|
765
|
+
"aria-label": messages.composer.message,
|
|
766
|
+
placeholder: viewModel.placeholder,
|
|
767
|
+
className: cn2("max-h-64 min-h-14 min-w-0 w-full resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground", classNames?.textarea),
|
|
768
|
+
onChange: (event) => onIntent?.({ type: "change-value", value: event.target.value }),
|
|
769
|
+
onKeyDown: (event) => {
|
|
770
|
+
if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
|
|
771
|
+
event.preventDefault();
|
|
772
|
+
submit();
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
),
|
|
777
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn2("agent-workbench-composer__toolbar mt-2 flex min-h-8 min-w-0 max-w-full flex-wrap items-center gap-2", classNames?.toolbar), children: [
|
|
778
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "agent-workbench-composer__controls flex min-w-0 max-w-full flex-1 flex-wrap items-center gap-1.5", children: [
|
|
779
|
+
viewModel.capabilities.attachments ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
780
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.attach, onClick: () => fileInputRef.current?.click(), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "size-4" }) }),
|
|
781
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
782
|
+
"input",
|
|
783
|
+
{
|
|
784
|
+
ref: fileInputRef,
|
|
785
|
+
type: "file",
|
|
786
|
+
className: "hidden",
|
|
787
|
+
multiple: true,
|
|
788
|
+
onChange: (event) => {
|
|
789
|
+
const files = Array.from(event.target.files || []);
|
|
790
|
+
if (files.length > 0) onIntent?.({ type: "request-attachments", files });
|
|
791
|
+
event.target.value = "";
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
)
|
|
795
|
+
] }) : null,
|
|
796
|
+
viewModel.capabilities.voiceInput ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.voice, onClick: () => onIntent?.({ type: "request-voice-input" }), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mic, { className: "size-4" }) }) : null,
|
|
797
|
+
viewModel.capabilities.webSearch ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex shrink-0 items-center gap-1.5 whitespace-nowrap px-1 text-xs font-medium text-foreground", children: [
|
|
798
|
+
messages.composer.webSearch,
|
|
799
|
+
/* @__PURE__ */ jsxRuntime.jsx(Switch, { checked: viewModel.webSearchEnabled, onCheckedChange: (enabled) => onIntent?.({ type: "toggle-web-search", enabled }) })
|
|
800
|
+
] }) : null,
|
|
801
|
+
viewModel.capabilities.modelSelection ? /* @__PURE__ */ jsxRuntime.jsx("label", { className: "sr-only", htmlFor: "agent-workbench-model", children: messages.composer.model }) : null,
|
|
802
|
+
viewModel.capabilities.modelSelection ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
803
|
+
"select",
|
|
804
|
+
{
|
|
805
|
+
id: "agent-workbench-model",
|
|
806
|
+
value: selectedModelValue,
|
|
807
|
+
"aria-label": messages.composer.model,
|
|
808
|
+
className: "h-8 min-w-0 max-w-full flex-[0_1_12rem] rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground",
|
|
809
|
+
onChange: (event) => {
|
|
810
|
+
const option = viewModel.model.options.find((item) => modelOptionValue(item) === event.target.value);
|
|
811
|
+
if (option) onIntent?.({ type: "select-model", modelId: option.id, mode: option.mode });
|
|
812
|
+
},
|
|
813
|
+
children: [
|
|
814
|
+
viewModel.model.options.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: messages.composer.noModels }) : null,
|
|
815
|
+
viewModel.model.options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: modelOptionValue(option), disabled: option.disabled, children: [
|
|
816
|
+
option.label,
|
|
817
|
+
" \xB7 ",
|
|
818
|
+
option.mode === "agent" ? "Agent" : "Chatbot"
|
|
819
|
+
] }, modelOptionValue(option)))
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
) : null,
|
|
823
|
+
viewModel.capabilities.reasoning && viewModel.reasoning ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
824
|
+
"select",
|
|
825
|
+
{
|
|
826
|
+
value: viewModel.reasoning.value,
|
|
827
|
+
"aria-label": messages.composer.reasoning,
|
|
828
|
+
className: "h-8 min-w-0 max-w-full flex-[0_1_8rem] rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground",
|
|
829
|
+
onChange: (event) => onIntent?.({ type: "change-reasoning", value: event.target.value }),
|
|
830
|
+
children: viewModel.reasoning.options.map((value) => /* @__PURE__ */ jsxRuntime.jsx("option", { value, children: messages.composer.reasoningOptions[value] }, value))
|
|
831
|
+
}
|
|
832
|
+
) : null,
|
|
833
|
+
viewModel.capabilities.permissions && viewModel.permissionProfile ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
834
|
+
"select",
|
|
835
|
+
{
|
|
836
|
+
value: viewModel.permissionProfile,
|
|
837
|
+
"aria-label": messages.composer.permissions,
|
|
838
|
+
className: "h-8 min-w-0 max-w-full flex-[0_1_10rem] rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground",
|
|
839
|
+
onChange: (event) => onIntent?.({ type: "change-permission", value: event.target.value }),
|
|
840
|
+
children: ["approval-required", "auto-approve", "full-access"].map((value) => /* @__PURE__ */ jsxRuntime.jsx("option", { value, children: messages.composer.permissionOptions[value] }, value))
|
|
841
|
+
}
|
|
842
|
+
) : null
|
|
843
|
+
] }),
|
|
844
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
|
|
845
|
+
showSubmitButton ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
846
|
+
"button",
|
|
847
|
+
{
|
|
848
|
+
type: "submit",
|
|
849
|
+
className: cn2(iconButtonClass, "bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground"),
|
|
850
|
+
"aria-label": isBusy && viewModel.capabilities.queue ? messages.composer.queue : messages.composer.send,
|
|
851
|
+
disabled: !canSubmit,
|
|
852
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "size-4" })
|
|
853
|
+
}
|
|
854
|
+
) : null,
|
|
855
|
+
isBusy && !canSubmit && viewModel.capabilities.stop ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
856
|
+
"button",
|
|
857
|
+
{
|
|
858
|
+
type: "button",
|
|
859
|
+
className: cn2(iconButtonClass, "border border-border"),
|
|
860
|
+
"aria-label": isStopping ? messages.run.stopping : messages.composer.stop,
|
|
861
|
+
disabled: isStopping,
|
|
862
|
+
onClick: () => onIntent?.({ type: "stop" }),
|
|
863
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Square, { className: "size-3 fill-current" })
|
|
864
|
+
}
|
|
865
|
+
) : null
|
|
866
|
+
] })
|
|
867
|
+
] })
|
|
868
|
+
] }),
|
|
869
|
+
viewModel.status === "error" && viewModel.error ? /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive-text", children: viewModel.error }) : null
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
);
|
|
873
|
+
}
|
|
644
874
|
function ItemAvatar({ item }) {
|
|
645
875
|
const [failed, setFailed] = React2.useState(false);
|
|
646
876
|
if (item.iconUrl && !failed) {
|
|
@@ -726,7 +956,7 @@ function SessionActions({
|
|
|
726
956
|
] })
|
|
727
957
|
] });
|
|
728
958
|
}
|
|
729
|
-
function AgentWorkbenchSidebar({ viewModel, className, classNames, onIntent }) {
|
|
959
|
+
function AgentWorkbenchSidebar({ viewModel, headerActions, className, classNames, onIntent }) {
|
|
730
960
|
const { locale } = useMonkeysLocale();
|
|
731
961
|
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
732
962
|
const searchRef = React2.useRef(null);
|
|
@@ -803,9 +1033,12 @@ function AgentWorkbenchSidebar({ viewModel, className, classNames, onIntent }) {
|
|
|
803
1033
|
),
|
|
804
1034
|
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" })
|
|
805
1035
|
] }),
|
|
806
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
807
|
-
/* @__PURE__ */ jsxRuntime.
|
|
808
|
-
|
|
1036
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1037
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: cn2("grid min-w-0 flex-1 grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
|
|
1038
|
+
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "agents", children: messages.agents }),
|
|
1039
|
+
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "sessions", children: messages.sessions })
|
|
1040
|
+
] }),
|
|
1041
|
+
headerActions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center", children: headerActions }) : null
|
|
809
1042
|
] })
|
|
810
1043
|
] }),
|
|
811
1044
|
/* @__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: [
|
|
@@ -1884,6 +2117,7 @@ function AgentWorkbenchTaskDetails({
|
|
|
1884
2117
|
}
|
|
1885
2118
|
|
|
1886
2119
|
exports.AgentWorkbenchActivity = AgentWorkbenchActivity;
|
|
2120
|
+
exports.AgentWorkbenchComposer = AgentWorkbenchComposer;
|
|
1887
2121
|
exports.AgentWorkbenchSidebar = AgentWorkbenchSidebar;
|
|
1888
2122
|
exports.AgentWorkbenchTaskDetails = AgentWorkbenchTaskDetails;
|
|
1889
2123
|
exports.AgentWorkbenchTool = AgentWorkbenchTool;
|