@inf-monkeys-tech/monkeys-design 1.0.81 → 1.0.84

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.
Files changed (62) hide show
  1. package/dist/components/agent-workbench/index.d.mts +3 -0
  2. package/dist/components/agent-workbench/index.d.ts +3 -0
  3. package/dist/components/agent-workbench/index.js +82 -20
  4. package/dist/components/agent-workbench/index.js.map +1 -1
  5. package/dist/components/agent-workbench/index.mjs +83 -21
  6. package/dist/components/agent-workbench/index.mjs.map +1 -1
  7. package/dist/components/base/index.js +4 -1
  8. package/dist/components/base/index.js.map +1 -1
  9. package/dist/components/base/index.mjs +4 -1
  10. package/dist/components/base/index.mjs.map +1 -1
  11. package/dist/components/data-explorer/index.js +4 -1
  12. package/dist/components/data-explorer/index.js.map +1 -1
  13. package/dist/components/data-explorer/index.mjs +4 -1
  14. package/dist/components/data-explorer/index.mjs.map +1 -1
  15. package/dist/components/layout/index.js +4 -1
  16. package/dist/components/layout/index.js.map +1 -1
  17. package/dist/components/layout/index.mjs +4 -1
  18. package/dist/components/layout/index.mjs.map +1 -1
  19. package/dist/components/navigation-sidebar/index.js +4 -1
  20. package/dist/components/navigation-sidebar/index.js.map +1 -1
  21. package/dist/components/navigation-sidebar/index.mjs +4 -1
  22. package/dist/components/navigation-sidebar/index.mjs.map +1 -1
  23. package/dist/components/runtime/index.js +4 -1
  24. package/dist/components/runtime/index.js.map +1 -1
  25. package/dist/components/runtime/index.mjs +4 -1
  26. package/dist/components/runtime/index.mjs.map +1 -1
  27. package/dist/components/toast/index.d.mts +1 -1
  28. package/dist/components/toast/index.d.ts +1 -1
  29. package/dist/components/toast/index.js +4 -1
  30. package/dist/components/toast/index.js.map +1 -1
  31. package/dist/components/toast/index.mjs +4 -1
  32. package/dist/components/toast/index.mjs.map +1 -1
  33. package/dist/components/toolbar/index.js +4 -1
  34. package/dist/components/toolbar/index.js.map +1 -1
  35. package/dist/components/toolbar/index.mjs +4 -1
  36. package/dist/components/toolbar/index.mjs.map +1 -1
  37. package/dist/components/workbench/index.js +4 -1
  38. package/dist/components/workbench/index.js.map +1 -1
  39. package/dist/components/workbench/index.mjs +4 -1
  40. package/dist/components/workbench/index.mjs.map +1 -1
  41. package/dist/index.d.mts +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +44 -15
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +44 -15
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/locale/index.d.mts +8 -2
  48. package/dist/locale/index.d.ts +8 -2
  49. package/dist/locale/index.js +8 -2
  50. package/dist/locale/index.js.map +1 -1
  51. package/dist/locale/index.mjs +8 -2
  52. package/dist/locale/index.mjs.map +1 -1
  53. package/dist/provider/index.d.mts +2 -2
  54. package/dist/provider/index.d.ts +2 -2
  55. package/dist/provider/index.js +8 -2
  56. package/dist/provider/index.js.map +1 -1
  57. package/dist/provider/index.mjs +8 -2
  58. package/dist/provider/index.mjs.map +1 -1
  59. package/dist/styles.css +1 -1
  60. package/dist/{types-340390798922.d.mts → types-9c410e33a06b.d.mts} +3 -0
  61. package/dist/{types-340390798922.d.ts → types-9c410e33a06b.d.ts} +3 -0
  62. package/package.json +1 -1
@@ -218,6 +218,9 @@ type AgentWorkbenchArtifactWorkspaceIntent = {
218
218
  type: 'reorder';
219
219
  artifactId: string;
220
220
  overArtifactId: string;
221
+ } | {
222
+ type: 'retry';
223
+ artifactId: string;
221
224
  } | {
222
225
  type: 'select';
223
226
  artifactId: string;
@@ -218,6 +218,9 @@ type AgentWorkbenchArtifactWorkspaceIntent = {
218
218
  type: 'reorder';
219
219
  artifactId: string;
220
220
  overArtifactId: string;
221
+ } | {
222
+ type: 'retry';
223
+ artifactId: string;
221
224
  } | {
222
225
  type: 'select';
223
226
  artifactId: string;
@@ -240,7 +240,10 @@ var enUS = {
240
240
  closeTab: ({ name }) => `Close ${name}`,
241
241
  closeWorkspace: "Close workspace",
242
242
  download: ({ name }) => `Download ${name}`,
243
- openExternal: ({ name }) => `Open ${name} in a new window`
243
+ openExternal: ({ name }) => `Open ${name} in a new window`,
244
+ loading: "Loading preview...",
245
+ failed: "Preview unavailable",
246
+ retry: "Try again"
244
247
  },
245
248
  usage: {
246
249
  label: "Context usage",
@@ -2613,7 +2616,7 @@ function JsonValue({ value }) {
2613
2616
  return /* @__PURE__ */ jsxRuntime.jsx(
2614
2617
  "pre",
2615
2618
  {
2616
- className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground",
2619
+ className: "max-h-48 max-w-full overflow-auto overscroll-contain whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground [overflow-wrap:anywhere]",
2617
2620
  tabIndex: 0,
2618
2621
  children: content
2619
2622
  }
@@ -2626,13 +2629,20 @@ function AgentWorkbenchApproval({ approval, className, onDecision }) {
2626
2629
  return /* @__PURE__ */ jsxRuntime.jsx(
2627
2630
  "article",
2628
2631
  {
2629
- className: cn2("rounded-lg border border-border bg-card p-3 text-card-foreground", className),
2632
+ className: cn2("min-w-0 overflow-hidden rounded-lg border border-border bg-card p-3 text-card-foreground", className),
2630
2633
  "data-agent-approval-status": approval.status,
2631
2634
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
2632
2635
  requested ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock3, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": "true" }) : approved ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "mt-0.5 size-4 shrink-0 text-primary", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "mt-0.5 size-4 shrink-0 text-destructive-text", "aria-hidden": "true" }),
2633
2636
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
2634
2637
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "break-words text-sm font-medium", children: approval.title }),
2635
- approval.description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 whitespace-pre-wrap break-words text-sm text-muted-foreground", children: approval.description }) : null,
2638
+ approval.description ? /* @__PURE__ */ jsxRuntime.jsx(
2639
+ "p",
2640
+ {
2641
+ tabIndex: 0,
2642
+ className: "mt-1 max-h-32 overflow-auto whitespace-pre-wrap break-words text-sm text-muted-foreground [overflow-wrap:anywhere]",
2643
+ children: approval.description
2644
+ }
2645
+ ) : null,
2636
2646
  approval.requestedAction !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(JsonValue, { value: approval.requestedAction }) }) : null,
2637
2647
  requested ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
2638
2648
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2676,8 +2686,9 @@ function JsonValue2({ value, className }) {
2676
2686
  return /* @__PURE__ */ jsxRuntime.jsx(
2677
2687
  "pre",
2678
2688
  {
2689
+ tabIndex: 0,
2679
2690
  className: cn2(
2680
- "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground",
2691
+ "max-h-64 max-w-full overflow-auto overscroll-contain whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground [overflow-wrap:anywhere]",
2681
2692
  className
2682
2693
  ),
2683
2694
  children: content
@@ -2720,7 +2731,7 @@ function AgentWorkbenchTool({
2720
2731
  {
2721
2732
  open: isExpanded,
2722
2733
  className: cn2(
2723
- "group rounded-lg border border-border bg-card text-card-foreground",
2734
+ "group min-w-0 overflow-hidden rounded-lg border border-border bg-card text-card-foreground",
2724
2735
  classNames?.root,
2725
2736
  className
2726
2737
  ),
@@ -2754,7 +2765,7 @@ function AgentWorkbenchTool({
2754
2765
  ]
2755
2766
  }
2756
2767
  ),
2757
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn2("space-y-3 border-t border-border px-3 py-3 text-sm", classNames?.content), children: [
2768
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn2("min-w-0 space-y-3 border-t border-border px-3 py-3 text-sm", classNames?.content), children: [
2758
2769
  event.payload.input !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
2759
2770
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.input }),
2760
2771
  /* @__PURE__ */ jsxRuntime.jsx(JsonValue2, { value: event.payload.input, className: classNames?.input })
@@ -2763,7 +2774,15 @@ function AgentWorkbenchTool({
2763
2774
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.output }),
2764
2775
  /* @__PURE__ */ jsxRuntime.jsx(JsonValue2, { value: event.payload.output, className: classNames?.output })
2765
2776
  ] }) : null,
2766
- event.payload.error ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: event.payload.error }) : null
2777
+ event.payload.error ? /* @__PURE__ */ jsxRuntime.jsx(
2778
+ "p",
2779
+ {
2780
+ tabIndex: 0,
2781
+ className: "max-h-32 overflow-auto whitespace-pre-wrap break-words text-sm text-destructive-text [overflow-wrap:anywhere]",
2782
+ role: "alert",
2783
+ children: event.payload.error
2784
+ }
2785
+ ) : null
2767
2786
  ] })
2768
2787
  ]
2769
2788
  }
@@ -2783,7 +2802,7 @@ function ActivityDetails({
2783
2802
  "details",
2784
2803
  {
2785
2804
  className: cn2(
2786
- "group rounded-lg border border-border bg-card text-card-foreground",
2805
+ "group min-w-0 overflow-hidden rounded-lg border border-border bg-card text-card-foreground",
2787
2806
  className
2788
2807
  ),
2789
2808
  open,
@@ -2812,7 +2831,7 @@ function ActivityDetails({
2812
2831
  "div",
2813
2832
  {
2814
2833
  className: cn2(
2815
- "border-t border-border px-3 py-3 text-sm",
2834
+ "min-w-0 border-t border-border px-3 py-3 text-sm",
2816
2835
  contentClassName
2817
2836
  ),
2818
2837
  children
@@ -2907,7 +2926,14 @@ function AgentWorkbenchActivity({
2907
2926
  className: classNames?.item,
2908
2927
  triggerClassName: classNames?.trigger,
2909
2928
  contentClassName: classNames?.content,
2910
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap text-muted-foreground", children: event.payload.text })
2929
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2930
+ "div",
2931
+ {
2932
+ tabIndex: 0,
2933
+ className: "max-h-64 overflow-auto whitespace-pre-wrap break-words text-muted-foreground [overflow-wrap:anywhere]",
2934
+ children: event.payload.text
2935
+ }
2936
+ )
2911
2937
  },
2912
2938
  event.payload.reasoningId
2913
2939
  )),
@@ -2921,9 +2947,9 @@ function AgentWorkbenchActivity({
2921
2947
  className: classNames?.item,
2922
2948
  triggerClassName: classNames?.trigger,
2923
2949
  contentClassName: classNames?.content,
2924
- children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "space-y-2", children: event.payload.steps.map((step) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-2", children: [
2950
+ children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "space-y-2", children: event.payload.steps.map((step) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex min-w-0 items-start gap-2", children: [
2925
2951
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { status: step.status }),
2926
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: step.title })
2952
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 break-words [overflow-wrap:anywhere]", children: step.title })
2927
2953
  ] }, step.id)) })
2928
2954
  },
2929
2955
  event.payload.planId
@@ -2940,7 +2966,7 @@ function AgentWorkbenchActivity({
2940
2966
  contentClassName: classNames?.content,
2941
2967
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
2942
2968
  /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { status: event.payload.status }),
2943
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "whitespace-pre-wrap text-muted-foreground", children: event.payload.detail || messages.taskNoDetail })
2969
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 whitespace-pre-wrap break-words text-muted-foreground [overflow-wrap:anywhere]", children: event.payload.detail || messages.taskNoDetail })
2944
2970
  ] })
2945
2971
  },
2946
2972
  event.payload.taskId
@@ -3600,14 +3626,18 @@ var AgentWorkbenchMessage = React5.forwardRef(
3600
3626
  );
3601
3627
  }
3602
3628
  );
