@inf-monkeys-tech/monkeys-design 1.0.9 → 1.0.10-canary.59.1.610ed92
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 +17 -1
- package/dist/components/agent-workbench/index.d.ts +17 -1
- package/dist/components/agent-workbench/index.js +118 -22
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +120 -25
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/base/index.js +8 -1
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +8 -1
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js +8 -1
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +8 -1
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.js +8 -1
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +8 -1
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/runtime/index.js +8 -1
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +8 -1
- 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 +8 -1
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/index.mjs +8 -1
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toolbar/index.js +8 -1
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/index.mjs +8 -1
- package/dist/components/toolbar/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +8 -1
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +8 -1
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +131 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +132 -26
- package/dist/index.mjs.map +1 -1
- package/dist/locale/index.d.mts +16 -2
- package/dist/locale/index.d.ts +16 -2
- package/dist/locale/index.js +21 -3
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.mjs +21 -3
- 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 +21 -3
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +21 -3
- package/dist/provider/index.mjs.map +1 -1
- package/dist/{types-fed4675a38fa.d.mts → types-3d3e043f0ccb.d.mts} +10 -1
- package/dist/{types-fed4675a38fa.d.ts → types-3d3e043f0ccb.d.ts} +10 -1
- package/package.json +3 -3
|
@@ -82,6 +82,22 @@ interface AgentWorkbenchActivityModel {
|
|
|
82
82
|
run?: AgentWorkbenchEventOf<'status'>;
|
|
83
83
|
}
|
|
84
84
|
declare function createAgentWorkbenchActivityModel(viewModel: AgentSessionViewModel): AgentWorkbenchActivityModel;
|
|
85
|
+
interface AgentWorkbenchToolClassNames {
|
|
86
|
+
root?: string;
|
|
87
|
+
trigger?: string;
|
|
88
|
+
content?: string;
|
|
89
|
+
input?: string;
|
|
90
|
+
output?: string;
|
|
91
|
+
}
|
|
92
|
+
interface AgentWorkbenchToolProps {
|
|
93
|
+
event: AgentWorkbenchEventOf<'tool'>;
|
|
94
|
+
expanded?: boolean;
|
|
95
|
+
defaultExpanded?: boolean;
|
|
96
|
+
className?: string;
|
|
97
|
+
classNames?: AgentWorkbenchToolClassNames;
|
|
98
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
99
|
+
}
|
|
100
|
+
declare function AgentWorkbenchTool({ event, expanded, defaultExpanded, className, classNames, onExpandedChange, }: AgentWorkbenchToolProps): react_jsx_runtime.JSX.Element;
|
|
85
101
|
interface AgentWorkbenchTerminalModel {
|
|
86
102
|
terminalId: string;
|
|
87
103
|
stdin: string;
|
|
@@ -108,4 +124,4 @@ interface AgentWorkbenchDetailsModel {
|
|
|
108
124
|
};
|
|
109
125
|
}
|
|
110
126
|
declare function createAgentWorkbenchDetailsModel(viewModel: AgentSessionViewModel): AgentWorkbenchDetailsModel;
|
|
111
|
-
export { AgentWorkbenchActivity, type AgentWorkbenchActivityClassNames, type AgentWorkbenchActivityModel, type AgentWorkbenchActivityProps, type AgentWorkbenchApprovalIntent, type AgentWorkbenchArtifactIntent, type AgentWorkbenchDetailsIntent, type AgentWorkbenchDetailsModel, type AgentWorkbenchDetailsState, type AgentWorkbenchDetailsTab, type AgentWorkbenchEventOf, AgentWorkbenchTaskDetails, type AgentWorkbenchTaskDetailsClassNames, type AgentWorkbenchTaskDetailsProps, type AgentWorkbenchTerminalModel, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
127
|
+
export { AgentWorkbenchActivity, type AgentWorkbenchActivityClassNames, type AgentWorkbenchActivityModel, type AgentWorkbenchActivityProps, type AgentWorkbenchApprovalIntent, type AgentWorkbenchArtifactIntent, type AgentWorkbenchDetailsIntent, type AgentWorkbenchDetailsModel, type AgentWorkbenchDetailsState, type AgentWorkbenchDetailsTab, type AgentWorkbenchEventOf, AgentWorkbenchTaskDetails, type AgentWorkbenchTaskDetailsClassNames, type AgentWorkbenchTaskDetailsProps, type AgentWorkbenchTerminalModel, AgentWorkbenchTool, type AgentWorkbenchToolClassNames, type AgentWorkbenchToolProps, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
@@ -82,6 +82,22 @@ interface AgentWorkbenchActivityModel {
|
|
|
82
82
|
run?: AgentWorkbenchEventOf<'status'>;
|
|
83
83
|
}
|
|
84
84
|
declare function createAgentWorkbenchActivityModel(viewModel: AgentSessionViewModel): AgentWorkbenchActivityModel;
|
|
85
|
+
interface AgentWorkbenchToolClassNames {
|
|
86
|
+
root?: string;
|
|
87
|
+
trigger?: string;
|
|
88
|
+
content?: string;
|
|
89
|
+
input?: string;
|
|
90
|
+
output?: string;
|
|
91
|
+
}
|
|
92
|
+
interface AgentWorkbenchToolProps {
|
|
93
|
+
event: AgentWorkbenchEventOf<'tool'>;
|
|
94
|
+
expanded?: boolean;
|
|
95
|
+
defaultExpanded?: boolean;
|
|
96
|
+
className?: string;
|
|
97
|
+
classNames?: AgentWorkbenchToolClassNames;
|
|
98
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
99
|
+
}
|
|
100
|
+
declare function AgentWorkbenchTool({ event, expanded, defaultExpanded, className, classNames, onExpandedChange, }: AgentWorkbenchToolProps): react_jsx_runtime.JSX.Element;
|
|
85
101
|
interface AgentWorkbenchTerminalModel {
|
|
86
102
|
terminalId: string;
|
|
87
103
|
stdin: string;
|
|
@@ -108,4 +124,4 @@ interface AgentWorkbenchDetailsModel {
|
|
|
108
124
|
};
|
|
109
125
|
}
|
|
110
126
|
declare function createAgentWorkbenchDetailsModel(viewModel: AgentSessionViewModel): AgentWorkbenchDetailsModel;
|
|
111
|
-
export { AgentWorkbenchActivity, type AgentWorkbenchActivityClassNames, type AgentWorkbenchActivityModel, type AgentWorkbenchActivityProps, type AgentWorkbenchApprovalIntent, type AgentWorkbenchArtifactIntent, type AgentWorkbenchDetailsIntent, type AgentWorkbenchDetailsModel, type AgentWorkbenchDetailsState, type AgentWorkbenchDetailsTab, type AgentWorkbenchEventOf, AgentWorkbenchTaskDetails, type AgentWorkbenchTaskDetailsClassNames, type AgentWorkbenchTaskDetailsProps, type AgentWorkbenchTerminalModel, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
127
|
+
export { AgentWorkbenchActivity, type AgentWorkbenchActivityClassNames, type AgentWorkbenchActivityModel, type AgentWorkbenchActivityProps, type AgentWorkbenchApprovalIntent, type AgentWorkbenchArtifactIntent, type AgentWorkbenchDetailsIntent, type AgentWorkbenchDetailsModel, type AgentWorkbenchDetailsState, type AgentWorkbenchDetailsTab, type AgentWorkbenchEventOf, AgentWorkbenchTaskDetails, type AgentWorkbenchTaskDetailsClassNames, type AgentWorkbenchTaskDetailsProps, type AgentWorkbenchTerminalModel, AgentWorkbenchTool, type AgentWorkbenchToolClassNames, type AgentWorkbenchToolProps, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
@@ -108,7 +108,14 @@ var enUS = {
|
|
|
108
108
|
taskNoDetail: "No additional details",
|
|
109
109
|
tool: {
|
|
110
110
|
input: "Input",
|
|
111
|
-
output: "Output"
|
|
111
|
+
output: "Output",
|
|
112
|
+
status: {
|
|
113
|
+
pending: "Pending",
|
|
114
|
+
running: "Running",
|
|
115
|
+
completed: "Completed",
|
|
116
|
+
failed: "Error",
|
|
117
|
+
denied: "Denied"
|
|
118
|
+
}
|
|
112
119
|
},
|
|
113
120
|
approval: {
|
|
114
121
|
approve: "Approve",
|
|
@@ -313,6 +320,105 @@ function createAgentWorkbenchActivityModel(viewModel) {
|
|
|
313
320
|
)
|
|
314
321
|
};
|
|
315
322
|
}
|
|
323
|
+
function JsonValue({ value, className }) {
|
|
324
|
+
if (value === void 0) return null;
|
|
325
|
+
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
326
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
327
|
+
"pre",
|
|
328
|
+
{
|
|
329
|
+
className: cn(
|
|
330
|
+
"max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground",
|
|
331
|
+
className
|
|
332
|
+
),
|
|
333
|
+
children: content
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
function ToolStatus({ status }) {
|
|
338
|
+
useMonkeysLocaleMessages().agentWorkbench.tool.status;
|
|
339
|
+
const commonClassName = "size-3.5 shrink-0";
|
|
340
|
+
if (status === "pending") {
|
|
341
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock3, { className: commonClassName, "aria-hidden": "true" });
|
|
342
|
+
}
|
|
343
|
+
if (status === "running") {
|
|
344
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: cn(commonClassName, "animate-spin"), "aria-hidden": "true" });
|
|
345
|
+
}
|
|
346
|
+
if (status === "completed") {
|
|
347
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: cn(commonClassName, "text-primary"), "aria-hidden": "true" });
|
|
348
|
+
}
|
|
349
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: cn(commonClassName, "text-destructive-text"), "aria-hidden": "true" });
|
|
350
|
+
}
|
|
351
|
+
function AgentWorkbenchTool({
|
|
352
|
+
event,
|
|
353
|
+
expanded,
|
|
354
|
+
defaultExpanded = event.payload.status === "failed",
|
|
355
|
+
className,
|
|
356
|
+
classNames,
|
|
357
|
+
onExpandedChange
|
|
358
|
+
}) {
|
|
359
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.tool;
|
|
360
|
+
const [uncontrolledExpanded, setUncontrolledExpanded] = react.useState(defaultExpanded);
|
|
361
|
+
const isControlled = expanded !== void 0;
|
|
362
|
+
const isExpanded = expanded ?? uncontrolledExpanded;
|
|
363
|
+
const status = event.payload.status;
|
|
364
|
+
const setExpanded = (nextExpanded) => {
|
|
365
|
+
if (!isControlled) setUncontrolledExpanded(nextExpanded);
|
|
366
|
+
onExpandedChange?.(nextExpanded);
|
|
367
|
+
};
|
|
368
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
369
|
+
"details",
|
|
370
|
+
{
|
|
371
|
+
open: isExpanded,
|
|
372
|
+
className: cn(
|
|
373
|
+
"group rounded-lg border border-border bg-card text-card-foreground",
|
|
374
|
+
classNames?.root,
|
|
375
|
+
className
|
|
376
|
+
),
|
|
377
|
+
"data-tool-status": status,
|
|
378
|
+
children: [
|
|
379
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
380
|
+
"summary",
|
|
381
|
+
{
|
|
382
|
+
className: cn(
|
|
383
|
+
"flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden",
|
|
384
|
+
classNames?.trigger
|
|
385
|
+
),
|
|
386
|
+
onClick: (event2) => {
|
|
387
|
+
event2.preventDefault();
|
|
388
|
+
setExpanded(!isExpanded);
|
|
389
|
+
},
|
|
390
|
+
children: [
|
|
391
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TerminalSquare, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
|
|
392
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate font-medium", children: event.payload.toolName }),
|
|
393
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex shrink-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground", children: [
|
|
394
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolStatus, { status }),
|
|
395
|
+
messages.status[status]
|
|
396
|
+
] }),
|
|
397
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
398
|
+
lucideReact.ChevronDown,
|
|
399
|
+
{
|
|
400
|
+
className: "size-4 shrink-0 text-muted-foreground transition-transform group-open:rotate-180",
|
|
401
|
+
"aria-hidden": "true"
|
|
402
|
+
}
|
|
403
|
+
)
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-3 border-t border-border px-3 py-3 text-sm", classNames?.content), children: [
|
|
408
|
+
event.payload.input !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
409
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.input }),
|
|
410
|
+
/* @__PURE__ */ jsxRuntime.jsx(JsonValue, { value: event.payload.input, className: classNames?.input })
|
|
411
|
+
] }) : null,
|
|
412
|
+
event.payload.output !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
413
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.output }),
|
|
414
|
+
/* @__PURE__ */ jsxRuntime.jsx(JsonValue, { value: event.payload.output, className: classNames?.output })
|
|
415
|
+
] }) : null,
|
|
416
|
+
event.payload.error ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: event.payload.error }) : null
|
|
417
|
+
] })
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
);
|
|
421
|
+
}
|
|
316
422
|
function ActivityDetails({
|
|
317
423
|
icon: Icon,
|
|
318
424
|
title,
|
|
@@ -378,7 +484,7 @@ function StatusIcon({ status }) {
|
|
|
378
484
|
}
|
|
379
485
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "size-4 text-muted-foreground", "aria-hidden": "true" });
|
|
380
486
|
}
|
|
381
|
-
function
|
|
487
|
+
function JsonValue2({ value }) {
|
|
382
488
|
if (value === void 0) return null;
|
|
383
489
|
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
384
490
|
return /* @__PURE__ */ jsxRuntime.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 });
|
|
@@ -490,26 +596,15 @@ function AgentWorkbenchActivity({
|
|
|
490
596
|
event.payload.taskId
|
|
491
597
|
)),
|
|
492
598
|
tools.map((event) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
493
|
-
|
|
599
|
+
AgentWorkbenchTool,
|
|
494
600
|
{
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
503
|
-
event.payload.input !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
504
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.tool.input }),
|
|
505
|
-
/* @__PURE__ */ jsxRuntime.jsx(JsonValue, { value: event.payload.input })
|
|
506
|
-
] }) : null,
|
|
507
|
-
event.payload.output !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
508
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.tool.output }),
|
|
509
|
-
/* @__PURE__ */ jsxRuntime.jsx(JsonValue, { value: event.payload.output })
|
|
510
|
-
] }) : null,
|
|
511
|
-
event.payload.error ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: event.payload.error }) : null
|
|
512
|
-
] })
|
|
601
|
+
event,
|
|
602
|
+
defaultExpanded: event.payload.status === "failed",
|
|
603
|
+
classNames: {
|
|
604
|
+
root: classNames?.item,
|
|
605
|
+
trigger: classNames?.trigger,
|
|
606
|
+
content: classNames?.content
|
|
607
|
+
}
|
|
513
608
|
},
|
|
514
609
|
event.payload.toolCallId
|
|
515
610
|
)),
|
|
@@ -528,7 +623,7 @@ function AgentWorkbenchActivity({
|
|
|
528
623
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
529
624
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-medium", children: event.payload.title }),
|
|
530
625
|
event.payload.description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: event.payload.description }) : null,
|
|
531
|
-
event.payload.requestedAction !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
626
|
+
event.payload.requestedAction !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(JsonValue2, { value: event.payload.requestedAction }) }) : null,
|
|
532
627
|
requested ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
533
628
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
534
629
|
"button",
|
|
@@ -1090,6 +1185,7 @@ function AgentWorkbenchTaskDetails({
|
|
|
1090
1185
|
|
|
1091
1186
|
exports.AgentWorkbenchActivity = AgentWorkbenchActivity;
|
|
1092
1187
|
exports.AgentWorkbenchTaskDetails = AgentWorkbenchTaskDetails;
|
|
1188
|
+
exports.AgentWorkbenchTool = AgentWorkbenchTool;
|
|
1093
1189
|
exports.createAgentWorkbenchActivityModel = createAgentWorkbenchActivityModel;
|
|
1094
1190
|
exports.createAgentWorkbenchDetailsModel = createAgentWorkbenchDetailsModel;
|
|
1095
1191
|
//# sourceMappingURL=index.js.map
|