ekms 9.6.1-beta.3 → 9.6.1-beta.5

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.
@@ -92,7 +92,7 @@
92
92
  "verb"
93
93
  ],
94
94
  "bridge": "{ ...next(operator), quantity: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'quantity' }] }",
95
- "semantic": "async ({context, e, api, toArray, resolveResponse}) => {\n const preferredUnits = api.getPreferredUnits(context.quantity)\n if (!preferredUnits) {\n return\n }\n const from = context.quantity;\n const value = await e({ marker: 'convertToUnits', from, to: preferredUnits })\n resolveResponse(context, value.evalue)\n }"
95
+ "semantic": "async ({context, e, api, toArray, resolveResponse}) => {\n const preferredUnits = await api.getPreferredUnits(context.quantity)\n if (!preferredUnits) {\n return\n }\n const from = context.quantity;\n const value = await e({ marker: 'convertToUnits', from, to: preferredUnits })\n resolveResponse(context, value.evalue)\n }"
96
96
  },
97
97
  {
98
98
  "where": "/home/dev/code/theprogrammablemind/kms/common/dimension.js:214",
@@ -37,8 +37,8 @@ class API {
37
37
  this._objects = objects
38
38
  }
39
39
 
40
- getPreferredUnits(quantity) {
41
- const preferredUnits = this.args.mentions({
40
+ async getPreferredUnits(quantity) {
41
+ const preferredUnits = await this.args.mentions({
42
42
  context: { marker: 'unit' },
43
43
  condition: (unit) => {
44
44
  if (quantity.unit.marker == 'unitPerUnit') {
@@ -201,7 +201,7 @@ const config = {
201
201
  isA: ['verb'],
202
202
  bridge: "{ ...next(operator), quantity: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'quantity' }] }",
203
203
  semantic: async ({context, e, api, toArray, resolveResponse}) => {
204
- const preferredUnits = api.getPreferredUnits(context.quantity)
204
+ const preferredUnits = await api.getPreferredUnits(context.quantity)
205
205
  if (!preferredUnits) {
206
206
  return
207
207
  }