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.
- package/common/dimension.instance.json +1 -1
- package/common/dimension.js +3 -3
- package/common/drone.instance.json +395 -136
- package/common/drone.js +66 -21
- package/common/drone.test.json +77284 -12
- package/common/drone_v1.instance.json +3 -3
- package/common/drone_v1.js +14 -14
- package/common/fastfood.instance.json +72 -300
- package/common/helpers/conjunction.js +9 -5
- package/common/length.instance.json +0 -80
- package/common/nameable.js +0 -11
- package/common/ordinals.js +13 -0
- package/common/properties.js +1 -0
- package/common/reports.instance.json +2 -2
- package/common/stm.js +60 -19
- package/package.json +2 -2
|
@@ -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",
|
package/common/dimension.js
CHANGED
|
@@ -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
|
}
|