@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.mjs CHANGED
@@ -18286,7 +18286,13 @@ var WorkspaceContextProvider = ({
18286
18286
  );
18287
18287
  const listPathByFolder = useCallback24(
18288
18288
  async (folder, assistantId) => {
18289
- const normalizedPath = folder.startsWith("/") || folder.startsWith("~/") ? folder : `/${folder}`;
18289
+ let normalizedPath = folder;
18290
+ if (normalizedPath.startsWith("~/")) {
18291
+ normalizedPath = `/${normalizedPath.slice(2)}`;
18292
+ }
18293
+ if (!normalizedPath.startsWith("/")) {
18294
+ normalizedPath = `/${normalizedPath}`;
18295
+ }
18290
18296
  return listPath(normalizedPath, assistantId);
18291
18297
  },
18292
18298
  [listPath]
@@ -18313,7 +18319,11 @@ var WorkspaceContextProvider = ({
18313
18319
  );
18314
18320
  const uploadFileToFolder = useCallback24(
18315
18321
  async (folder, file, assistantId) => {
18316
- return uploadFile(folder, file, assistantId);
18322
+ let normalizedFolder = folder;
18323
+ if (normalizedFolder.startsWith("~/")) {
18324
+ normalizedFolder = `/${normalizedFolder.slice(2)}`;
18325
+ }
18326
+ return uploadFile(normalizedFolder, file, assistantId);
18317
18327
  },
18318
18328
  [uploadFile]
18319
18329
  );