@inf-monkeys-tech/monkeys-design 1.0.66 → 1.0.68
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 +7 -41
- package/dist/components/agent-workbench/index.d.ts +7 -41
- package/dist/components/agent-workbench/index.js +24 -20
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +25 -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/navigation-sidebar/index.js +2 -0
- package/dist/components/navigation-sidebar/index.js.map +1 -1
- package/dist/components/navigation-sidebar/index.mjs +2 -0
- package/dist/components/navigation-sidebar/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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- 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/styles.css +1 -1
- package/dist/{types-15efbcf88674.d.mts → types-340390798922.d.mts} +2 -0
- package/dist/{types-15efbcf88674.d.ts → types-340390798922.d.ts} +2 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, FileText, Mic, Send, Square, ShoppingBag, Code2, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, TerminalSquare, Clock3, FileOutput, Download,
|
|
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, TerminalSquare, Clock3, FileOutput, Download, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, CheckCircle2, XCircle, CircleStop, GitFork, PencilLine, Copy, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2, Ellipsis } from 'lucide-react';
|
|
2
2
|
import * as React5 from 'react';
|
|
3
3
|
import { useImperativeHandle, createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
|
|
4
4
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -153,6 +153,8 @@ var enUS = {
|
|
|
153
153
|
moveDown: "Move message down",
|
|
154
154
|
queued: "Queued messages",
|
|
155
155
|
uploading: "Uploading",
|
|
156
|
+
uploadFailed: "Upload failed",
|
|
157
|
+
retryAttachment: "Retry attachment upload",
|
|
156
158
|
noModels: "No models available",
|
|
157
159
|
message: "Message",
|
|
158
160
|
attachmentOnly: "Attachment",
|
|
@@ -1066,23 +1068,25 @@ function AgentWorkbenchComposer({
|
|
|
1066
1068
|
}
|
|
1067
1069
|
) : null,
|
|
1068
1070
|
/* @__PURE__ */ jsxs("div", { ref: surfaceRef, className: "agent-workbench-composer__surface 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: [
|
|
1069
|
-
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) =>
|
|
1070
|
-
|
|
1071
|
-
attachment.status === "uploading"
|
|
1072
|
-
/* @__PURE__ */
|
|
1073
|
-
|
|
1074
|
-
{
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1071
|
+
viewModel.attachments.length > 0 ? /* @__PURE__ */ jsx("div", { "data-agent-workbench-composer-attachments": true, className: cn2("mb-2 flex max-w-full gap-2 overflow-x-auto overscroll-x-contain pb-1", classNames?.attachments), children: viewModel.attachments.map((attachment) => {
|
|
1072
|
+
const isAttachmentError = attachment.status === "error";
|
|
1073
|
+
const isAttachmentUploading = attachment.status === "uploading";
|
|
1074
|
+
return /* @__PURE__ */ jsxs("div", { role: isAttachmentError ? "alert" : void 0, className: cn2("flex h-14 min-w-48 max-w-64 shrink-0 items-center gap-2 rounded-md border bg-muted/45 p-1.5", isAttachmentError ? "border-destructive/50 bg-destructive/5" : "border-border"), children: [
|
|
1075
|
+
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded bg-muted", children: 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" }) }),
|
|
1076
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
1077
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-xs font-medium text-foreground", title: attachment.name, children: attachment.name }),
|
|
1078
|
+
/* @__PURE__ */ jsxs("span", { className: cn2("mt-0.5 flex items-center gap-1 text-[11px]", isAttachmentError ? "text-destructive-text" : "text-muted-foreground"), children: [
|
|
1079
|
+
isAttachmentUploading ? /* @__PURE__ */ jsx(LoaderCircle, { className: "size-3 animate-spin", "aria-hidden": "true" }) : null,
|
|
1080
|
+
isAttachmentError ? /* @__PURE__ */ jsx(CircleAlert, { className: "size-3", "aria-hidden": "true" }) : null,
|
|
1081
|
+
isAttachmentUploading ? messages.composer.uploading : isAttachmentError ? messages.composer.uploadFailed : attachment.mediaType || messages.composer.attachmentOnly
|
|
1082
|
+
] })
|
|
1083
|
+
] }),
|
|
1084
|
+
/* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-0.5", children: [
|
|
1085
|
+
isAttachmentError ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "!size-7 min-w-7 shrink-0 p-0 text-destructive-text hover:text-destructive-text", "aria-label": `${messages.composer.retryAttachment}: ${attachment.name}`, onClick: () => onIntent?.({ type: "retry-attachment", attachmentId: attachment.id }), children: /* @__PURE__ */ jsx(RotateCcw, { className: "size-3.5" }) }) : null,
|
|
1086
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "!size-7 min-w-7 shrink-0 p-0 text-muted-foreground hover:text-foreground", "aria-label": `${messages.composer.removeAttachment}: ${attachment.name}`, onClick: () => onIntent?.({ type: "remove-attachment", attachmentId: attachment.id }), children: /* @__PURE__ */ jsx(X, { className: "size-3.5" }) })
|
|
1087
|
+
] })
|
|
1088
|
+
] }, attachment.id);
|
|
1089
|
+
}) }) : null,
|
|
1086
1090
|
/* @__PURE__ */ jsx(
|
|
1087
1091
|
AutosizeTextarea,
|
|
1088
1092
|
{
|
|
@@ -1091,7 +1095,7 @@ function AgentWorkbenchComposer({
|
|
|
1091
1095
|
maxHeight: 256,
|
|
1092
1096
|
"aria-label": messages.composer.message,
|
|
1093
1097
|
placeholder: viewModel.placeholder,
|
|
1094
|
-
className: cn2("min-w-0 w-full resize-none rounded-none border-0 bg-transparent px-0 py-0 text-sm leading-relaxed text-foreground shadow-none focus-visible:ring-0 focus-visible:ring-offset-0", classNames?.textarea),
|
|
1098
|
+
className: cn2("min-w-0 w-full resize-none overflow-y-auto rounded-none border-0 bg-transparent px-0 py-0 text-sm leading-relaxed text-foreground shadow-none focus-visible:ring-0 focus-visible:ring-offset-0", classNames?.textarea),
|
|
1095
1099
|
onChange: (event) => onIntent?.({ type: "change-value", value: event.target.value }),
|
|
1096
1100
|
onKeyDown: (event) => {
|
|
1097
1101
|
if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
|
|
@@ -1102,7 +1106,7 @@ function AgentWorkbenchComposer({
|
|
|
1102
1106
|
}
|
|
1103
1107
|
),
|
|
1104
1108
|
/* @__PURE__ */ jsxs("div", { className: cn2("agent-workbench-composer__toolbar mt-2 flex min-h-8 min-w-0 max-w-full items-center gap-2", isNarrow ? "flex-wrap" : "flex-nowrap", classNames?.toolbar), children: [
|
|
1105
|
-
/* @__PURE__ */ jsxs("div", { className: cn2("agent-workbench-composer__controls flex min-w-0 max-w-full flex-1 items-center gap-1.5", isNarrow ? "w-full flex-wrap" : "flex-nowrap"), children: [
|
|
1109
|
+
/* @__PURE__ */ jsxs("div", { "data-agent-workbench-composer-controls": true, className: cn2("agent-workbench-composer__controls flex min-w-0 max-w-full flex-1 items-center gap-1.5", isNarrow ? "w-full flex-wrap" : "flex-nowrap overflow-x-auto overscroll-x-contain pb-1"), children: [
|
|
1106
1110
|
viewModel.capabilities.attachments ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1107
1111
|
/* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: iconButtonClass, "aria-label": messages.composer.attach, onClick: () => fileInputRef.current?.click(), children: /* @__PURE__ */ jsx(Paperclip, { className: "size-4" }) }),
|
|
1108
1112
|
/* @__PURE__ */ jsx(
|
|
@@ -1135,7 +1139,7 @@ function AgentWorkbenchComposer({
|
|
|
1135
1139
|
className: "h-7 min-w-0 gap-1.5 px-2.5 text-xs text-foreground/75 shadow-none hover:text-foreground data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-none",
|
|
1136
1140
|
children: [
|
|
1137
1141
|
action.icon ? /* @__PURE__ */ jsx(ActionIcon, { className: "size-3.5" }) : null,
|
|
1138
|
-
action.label
|
|
1142
|
+
/* @__PURE__ */ jsx("span", { className: "max-w-32 truncate", children: action.label })
|
|
1139
1143
|
]
|
|
1140
1144
|
},
|
|
1141
1145
|
action.id
|