@opentabs-dev/opentabs-plugin-minimax-agent 0.0.82 → 0.0.84

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.
@@ -230,10 +230,26 @@
230
230
  ot.log = log;
231
231
 
232
232
  // node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
233
+ var withIframeFallback = (fn) => {
234
+ try {
235
+ const iframe = document.createElement("iframe");
236
+ iframe.style.display = "none";
237
+ document.body.appendChild(iframe);
238
+ try {
239
+ const iframeStorage = iframe.contentWindow?.localStorage;
240
+ return iframeStorage ? fn(iframeStorage) : null;
241
+ } finally {
242
+ document.body.removeChild(iframe);
243
+ }
244
+ } catch {
245
+ return null;
246
+ }
247
+ };
248
+ var getWindowLocalStorage = () => window.localStorage;
233
249
  var getLocalStorage = (key) => {
234
250
  let storage;
235
251
  try {
236
- storage = window.localStorage;
252
+ storage = getWindowLocalStorage();
237
253
  } catch {
238
254
  return null;
239
255
  }
@@ -244,19 +260,7 @@
244
260
  return null;
245
261
  }
246
262
  }
247
- try {
248
- const iframe = document.createElement("iframe");
249
- iframe.style.display = "none";
250
- document.body.appendChild(iframe);
251
- try {
252
- const iframeStorage = iframe.contentWindow?.localStorage;
253
- return iframeStorage ? iframeStorage.getItem(key) : null;
254
- } finally {
255
- document.body.removeChild(iframe);
256
- }
257
- } catch {
258
- return null;
259
- }
263
+ return withIframeFallback((s) => s.getItem(key));
260
264
  };
261
265
  var getAuthCache = (namespace) => {
262
266
  try {
@@ -15210,7 +15214,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15210
15214
  };
15211
15215
  var src_default = new MinimaxAgentPlugin();
15212
15216
 
15213
- // dist/_adapter_entry_3fb57562-db7b-4945-bfbd-6266031b7901.ts
15217
+ // dist/_adapter_entry_2e438e22-a071-4672-a2b5-2ff58af62c3c.ts
15214
15218
  if (!globalThis.__openTabs) {
15215
15219
  globalThis.__openTabs = {};
15216
15220
  } else {
@@ -15426,5 +15430,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15426
15430
  };
15427
15431
  delete src_default.onDeactivate;
15428
15432
  }
15429
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["minimax-agent"]){var a=o.adapters["minimax-agent"];a.__adapterHash="054bbc104b6115c640a1fc2c6c8257ef563a55d0423708d1e65a5f72255687a0";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"minimax-agent",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15433
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["minimax-agent"]){var a=o.adapters["minimax-agent"];a.__adapterHash="8ee787501afba0f7f4949639dcce96cca2b5968cc999df03624b15caf3a9eb14";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"minimax-agent",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15430
15434
  //# sourceMappingURL=adapter.iife.js.map