@eko-ai/eko 1.0.12 → 1.0.13

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.
@@ -1422,7 +1422,10 @@ class OpenUrl {
1422
1422
  }
1423
1423
  let url = params.url;
1424
1424
  let newWindow = params.newWindow;
1425
- if (!newWindow && !context.variables.get('windowId') && !context.variables.get('tabId')) {
1425
+ if (context.ekoConfig.workingWindowId) {
1426
+ newWindow = false;
1427
+ }
1428
+ else if (!newWindow && !context.variables.get('windowId') && !context.variables.get('tabId')) {
1426
1429
  // First mandatory opening of a new window
1427
1430
  newWindow = true;
1428
1431
  }
@@ -1432,7 +1435,7 @@ class OpenUrl {
1432
1435
  (_c = (_b = (_a = context.callback) === null || _a === undefined ? undefined : _a.hooks) === null || _b === undefined ? undefined : _b.onTabCreated) === null || _c === undefined ? undefined : _c.call(_b, tab.id);
1433
1436
  }
1434
1437
  else {
1435
- let windowId = await getWindowId(context);
1438
+ let windowId = context.ekoConfig.workingWindowId ? context.ekoConfig.workingWindowId : await getWindowId(context);
1436
1439
  tab = await open_new_tab(url, false, windowId);
1437
1440
  (_f = (_e = (_d = context.callback) === null || _d === undefined ? undefined : _d.hooks) === null || _e === undefined ? undefined : _e.onTabCreated) === null || _f === undefined ? undefined : _f.call(_e, tab.id);
1438
1441
  }
@@ -1420,7 +1420,10 @@ class OpenUrl {
1420
1420
  }
1421
1421
  let url = params.url;
1422
1422
  let newWindow = params.newWindow;
1423
- if (!newWindow && !context.variables.get('windowId') && !context.variables.get('tabId')) {
1423
+ if (context.ekoConfig.workingWindowId) {
1424
+ newWindow = false;
1425
+ }
1426
+ else if (!newWindow && !context.variables.get('windowId') && !context.variables.get('tabId')) {
1424
1427
  // First mandatory opening of a new window
1425
1428
  newWindow = true;
1426
1429
  }
@@ -1430,7 +1433,7 @@ class OpenUrl {
1430
1433
  (_c = (_b = (_a = context.callback) === null || _a === undefined ? undefined : _a.hooks) === null || _b === undefined ? undefined : _b.onTabCreated) === null || _c === undefined ? undefined : _c.call(_b, tab.id);
1431
1434
  }
1432
1435
  else {
1433
- let windowId = await getWindowId(context);
1436
+ let windowId = context.ekoConfig.workingWindowId ? context.ekoConfig.workingWindowId : await getWindowId(context);
1434
1437
  tab = await open_new_tab(url, false, windowId);
1435
1438
  (_f = (_e = (_d = context.callback) === null || _d === undefined ? undefined : _d.hooks) === null || _e === undefined ? undefined : _e.onTabCreated) === null || _f === undefined ? undefined : _f.call(_e, tab.id);
1436
1439
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eko-ai/eko",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Empowering language to transform human words into action.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",