@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp,
|
|
1
|
+
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, Mic, Send, Square, Search, Plus, Pin, SquarePen, Blocks, Settings, TerminalSquare, Clock3, FileOutput, Download, RefreshCw, Bot, Loader2, CheckCircle2, AlertCircle, Ellipsis, XCircle, CircleStop, Copy, RotateCcw, FileCode2, Files, TestTube2 } from 'lucide-react';
|
|
2
2
|
import * as React2 from 'react';
|
|
3
3
|
import { createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
|
|
4
4
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -15,7 +15,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
15
15
|
import { cva } from 'class-variance-authority';
|
|
16
16
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
17
17
|
|
|
18
|
-
// src/components/agent-workbench/
|
|
18
|
+
// src/components/agent-workbench/AgentWorkbenchComposer.tsx
|
|
19
19
|
|
|
20
20
|
// src/locale/en-US.ts
|
|
21
21
|
var enUS = {
|
|
@@ -116,6 +116,29 @@ var enUS = {
|
|
|
116
116
|
reasoning: "Reasoning",
|
|
117
117
|
plan: "Plan",
|
|
118
118
|
taskNoDetail: "No additional details",
|
|
119
|
+
composer: {
|
|
120
|
+
send: "Send message",
|
|
121
|
+
stop: "Stop generating",
|
|
122
|
+
queue: "Queue message",
|
|
123
|
+
attach: "Add photos or files",
|
|
124
|
+
voice: "Start voice input",
|
|
125
|
+
webSearch: "Web search",
|
|
126
|
+
model: "Model",
|
|
127
|
+
reasoning: "Reasoning effort",
|
|
128
|
+
permissions: "Permissions",
|
|
129
|
+
removeAttachment: "Remove attachment",
|
|
130
|
+
editQueued: "Edit queued message",
|
|
131
|
+
deleteQueued: "Delete queued message",
|
|
132
|
+
moveUp: "Move message up",
|
|
133
|
+
moveDown: "Move message down",
|
|
134
|
+
queued: "Queued messages",
|
|
135
|
+
uploading: "Uploading",
|
|
136
|
+
noModels: "No models available",
|
|
137
|
+
message: "Message",
|
|
138
|
+
attachmentOnly: "Attachment",
|
|
139
|
+
reasoningOptions: { low: "Low", medium: "Medium", high: "High", xhigh: "Extra high" },
|
|
140
|
+
permissionOptions: { "approval-required": "Approval required", "auto-approve": "Auto approve", "full-access": "Full access" }
|
|
141
|
+
},
|
|
119
142
|
tool: {
|
|
120
143
|
input: "Input",
|
|
121
144
|
output: "Output",
|
|
@@ -611,6 +634,213 @@ var SelectSeparator = React2.forwardRef(
|
|
|
611
634
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
|
|
612
635
|
);
|
|
613
636
|
SelectSeparator.displayName = "SelectSeparator";
|
|
637
|
+
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";
|
|
638
|
+
function modelOptionValue(option) {
|
|
639
|
+
return `${option.mode}:${option.id}`;
|
|
640
|
+
}
|
|
641
|
+
function AgentWorkbenchComposer({
|
|
642
|
+
viewModel,
|
|
643
|
+
className,
|
|
644
|
+
classNames,
|
|
645
|
+
onIntent
|
|
646
|
+
}) {
|
|
647
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench;
|
|
648
|
+
const fileInputRef = useRef(null);
|
|
649
|
+
const [editingDraftId, setEditingDraftId] = useState();
|
|
650
|
+
const [editingText, setEditingText] = useState("");
|
|
651
|
+
const isBusy = viewModel.status === "loading" || viewModel.status === "streaming" || viewModel.status === "stopping";
|
|
652
|
+
const isStopping = viewModel.status === "stopping";
|
|
653
|
+
const isUploading = viewModel.attachments.some((attachment) => attachment.status === "uploading");
|
|
654
|
+
const canSubmit = !isStopping && !isUploading && (viewModel.value.trim().length > 0 || viewModel.attachments.some((item) => item.status === "ready"));
|
|
655
|
+
const showSubmitButton = !isBusy || canSubmit;
|
|
656
|
+
const selectedModelValue = useMemo(() => {
|
|
657
|
+
const selected = viewModel.model.options.find((option) => option.id === viewModel.model.selectedId);
|
|
658
|
+
return selected ? modelOptionValue(selected) : "";
|
|
659
|
+
}, [viewModel.model.options, viewModel.model.selectedId]);
|
|
660
|
+
const submit = () => {
|
|
661
|
+
if (canSubmit) onIntent?.({ type: "submit" });
|
|
662
|
+
};
|
|
663
|
+
return /* @__PURE__ */ jsxs(
|
|
664
|
+
"form",
|
|
665
|
+
{
|
|
666
|
+
className: cn2("agent-workbench-composer flex min-w-0 w-full flex-col gap-2", className, classNames?.root),
|
|
667
|
+
"aria-label": messages.composer.message,
|
|
668
|
+
onSubmit: (event) => {
|
|
669
|
+
event.preventDefault();
|
|
670
|
+
submit();
|
|
671
|
+
},
|
|
672
|
+
children: [
|
|
673
|
+
viewModel.capabilities.queue && viewModel.queuedDrafts.length > 0 ? /* @__PURE__ */ jsx(
|
|
674
|
+
"section",
|
|
675
|
+
{
|
|
676
|
+
"aria-label": messages.composer.queued,
|
|
677
|
+
className: cn2("min-w-0 max-w-full rounded-md border border-border bg-muted/40 p-2", classNames?.queue),
|
|
678
|
+
children: /* @__PURE__ */ jsx("ol", { className: "space-y-1.5", children: viewModel.queuedDrafts.map((draft, index) => /* @__PURE__ */ 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: [
|
|
679
|
+
/* @__PURE__ */ jsx("span", { className: "w-5 shrink-0 text-center text-xs text-muted-foreground", children: index + 1 }),
|
|
680
|
+
editingDraftId === draft.id ? /* @__PURE__ */ jsx(
|
|
681
|
+
"input",
|
|
682
|
+
{
|
|
683
|
+
autoFocus: true,
|
|
684
|
+
value: editingText,
|
|
685
|
+
"aria-label": messages.composer.editQueued,
|
|
686
|
+
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",
|
|
687
|
+
onChange: (event) => setEditingText(event.target.value),
|
|
688
|
+
onBlur: () => {
|
|
689
|
+
if (editingText.trim()) onIntent?.({ type: "edit-queued-draft", draftId: draft.id, text: editingText });
|
|
690
|
+
setEditingDraftId(void 0);
|
|
691
|
+
},
|
|
692
|
+
onKeyDown: (event) => {
|
|
693
|
+
if (event.key === "Escape") setEditingDraftId(void 0);
|
|
694
|
+
if (event.key === "Enter" && editingText.trim()) {
|
|
695
|
+
event.preventDefault();
|
|
696
|
+
onIntent?.({ type: "edit-queued-draft", draftId: draft.id, text: editingText });
|
|
697
|
+
setEditingDraftId(void 0);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
) : /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: draft.text || messages.composer.attachmentOnly }),
|
|
702
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-0.5", children: [
|
|
703
|
+
/* @__PURE__ */ 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__ */ jsx(ArrowUp, { className: "size-3.5" }) }),
|
|
704
|
+
/* @__PURE__ */ 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__ */ jsx(ArrowDown, { className: "size-3.5" }) }),
|
|
705
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.editQueued, onClick: () => {
|
|
706
|
+
setEditingDraftId(draft.id);
|
|
707
|
+
setEditingText(draft.text);
|
|
708
|
+
}, children: /* @__PURE__ */ jsx(Pencil, { className: "size-3.5" }) }),
|
|
709
|
+
/* @__PURE__ */ 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__ */ jsx(Trash2, { className: "size-3.5" }) })
|
|
710
|
+
] })
|
|
711
|
+
] }, draft.id)) })
|
|
712
|
+
}
|
|
713
|
+
) : null,
|
|
714
|
+
/* @__PURE__ */ 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: [
|
|
715
|
+
viewModel.attachments.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn2("mb-2 flex max-w-full gap-2 overflow-x-auto", classNames?.attachments), children: viewModel.attachments.map((attachment) => /* @__PURE__ */ jsxs("div", { className: "relative flex size-16 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted", children: [
|
|
716
|
+
attachment.previewUrl && attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsx("img", { src: attachment.previewUrl, alt: "", className: "size-full object-cover" }) : attachment.mediaType?.startsWith("image/") ? /* @__PURE__ */ jsx(Image, { className: "size-5 text-muted-foreground" }) : /* @__PURE__ */ jsx(File, { className: "size-5 text-muted-foreground" }),
|
|
717
|
+
attachment.status === "uploading" ? /* @__PURE__ */ jsx("span", { className: "absolute inset-0 flex items-center justify-center bg-background/80 text-[10px] font-medium", children: messages.composer.uploading }) : null,
|
|
718
|
+
/* @__PURE__ */ jsx(
|
|
719
|
+
"button",
|
|
720
|
+
{
|
|
721
|
+
type: "button",
|
|
722
|
+
className: "absolute right-1 top-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground shadow",
|
|
723
|
+
"aria-label": messages.composer.removeAttachment,
|
|
724
|
+
onClick: () => onIntent?.({ type: "remove-attachment", attachmentId: attachment.id }),
|
|
725
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
726
|
+
}
|
|
727
|
+
),
|
|
728
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 bottom-0 truncate bg-background/85 px-1 py-0.5 text-[9px]", children: attachment.name })
|
|
729
|
+
] }, attachment.id)) }) : null,
|
|
730
|
+
/* @__PURE__ */ jsx(
|
|
731
|
+
"textarea",
|
|
732
|
+
{
|
|
733
|
+
value: viewModel.value,
|
|
734
|
+
rows: 2,
|
|
735
|
+
"aria-label": messages.composer.message,
|
|
736
|
+
placeholder: viewModel.placeholder,
|
|
737
|
+
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),
|
|
738
|
+
onChange: (event) => onIntent?.({ type: "change-value", value: event.target.value }),
|
|
739
|
+
onKeyDown: (event) => {
|
|
740
|
+
if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
|
|
741
|
+
event.preventDefault();
|
|
742
|
+
submit();
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
),
|
|
747
|
+
/* @__PURE__ */ 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: [
|
|
748
|
+
/* @__PURE__ */ jsxs("div", { className: "agent-workbench-composer__controls flex min-w-0 max-w-full flex-1 flex-wrap items-center gap-1.5", children: [
|
|
749
|
+
viewModel.capabilities.attachments ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
750
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.attach, onClick: () => fileInputRef.current?.click(), children: /* @__PURE__ */ jsx(Paperclip, { className: "size-4" }) }),
|
|
751
|
+
/* @__PURE__ */ jsx(
|
|
752
|
+
"input",
|
|
753
|
+
{
|
|
754
|
+
ref: fileInputRef,
|
|
755
|
+
type: "file",
|
|
756
|
+
className: "hidden",
|
|
757
|
+
multiple: true,
|
|
758
|
+
onChange: (event) => {
|
|
759
|
+
const files = Array.from(event.target.files || []);
|
|
760
|
+
if (files.length > 0) onIntent?.({ type: "request-attachments", files });
|
|
761
|
+
event.target.value = "";
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
] }) : null,
|
|
766
|
+
viewModel.capabilities.voiceInput ? /* @__PURE__ */ jsx("button", { type: "button", className: iconButtonClass, "aria-label": messages.composer.voice, onClick: () => onIntent?.({ type: "request-voice-input" }), children: /* @__PURE__ */ jsx(Mic, { className: "size-4" }) }) : null,
|
|
767
|
+
viewModel.capabilities.webSearch ? /* @__PURE__ */ jsxs("label", { className: "flex shrink-0 items-center gap-1.5 whitespace-nowrap px-1 text-xs font-medium text-foreground", children: [
|
|
768
|
+
messages.composer.webSearch,
|
|
769
|
+
/* @__PURE__ */ jsx(Switch, { checked: viewModel.webSearchEnabled, onCheckedChange: (enabled) => onIntent?.({ type: "toggle-web-search", enabled }) })
|
|
770
|
+
] }) : null,
|
|
771
|
+
viewModel.capabilities.modelSelection ? /* @__PURE__ */ jsx("label", { className: "sr-only", htmlFor: "agent-workbench-model", children: messages.composer.model }) : null,
|
|
772
|
+
viewModel.capabilities.modelSelection ? /* @__PURE__ */ jsxs(
|
|
773
|
+
"select",
|
|
774
|
+
{
|
|
775
|
+
id: "agent-workbench-model",
|
|
776
|
+
value: selectedModelValue,
|
|
777
|
+
"aria-label": messages.composer.model,
|
|
778
|
+
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",
|
|
779
|
+
onChange: (event) => {
|
|
780
|
+
const option = viewModel.model.options.find((item) => modelOptionValue(item) === event.target.value);
|
|
781
|
+
if (option) onIntent?.({ type: "select-model", modelId: option.id, mode: option.mode });
|
|
782
|
+
},
|
|
783
|
+
children: [
|
|
784
|
+
viewModel.model.options.length === 0 ? /* @__PURE__ */ jsx("option", { value: "", children: messages.composer.noModels }) : null,
|
|
785
|
+
viewModel.model.options.map((option) => /* @__PURE__ */ jsxs("option", { value: modelOptionValue(option), disabled: option.disabled, children: [
|
|
786
|
+
option.label,
|
|
787
|
+
" \xB7 ",
|
|
788
|
+
option.mode === "agent" ? "Agent" : "Chatbot"
|
|
789
|
+
] }, modelOptionValue(option)))
|
|
790
|
+
]
|
|
791
|
+
}
|
|
792
|
+
) : null,
|
|
793
|
+
viewModel.capabilities.reasoning && viewModel.reasoning ? /* @__PURE__ */ jsx(
|
|
794
|
+
"select",
|
|
795
|
+
{
|
|
796
|
+
value: viewModel.reasoning.value,
|
|
797
|
+
"aria-label": messages.composer.reasoning,
|
|
798
|
+
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",
|
|
799
|
+
onChange: (event) => onIntent?.({ type: "change-reasoning", value: event.target.value }),
|
|
800
|
+
children: viewModel.reasoning.options.map((value) => /* @__PURE__ */ jsx("option", { value, children: messages.composer.reasoningOptions[value] }, value))
|
|
801
|
+
}
|
|
802
|
+
) : null,
|
|
803
|
+
viewModel.capabilities.permissions && viewModel.permissionProfile ? /* @__PURE__ */ jsx(
|
|
804
|
+
"select",
|
|
805
|
+
{
|
|
806
|
+
value: viewModel.permissionProfile,
|
|
807
|
+
"aria-label": messages.composer.permissions,
|
|
808
|
+
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",
|
|
809
|
+
onChange: (event) => onIntent?.({ type: "change-permission", value: event.target.value }),
|
|
810
|
+
children: ["approval-required", "auto-approve", "full-access"].map((value) => /* @__PURE__ */ jsx("option", { value, children: messages.composer.permissionOptions[value] }, value))
|
|
811
|
+
}
|
|
812
|
+
) : null
|
|
813
|
+
] }),
|
|
814
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
|
|
815
|
+
showSubmitButton ? /* @__PURE__ */ jsx(
|
|
816
|
+
"button",
|
|
817
|
+
{
|
|
818
|
+
type: "submit",
|
|
819
|
+
className: cn2(iconButtonClass, "bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground"),
|
|
820
|
+
"aria-label": isBusy && viewModel.capabilities.queue ? messages.composer.queue : messages.composer.send,
|
|
821
|
+
disabled: !canSubmit,
|
|
822
|
+
children: /* @__PURE__ */ jsx(Send, { className: "size-4" })
|
|
823
|
+
}
|
|
824
|
+
) : null,
|
|
825
|
+
isBusy && !canSubmit && viewModel.capabilities.stop ? /* @__PURE__ */ jsx(
|
|
826
|
+
"button",
|
|
827
|
+
{
|
|
828
|
+
type: "button",
|
|
829
|
+
className: cn2(iconButtonClass, "border border-border"),
|
|
830
|
+
"aria-label": isStopping ? messages.run.stopping : messages.composer.stop,
|
|
831
|
+
disabled: isStopping,
|
|
832
|
+
onClick: () => onIntent?.({ type: "stop" }),
|
|
833
|
+
children: /* @__PURE__ */ jsx(Square, { className: "size-3 fill-current" })
|
|
834
|
+
}
|
|
835
|
+
) : null
|
|
836
|
+
] })
|
|
837
|
+
] })
|
|
838
|
+
] }),
|
|
839
|
+
viewModel.status === "error" && viewModel.error ? /* @__PURE__ */ jsx("p", { role: "alert", className: "text-sm text-destructive-text", children: viewModel.error }) : null
|
|
840
|
+
]
|
|
841
|
+
}
|
|
842
|
+
);
|
|
843
|
+
}
|
|
614
844
|
function ItemAvatar({ item }) {
|
|
615
845
|
const [failed, setFailed] = useState(false);
|
|
616
846
|
if (item.iconUrl && !failed) {
|
|
@@ -696,7 +926,7 @@ function SessionActions({
|
|
|
696
926
|
] })
|
|
697
927
|
] });
|
|
698
928
|
}
|
|
699
|
-
function AgentWorkbenchSidebar({ viewModel, className, classNames, onIntent }) {
|
|
929
|
+
function AgentWorkbenchSidebar({ viewModel, headerActions, className, classNames, onIntent }) {
|
|
700
930
|
const { locale } = useMonkeysLocale();
|
|
701
931
|
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
702
932
|
const searchRef = useRef(null);
|
|
@@ -773,9 +1003,12 @@ function AgentWorkbenchSidebar({ viewModel, className, classNames, onIntent }) {
|
|
|
773
1003
|
),
|
|
774
1004
|
viewModel.searchQuery ? /* @__PURE__ */ 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__ */ jsx(X, { className: "size-3.5", "aria-hidden": "true" }) }) : /* @__PURE__ */ jsx("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground", children: "Ctrl K" })
|
|
775
1005
|
] }),
|
|
776
|
-
/* @__PURE__ */ jsxs(
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
|
|
1006
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1007
|
+
/* @__PURE__ */ jsxs(TabsList, { className: cn2("grid min-w-0 flex-1 grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
|
|
1008
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "agents", children: messages.agents }),
|
|
1009
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "sessions", children: messages.sessions })
|
|
1010
|
+
] }),
|
|
1011
|
+
headerActions ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center", children: headerActions }) : null
|
|
779
1012
|
] })
|
|
780
1013
|
] }),
|
|
781
1014
|
/* @__PURE__ */ jsxs(TabsContent, { value: "agents", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
@@ -1853,6 +2086,6 @@ function AgentWorkbenchTaskDetails({
|
|
|
1853
2086
|
);
|
|
1854
2087
|
}
|
|
1855
2088
|
|
|
1856
|
-
export { AgentWorkbenchActivity, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
2089
|
+
export { AgentWorkbenchActivity, AgentWorkbenchComposer, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
1857
2090
|
//# sourceMappingURL=index.mjs.map
|
|
1858
2091
|
//# sourceMappingURL=index.mjs.map
|