@axiom-lattice/react-sdk 2.1.65 → 2.1.66

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.js CHANGED
@@ -18155,7 +18155,13 @@ var WorkspaceContextProvider = ({
18155
18155
  );
18156
18156
  const listPathByFolder = (0, import_react56.useCallback)(
18157
18157
  async (folder, assistantId) => {
18158
- const normalizedPath = folder.startsWith("/") || folder.startsWith("~/") ? folder : `/${folder}`;
18158
+ let normalizedPath = folder;
18159
+ if (normalizedPath.startsWith("~/")) {
18160
+ normalizedPath = `/${normalizedPath.slice(2)}`;
18161
+ }
18162
+ if (!normalizedPath.startsWith("/")) {
18163
+ normalizedPath = `/${normalizedPath}`;
18164
+ }
18159
18165
  return listPath(normalizedPath, assistantId);
18160
18166
  },
18161
18167
  [listPath]
@@ -18182,7 +18188,11 @@ var WorkspaceContextProvider = ({
18182
18188
  );
18183
18189
  const uploadFileToFolder = (0, import_react56.useCallback)(
18184
18190
  async (folder, file, assistantId) => {
18185
- return uploadFile(folder, file, assistantId);
18191
+ let normalizedFolder = folder;
18192
+ if (normalizedFolder.startsWith("~/")) {
18193
+ normalizedFolder = `/${normalizedFolder.slice(2)}`;
18194
+ }
18195
+ return uploadFile(normalizedFolder, file, assistantId);
18186
18196
  },
18187
18197
  [uploadFile]
18188
18198
  );