3603
- var AgentWorkbenchMessageContent = React5.forwardRef(function AgentWorkbenchMessageContent2({ children, className, ...contentProps }, ref) {
3629
+ var AgentWorkbenchMessageContent = React5.forwardRef(function AgentWorkbenchMessageContent2({ children, className, tabIndex = 0, ...contentProps }, ref) {
3604
3630
  return /* @__PURE__ */ jsxRuntime.jsx(
3605
3631
  "div",
3606
3632
  {
3607
3633
  ...contentProps,
3608
3634
  ref,
3635
+ tabIndex,
3609
3636
  className: cn2(
3610
- "flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden break-words text-sm [overflow-wrap:anywhere]",
3637
+ "flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-x-auto overflow-y-hidden break-words text-sm [overflow-wrap:anywhere]",
3638
+ "[&_a]:max-w-full [&_a]:break-all [&_code]:max-w-full [&_code]:break-words",
3639
+ "[&_pre]:w-max [&_pre]:min-w-full [&_pre]:whitespace-pre [&_pre_code]:break-normal",
3640
+ "[&_table]:w-max [&_table]:min-w-full [&_table]:whitespace-nowrap",
3611
3641
  "group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground",
3612
3642
  "group-[.is-assistant]:text-foreground",
3613
3643
  className
@@ -4114,19 +4144,27 @@ var ARTIFACT_ICONS = {
4114
4144
  web: lucideReact.Globe2
4115
4145
  };
4116
4146
  function ArtifactThumbnail({ artifact }) {
4117
- if (artifact.thumbnailUrl) {
4147
+ const [thumbnailFailed, setThumbnailFailed] = React5.useState(false);
4148
+ if (artifact.status === "loading") {
4149
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-7 shrink-0 animate-pulse rounded bg-muted", "aria-hidden": "true" });
4150
+ }
4151
+ if (artifact.status === "error") {
4152
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-7 shrink-0 items-center justify-center rounded bg-destructive/10 text-destructive-text", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { className: "size-4", "aria-hidden": "true" }) });
4153
+ }
4154
+ if (artifact.thumbnailUrl && !thumbnailFailed) {
4118
4155
  return /* @__PURE__ */ jsxRuntime.jsx(
4119
4156
  "img",
4120
4157
  {
4121
4158
  src: artifact.thumbnailUrl,
4122
4159
  alt: "",
4123
4160
  loading: "lazy",
4124
- className: "size-7 rounded object-cover"
4161
+ className: "size-7 shrink-0 rounded object-cover",
4162
+ onError: () => setThumbnailFailed(true)
4125
4163
  }
4126
4164
  );
4127
4165
  }
4128
4166
  const Icon2 = ARTIFACT_ICONS[artifact.kind];
4129
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-7 items-center justify-center rounded bg-muted text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4", "aria-hidden": "true" }) });
4167
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-7 shrink-0 items-center justify-center rounded bg-muted text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4", "aria-hidden": "true" }) });
4130
4168
  }
4131
4169
  function ArtifactGroup({
4132
4170
  title,
@@ -4330,6 +4368,30 @@ function AgentWorkbenchArtifactWorkspace({
4330
4368
  if (!over || active.id === over.id) return;
4331
4369
  onIntent?.({ type: "reorder", artifactId: String(active.id), overArtifactId: String(over.id) });
4332
4370
  };
4371
+ const artifactContent = activeArtifact.status === "loading" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-full min-h-48 items-center justify-center p-6 text-center", role: "status", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col items-center gap-3 text-sm text-muted-foreground", children: [
4372
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-5 animate-spin", "aria-hidden": "true" }),
4373
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: messages.loading })
4374
+ ] }) }) : activeArtifact.status === "error" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-full min-h-48 items-center justify-center p-6 text-center", role: "alert", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 max-w-sm flex-col items-center gap-3", children: [
4375
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 items-center justify-center rounded-full bg-destructive/10 text-destructive-text", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { className: "size-5", "aria-hidden": "true" }) }),
4376
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
4377
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "break-words text-sm font-medium text-foreground [overflow-wrap:anywhere]", children: messages.failed }),
4378
+ activeArtifact.description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 max-h-24 overflow-auto whitespace-pre-wrap break-words text-sm text-muted-foreground [overflow-wrap:anywhere]", children: activeArtifact.description }) : null
4379
+ ] }),
4380
+ onIntent ? /* @__PURE__ */ jsxRuntime.jsxs(
4381
+ Button,
4382
+ {
4383
+ type: "button",
4384
+ variant: "outline",
4385
+ size: "sm",
4386
+ className: "gap-2",
4387
+ onClick: () => onIntent({ type: "retry", artifactId: activeArtifact.id }),
4388
+ children: [
4389
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "size-4", "aria-hidden": "true" }),
4390
+ messages.retry
4391
+ ]
4392
+ }
4393
+ ) : null
4394
+ ] }) }) : renderArtifact(activeArtifact);
4333
4395
  return /* @__PURE__ */ jsxRuntime.jsxs(
4334
4396
  TabsPrimitive__namespace.Root,
4335
4397
  {
@@ -4401,7 +4463,7 @@ function AgentWorkbenchArtifactWorkspace({
4401
4463
  {
4402
4464
  value: artifact.id,
4403
4465
  className: "size-full min-h-0 min-w-0 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
4404
- children: artifact.id === activeArtifact.id ? renderArtifact(artifact) : null
4466
+ children: artifact.id === activeArtifact.id ? artifactContent : null
4405
4467
  },
4406
4468
  artifact.id
4407
4469
  )) })