@llmnative/react 1.19.3 → 1.19.4

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
@@ -5264,13 +5264,13 @@ var go = class {
5264
5264
  resolvePath(e) {
5265
5265
  let t = e.startsWith("/") ? e : `/${e}`;
5266
5266
  if (this.store[t]) return { collection: t };
5267
- let n = Object.keys(this.store).filter((e) => t.startsWith(`${e}/`)).sort((e, t) => t.length - e.length)[0];
5267
+ let n = Object.keys(this.store).filter((e) => t.startsWith(`${e}/`) && !t.slice(e.length + 1).includes("/")).sort((e, t) => t.length - e.length)[0];
5268
5268
  if (n) return {
5269
5269
  collection: n,
5270
5270
  id: t.slice(n.length + 1)
5271
5271
  };
5272
5272
  let r = t.replace(/^\/+/, "").split("/").filter(Boolean);
5273
- return r.length <= 1 ? { collection: t } : {
5273
+ return r.length % 2 == 1 ? { collection: `/${r.join("/")}` } : {
5274
5274
  collection: `/${r.slice(0, -1).join("/")}`,
5275
5275
  id: r[r.length - 1]
5276
5276
  };