@arbidocs/react 0.4.126 → 0.4.128

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/index.cjs CHANGED
@@ -468,6 +468,10 @@ var isAbort = (e) => e instanceof DOMException && e.name === "AbortError";
468
468
  var TITLE_REFRESH_DELAYS_MS = [2500, 6e3, 12e3];
469
469
  function useArbiChat(options = {}) {
470
470
  const { workspaceId, agentId, model, titleLength = 48, streamRecovery } = options;
471
+ const activeArtifactRef = React.useRef(options.activeArtifact);
472
+ React.useEffect(() => {
473
+ activeArtifactRef.current = options.activeArtifact;
474
+ });
471
475
  const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
472
476
  const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
473
477
  const arbi = chunkXIDDXD5Y_cjs.useArbi();
@@ -685,6 +689,7 @@ function useArbiChat(options = {}) {
685
689
  title: t.title || titleFromQuestion(text, titleLength),
686
690
  messages: [...t.messages, userMessage, answer]
687
691
  }));
692
+ const activeArtifactExtId = activeArtifactRef.current?.() || void 0;
688
693
  const controller = new AbortController();
689
694
  abortRef.current = controller;
690
695
  runIdRef.current = null;
@@ -715,6 +720,7 @@ function useArbiChat(options = {}) {
715
720
  ...thread.conversationId ? { conversationId: thread.conversationId } : {},
716
721
  ...!thread.conversationId && thread.assistantMode === "mentioned" ? { assistantMode: "mentioned" } : {},
717
722
  ...mentions?.length ? { mentions } : {},
723
+ ...activeArtifactExtId ? { activeArtifactExtId } : {},
718
724
  model,
719
725
  signal: controller.signal,
720
726
  onStreamStart: (data) => {
@@ -4648,6 +4654,8 @@ function getNotificationTypeMeta(type) {
4648
4654
  return { Icon: lucideReact.Gauge, iconClassName: "text-orange-500", label: "Usage 90%" };
4649
4655
  case "quota_threshold_100":
4650
4656
  return { Icon: lucideReact.Gauge, iconClassName: "text-red-500", label: "Usage limit" };
4657
+ case "storage_quota_exceeded":
4658
+ return { Icon: lucideReact.HardDrive, iconClassName: "text-red-500", label: "Storage full" };
4651
4659
  case "activity":
4652
4660
  return { Icon: lucideReact.Activity, iconClassName: "text-muted-foreground", label: "Activity" };
4653
4661
  default: