@axiom-lattice/react-sdk 2.1.102 → 2.1.103

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.mjs CHANGED
@@ -4335,7 +4335,7 @@ import { Pin } from "lucide-react";
4335
4335
  // src/context/WorkspaceContext.tsx
4336
4336
  import React76, {
4337
4337
  createContext as createContext9,
4338
- useContext as useContext11,
4338
+ useContext as useContext12,
4339
4339
  useState as useState84,
4340
4340
  useCallback as useCallback44,
4341
4341
  useEffect as useEffect59,
@@ -14584,7 +14584,7 @@ var ConfirmFeedback = ({
14584
14584
  // src/components/GenUI/elements/clarify_feedback.tsx
14585
14585
  import { Button as Button21, Space as Space12, Typography as Typography17, List as List5, Checkbox as Checkbox5, Input as Input14, Upload } from "antd";
14586
14586
  import { InboxOutlined } from "@ant-design/icons";
14587
- import { useState as useState40 } from "react";
14587
+ import { useState as useState40, useContext as useContext8 } from "react";
14588
14588
  import { Fragment as Fragment9, jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
14589
14589
  var { Text: Text17 } = Typography17;
14590
14590
  var { Dragger } = Upload;
@@ -14595,6 +14595,10 @@ var ClarifyFeedback = ({
14595
14595
  const { questions } = data ?? {};
14596
14596
  const { sendMessage, assistantId, threadId, tenantId } = useAgentChat();
14597
14597
  const { config } = useLatticeChatShellContext();
14598
+ const workspaceContext = useContext8(WorkspaceContext);
14599
+ const workspaceId = workspaceContext?.workspaceId ?? null;
14600
+ const projectId = workspaceContext?.projectId ?? null;
14601
+ const uploadURL = config?.baseURL ? workspaceId && projectId ? `${config.baseURL}/api/workspaces/${workspaceId}/projects/${projectId}/uploadfile` : `${config.baseURL}/api/assistants/${assistantId}/threads/${threadId}/sandbox/uploadfile` : "";
14598
14602
  const [currentStep, setCurrentStep] = useState40(0);
14599
14603
  const [answers, setAnswers] = useState40({});
14600
14604
  const [submitted, setSubmitted] = useState40(false);
@@ -14618,7 +14622,6 @@ var ClarifyFeedback = ({
14618
14622
  }
14619
14623
  }));
14620
14624
  };
14621
- const uploadURL = config?.baseURL && assistantId && threadId ? `${config.baseURL}/api/assistants/${assistantId}/threads/${threadId}/sandbox/uploadfile` : "";
14622
14625
  const handleFileUpload = (info) => {
14623
14626
  if (info.file.status === "done") {
14624
14627
  const response = info.file.response;
@@ -14871,14 +14874,14 @@ import { useState as useState41 } from "react";
14871
14874
  import { DownloadOutlined, ExpandAltOutlined } from "@ant-design/icons";
14872
14875
 
14873
14876
  // src/components/Chat/SideAppBrowserContext.tsx
14874
- import { createContext as createContext8, useContext as useContext8 } from "react";
14877
+ import { createContext as createContext8, useContext as useContext9 } from "react";
14875
14878
  var SideAppBrowserContext = createContext8(null);
14876
14879
  var useSideAppBrowser = () => {
14877
- return useContext8(SideAppBrowserContext);
14880
+ return useContext9(SideAppBrowserContext);
14878
14881
  };
14879
14882
  var useSideAppOpener = () => {
14880
14883
  const { openSideApp } = useChatUIContext();
14881
- const browserCtx = useContext8(SideAppBrowserContext);
14884
+ const browserCtx = useContext9(SideAppBrowserContext);
14882
14885
  return browserCtx?.openApp ?? openSideApp;
14883
14886
  };
14884
14887
 
@@ -17885,7 +17888,7 @@ import {
17885
17888
  Space as Space32,
17886
17889
  Typography as Typography36
17887
17890
  } from "antd";
17888
- import React42, { useCallback as useCallback31, useContext as useContext10, useEffect as useEffect41, useRef as useRef20, useState as useState60 } from "react";
17891
+ import React42, { useCallback as useCallback31, useContext as useContext11, useEffect as useEffect41, useRef as useRef20, useState as useState60 } from "react";
17889
17892
  import { BrainCircuit as BrainCircuit3 } from "lucide-react";
17890
17893
 
17891
17894
  // src/components/GenUI/HITLContainer.tsx
@@ -18832,7 +18835,7 @@ var AgentHeader = ({
18832
18835
  };
18833
18836
 
18834
18837
  // src/components/Chat/ThreadManagementButtons.tsx
18835
- import { useCallback as useCallback29, useContext as useContext9 } from "react";
18838
+ import { useCallback as useCallback29, useContext as useContext10 } from "react";
18836
18839
  import { Tooltip as Tooltip14, Button as Button38, Dropdown as Dropdown2 } from "antd";
18837
18840
  import { HistoryOutlined, PlusOutlined as PlusOutlined8 } from "@ant-design/icons";
18838
18841
  import { Fragment as Fragment12, jsx as jsx69, jsxs as jsxs47 } from "react/jsx-runtime";
@@ -18922,8 +18925,8 @@ var ThreadListButton = () => {
18922
18925
  ) });
18923
18926
  };
18924
18927
  var ThreadManagementButtons = () => {
18925
- const shellContext = useContext9(LatticeChatShellContext);
18926
- const conversationContext = useContext9(ConversationContext);
18928
+ const shellContext = useContext10(LatticeChatShellContext);
18929
+ const conversationContext = useContext10(ConversationContext);
18927
18930
  if (!shellContext || !conversationContext) {
18928
18931
  return null;
18929
18932
  }
@@ -20580,7 +20583,7 @@ var Chating = ({
20580
20583
  const { baseURL } = config;
20581
20584
  const user = useAuthOptional()?.user;
20582
20585
  const displayUserName = user?.name || user?.email?.split("@")[0] || "there";
20583
- const workspaceContext = useContext10(WorkspaceContext);
20586
+ const workspaceContext = useContext11(WorkspaceContext);
20584
20587
  const listPath = workspaceContext?.listPath ?? (async () => []);
20585
20588
  const listPathByFolder = workspaceContext?.listPathByFolder ?? (async () => []);
20586
20589
  const workspaceId = workspaceContext?.workspaceId ?? null;
@@ -34790,7 +34793,7 @@ var WorkspaceResourceUIContext = ({
34790
34793
  import { jsx as jsx130 } from "react/jsx-runtime";
34791
34794
  var WorkspaceContext = createContext9(null);
34792
34795
  var useWorkspaceContext = () => {
34793
- const context = useContext11(WorkspaceContext);
34796
+ const context = useContext12(WorkspaceContext);
34794
34797
  if (!context) {
34795
34798
  throw new Error("useWorkspaceContext must be used within a WorkspaceContextProvider");
34796
34799
  }
@@ -36658,7 +36661,7 @@ var LatticeChat = (props) => {
36658
36661
  };
36659
36662
 
36660
36663
  // src/components/Chat/LatticeChatView.tsx
36661
- import { useContext as useContext12 } from "react";
36664
+ import { useContext as useContext13 } from "react";
36662
36665
 
36663
36666
  // src/components/Chat/ChatSidebar.tsx
36664
36667
  import { useState as useState89, useMemo as useMemo38, useCallback as useCallback50 } from "react";
@@ -37128,7 +37131,7 @@ var ChatSidebar = ({
37128
37131
  // src/components/Chat/LatticeChatView.tsx
37129
37132
  import { jsx as jsx138 } from "react/jsx-runtime";
37130
37133
  var LatticeChatView = (props) => {
37131
- const shellContext = useContext12(LatticeChatShellContext);
37134
+ const shellContext = useContext13(LatticeChatShellContext);
37132
37135
  const { showSideMenu, sideMenuItems } = shellContext.config;
37133
37136
  const { assistantId, thread } = useConversationContext();
37134
37137
  const { currentAssistant } = useAssistantContext();