@inf-monkeys-tech/monkeys-design 1.0.68 → 1.0.69
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 +71 -54
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +72 -56
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/{details-model-db4bd679f88e.d.mts → details-model-49d05d8a4e6d.d.mts} +27 -20
- package/dist/{details-model-db4bd679f88e.d.ts → details-model-49d05d8a4e6d.d.ts} +27 -20
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +70 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -55
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import * as React4 from 'react';
|
|
|
4
4
|
import React4__default, { forwardRef, useMemo, useId, useRef, useState, useEffect, createElement, createContext, useCallback, useContext, Children, isValidElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
7
|
-
import { ChevronDown, Search, Circle, Check, ChevronRight, ChevronUp, X, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, TerminalSquare,
|
|
7
|
+
import { ChevronDown, Search, Circle, Check, ChevronRight, ChevronUp, X, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, AlertCircle, RefreshCw, Loader2, TerminalSquare, FileOutput, Download, Clock3, CheckCircle2, XCircle, CircleStop, GitFork, PencilLine, Copy, RotateCcw, FileCode2, Files, TestTube2, Image, Ellipsis, Pencil, Trash2 } from 'lucide-react';
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
9
|
import * as DropdownMenu2 from '@radix-ui/react-dropdown-menu';
|
|
10
10
|
import * as ContextMenu from '@radix-ui/react-context-menu';
|
|
@@ -18939,7 +18939,70 @@ function createAgentWorkbenchActivityModel(viewModel) {
|
|
|
18939
18939
|
run: projectRun(visibleEvents)
|
|
18940
18940
|
};
|
|
18941
18941
|
}
|
|
18942
|
-
function JsonValue({ value
|
|
18942
|
+
function JsonValue({ value }) {
|
|
18943
|
+
if (value === void 0) return null;
|
|
18944
|
+
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
18945
|
+
return /* @__PURE__ */ jsx(
|
|
18946
|
+
"pre",
|
|
18947
|
+
{
|
|
18948
|
+
className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground",
|
|
18949
|
+
tabIndex: 0,
|
|
18950
|
+
children: content
|
|
18951
|
+
}
|
|
18952
|
+
);
|
|
18953
|
+
}
|
|
18954
|
+
function AgentWorkbenchApproval({ approval, className, onDecision }) {
|
|
18955
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.approval;
|
|
18956
|
+
const requested = approval.status === "requested";
|
|
18957
|
+
const approved = approval.status === "approved";
|
|
18958
|
+
return /* @__PURE__ */ jsx(
|
|
18959
|
+
"article",
|
|
18960
|
+
{
|
|
18961
|
+
className: cn2("rounded-lg border border-border bg-card p-3 text-card-foreground", className),
|
|
18962
|
+
"data-agent-approval-status": approval.status,
|
|
18963
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
18964
|
+
requested ? /* @__PURE__ */ jsx(Clock3, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": "true" }) : approved ? /* @__PURE__ */ jsx(Check, { className: "mt-0.5 size-4 shrink-0 text-primary", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(X, { className: "mt-0.5 size-4 shrink-0 text-destructive-text", "aria-hidden": "true" }),
|
|
18965
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
18966
|
+
/* @__PURE__ */ jsx("h3", { className: "break-words text-sm font-medium", children: approval.title }),
|
|
18967
|
+
approval.description ? /* @__PURE__ */ jsx("p", { className: "mt-1 whitespace-pre-wrap break-words text-sm text-muted-foreground", children: approval.description }) : null,
|
|
18968
|
+
approval.requestedAction !== void 0 ? /* @__PURE__ */ jsx("div", { className: "mt-3 min-w-0", children: /* @__PURE__ */ jsx(JsonValue, { value: approval.requestedAction }) }) : null,
|
|
18969
|
+
requested ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
18970
|
+
/* @__PURE__ */ jsx(
|
|
18971
|
+
Button,
|
|
18972
|
+
{
|
|
18973
|
+
type: "button",
|
|
18974
|
+
size: "sm",
|
|
18975
|
+
className: "h-auto px-3 py-1.5 text-sm",
|
|
18976
|
+
disabled: !onDecision,
|
|
18977
|
+
onClick: () => onDecision?.({
|
|
18978
|
+
approvalId: approval.approvalId,
|
|
18979
|
+
approved: true
|
|
18980
|
+
}),
|
|
18981
|
+
children: messages.approve
|
|
18982
|
+
}
|
|
18983
|
+
),
|
|
18984
|
+
/* @__PURE__ */ jsx(
|
|
18985
|
+
Button,
|
|
18986
|
+
{
|
|
18987
|
+
type: "button",
|
|
18988
|
+
variant: "outline",
|
|
18989
|
+
size: "sm",
|
|
18990
|
+
className: "h-auto px-3 py-1.5 text-sm",
|
|
18991
|
+
disabled: !onDecision,
|
|
18992
|
+
onClick: () => onDecision?.({
|
|
18993
|
+
approvalId: approval.approvalId,
|
|
18994
|
+
approved: false
|
|
18995
|
+
}),
|
|
18996
|
+
children: messages.reject
|
|
18997
|
+
}
|
|
18998
|
+
)
|
|
18999
|
+
] }) : /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: approved ? messages.approved : messages.rejected })
|
|
19000
|
+
] })
|
|
19001
|
+
] })
|
|
19002
|
+
}
|
|
19003
|
+
);
|
|
19004
|
+
}
|
|
19005
|
+
function JsonValue2({ value, className }) {
|
|
18943
19006
|
if (value === void 0) return null;
|
|
18944
19007
|
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
18945
19008
|
return /* @__PURE__ */ jsx(
|
|
@@ -19026,11 +19089,11 @@ function AgentWorkbenchTool({
|
|
|
19026
19089
|
/* @__PURE__ */ jsxs("div", { className: cn2("space-y-3 border-t border-border px-3 py-3 text-sm", classNames?.content), children: [
|
|
19027
19090
|
event.payload.input !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
19028
19091
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.input }),
|
|
19029
|
-
/* @__PURE__ */ jsx(
|
|
19092
|
+
/* @__PURE__ */ jsx(JsonValue2, { value: event.payload.input, className: classNames?.input })
|
|
19030
19093
|
] }) : null,
|
|
19031
19094
|
event.payload.output !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
19032
19095
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.output }),
|
|
19033
|
-
/* @__PURE__ */ jsx(
|
|
19096
|
+
/* @__PURE__ */ jsx(JsonValue2, { value: event.payload.output, className: classNames?.output })
|
|
19034
19097
|
] }) : null,
|
|
19035
19098
|
event.payload.error ? /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: event.payload.error }) : null
|
|
19036
19099
|
] })
|
|
@@ -19103,11 +19166,6 @@ function StatusIcon({ status }) {
|
|
|
19103
19166
|
}
|
|
19104
19167
|
return /* @__PURE__ */ jsx(Circle, { className: "size-4 text-muted-foreground", "aria-hidden": "true" });
|
|
19105
19168
|
}
|
|
19106
|
-
function JsonValue2({ value }) {
|
|
19107
|
-
if (value === void 0) return null;
|
|
19108
|
-
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
19109
|
-
return /* @__PURE__ */ jsx("pre", { className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground", children: content });
|
|
19110
|
-
}
|
|
19111
19169
|
function formatDuration2(durationMs) {
|
|
19112
19170
|
if (durationMs < 1e3) return "<1s";
|
|
19113
19171
|
const totalSeconds = Math.floor(durationMs / 1e3);
|
|
@@ -19233,54 +19291,12 @@ function AgentWorkbenchActivity({
|
|
|
19233
19291
|
event.payload.toolCallId
|
|
19234
19292
|
)),
|
|
19235
19293
|
approvals.map((event) => {
|
|
19236
|
-
const requested = event.payload.status === "requested";
|
|
19237
|
-
const approved = event.payload.status === "approved";
|
|
19238
19294
|
return /* @__PURE__ */ jsx(
|
|
19239
|
-
|
|
19295
|
+
AgentWorkbenchApproval,
|
|
19240
19296
|
{
|
|
19241
|
-
|
|
19242
|
-
|
|
19243
|
-
|
|
19244
|
-
),
|
|
19245
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
19246
|
-
requested ? /* @__PURE__ */ jsx(Clock3, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": "true" }) : approved ? /* @__PURE__ */ jsx(Check, { className: "mt-0.5 size-4 shrink-0 text-primary", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(X, { className: "mt-0.5 size-4 shrink-0 text-destructive-text", "aria-hidden": "true" }),
|
|
19247
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
19248
|
-
/* @__PURE__ */ jsx("h3", { className: "text-sm font-medium", children: event.payload.title }),
|
|
19249
|
-
event.payload.description ? /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: event.payload.description }) : null,
|
|
19250
|
-
event.payload.requestedAction !== void 0 ? /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(JsonValue2, { value: event.payload.requestedAction }) }) : null,
|
|
19251
|
-
requested ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
19252
|
-
/* @__PURE__ */ jsx(
|
|
19253
|
-
Button,
|
|
19254
|
-
{
|
|
19255
|
-
type: "button",
|
|
19256
|
-
size: "sm",
|
|
19257
|
-
className: "h-auto px-3 py-1.5 text-sm",
|
|
19258
|
-
disabled: !onApprovalDecision,
|
|
19259
|
-
onClick: () => onApprovalDecision?.({
|
|
19260
|
-
approvalId: event.payload.approvalId,
|
|
19261
|
-
approved: true
|
|
19262
|
-
}),
|
|
19263
|
-
children: messages.approval.approve
|
|
19264
|
-
}
|
|
19265
|
-
),
|
|
19266
|
-
/* @__PURE__ */ jsx(
|
|
19267
|
-
Button,
|
|
19268
|
-
{
|
|
19269
|
-
type: "button",
|
|
19270
|
-
variant: "outline",
|
|
19271
|
-
size: "sm",
|
|
19272
|
-
className: "h-auto px-3 py-1.5 text-sm",
|
|
19273
|
-
disabled: !onApprovalDecision,
|
|
19274
|
-
onClick: () => onApprovalDecision?.({
|
|
19275
|
-
approvalId: event.payload.approvalId,
|
|
19276
|
-
approved: false
|
|
19277
|
-
}),
|
|
19278
|
-
children: messages.approval.reject
|
|
19279
|
-
}
|
|
19280
|
-
)
|
|
19281
|
-
] }) : /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: approved ? messages.approval.approved : messages.approval.rejected })
|
|
19282
|
-
] })
|
|
19283
|
-
] })
|
|
19297
|
+
approval: event.payload,
|
|
19298
|
+
className: classNames?.approval,
|
|
19299
|
+
onDecision: onApprovalDecision
|
|
19284
19300
|
},
|
|
19285
19301
|
event.payload.approvalId
|
|
19286
19302
|
);
|