ekms 9.5.1-beta.5 → 9.5.1-beta.7
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/animals.instance.json +21 -61
- package/common/asking.js +102 -100
- package/common/can.instance.json +17 -0
- package/common/can.js +188 -0
- package/common/characters.js +3 -3
- package/common/colors.instance.json +38 -10
- package/common/comparable.instance.json +2 -2
- package/common/concept.test.json +54 -40
- package/common/conjunction.js +13 -5
- package/common/crew.instance.json +26 -26
- package/common/crew.js +1 -1
- package/common/currency.js +1 -1
- package/common/dates.instance.json +87 -3
- package/common/dialogues.js +11 -8
- package/common/dimension.instance.json +1 -1
- package/common/edible.instance.json +79 -95
- package/common/emotions.instance.json +6 -10
- package/common/emotions.js +1 -1
- package/common/english_helpers.js +277 -67
- package/common/fastfood.instance.json +235 -807
- package/common/fastfood.js +4 -4
- package/common/formulas.instance.json +1 -1
- package/common/gdefaults.js +41 -9
- package/common/help.js +2 -2
- package/common/helpers/concept.js +1 -1
- package/common/helpers/conjunction.js +54 -44
- package/common/helpers/dateTimeSelectors.js +2 -2
- package/common/helpers/dialogues.js +1 -1
- package/common/helpers/formulas.js +13 -11
- package/common/helpers/menus.js +12 -12
- package/common/helpers/meta.js +8 -8
- package/common/helpers/properties.js +76 -15
- package/common/helpers.js +82 -46
- package/common/hierarchy.js +3 -3
- package/common/kirk.instance.json +1 -1
- package/common/length.instance.json +2 -2
- package/common/math.instance.json +20 -20
- package/common/math.js +45 -44
- package/common/menus.instance.json +3 -3
- package/common/menus.js +1 -1
- package/common/meta.js +49 -33
- package/common/ordering.instance.json +16 -28
- package/common/ordering.js +1 -1
- package/common/ordering.test.json +354 -296
- package/common/people.instance.json +36 -47
- package/common/people.js +1 -1
- package/common/people.test.json +952 -681
- package/common/pipboy.instance.json +72 -16
- package/common/pokemon.instance.json +8 -8
- package/common/pokemon.js +1 -1
- package/common/pressure.instance.json +2 -2
- package/common/properties.instance.json +1 -1
- package/common/properties.js +16 -3
- package/common/reminders.js +1 -1
- package/common/reports.instance.json +3 -3
- package/common/reports.js +18 -16
- package/common/scorekeeper.js +4 -4
- package/common/sdefaults.js +22 -2
- package/common/spock.instance.json +1 -1
- package/common/stgame.js +1 -1
- package/common/stm.js +2 -2
- package/common/tell.js +1 -1
- package/common/temperature.instance.json +2 -2
- package/common/tester.js +3 -3
- package/common/time.js +3 -3
- package/common/tokenize.js +1 -1
- package/common/weight.instance.json +2 -2
- package/common/wp.instance.json +62 -6
- package/common/wp.js +4 -4
- package/package.json +4 -2
package/common/conjunction.js
CHANGED
|
@@ -44,19 +44,26 @@ const config = {
|
|
|
44
44
|
{
|
|
45
45
|
where: where(),
|
|
46
46
|
notes: 'handle lists with yes no',
|
|
47
|
-
// ({context, hierarchy}) => context.marker == 'list' && context.paraphrase && context.value,
|
|
48
|
-
// ({context, hierarchy}) => context.marker == 'list' && context.value,
|
|
49
47
|
match: ({context, hierarchy}) => context.marker == 'list' && context.paraphrase && context.value && context.value.length > 0 && context.value[0].marker == 'yesno',
|
|
50
48
|
apply: async ({context, g, gs}) => {
|
|
51
49
|
return `${await g(context.value[0])} ${await gs(context.value.slice(1), ', ', ' and ')}`
|
|
52
50
|
}
|
|
53
51
|
},
|
|
54
52
|
|
|
53
|
+
/*
|
|
54
|
+
{
|
|
55
|
+
where: where(),
|
|
56
|
+
notes: 'handle lists with truthValue set',
|
|
57
|
+
match: ({context, hierarchy}) => context.marker == 'list' && context.hasOwnProperty('truthValue'),
|
|
58
|
+
apply: async ({context, g, gs}) => {
|
|
59
|
+
return context.truthValue ? 'yes' : 'no'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
*/
|
|
63
|
+
|
|
55
64
|
{
|
|
56
65
|
where: where(),
|
|
57
66
|
notes: 'handle lists',
|
|
58
|
-
// ({context, hierarchy}) => context.marker == 'list' && context.paraphrase && context.value,
|
|
59
|
-
// ({context, hierarchy}) => context.marker == 'list' && context.value,
|
|
60
67
|
match: ({context, hierarchy}) => context.marker == 'list' && context.value,
|
|
61
68
|
apply: async ({context, gs}) => {
|
|
62
69
|
if (context.newLinesOnly) {
|
|
@@ -69,7 +76,7 @@ const config = {
|
|
|
69
76
|
],
|
|
70
77
|
};
|
|
71
78
|
|
|
72
|
-
|
|
79
|
+
function initializer({objects, config, isModule}) {
|
|
73
80
|
config.addArgs(({config, api, hierarchy}) => {
|
|
74
81
|
const isAI = isA(hierarchy);
|
|
75
82
|
|
|
@@ -82,6 +89,7 @@ const initializer = ({objects, config, isModule}) => {
|
|
|
82
89
|
}
|
|
83
90
|
},
|
|
84
91
|
asList,
|
|
92
|
+
toList: asList,
|
|
85
93
|
toArray: propertyToArray,
|
|
86
94
|
listable: listable(hierarchy),
|
|
87
95
|
isA: isAI,
|
|
@@ -2400,7 +2400,7 @@
|
|
|
2400
2400
|
"word": "name",
|
|
2401
2401
|
"range": {
|
|
2402
2402
|
"start": 0,
|
|
2403
|
-
"end":
|
|
2403
|
+
"end": 10
|
|
2404
2404
|
},
|
|
2405
2405
|
"dead": true,
|
|
2406
2406
|
"types": [
|
|
@@ -4157,7 +4157,7 @@
|
|
|
4157
4157
|
"word": "rank",
|
|
4158
4158
|
"range": {
|
|
4159
4159
|
"start": 0,
|
|
4160
|
-
"end":
|
|
4160
|
+
"end": 10
|
|
4161
4161
|
},
|
|
4162
4162
|
"dead": true,
|
|
4163
4163
|
"types": [
|
|
@@ -5953,7 +5953,7 @@
|
|
|
5953
5953
|
"word": "eyes",
|
|
5954
5954
|
"range": {
|
|
5955
5955
|
"start": 0,
|
|
5956
|
-
"end":
|
|
5956
|
+
"end": 10
|
|
5957
5957
|
},
|
|
5958
5958
|
"dead": true,
|
|
5959
5959
|
"types": [
|
|
@@ -7737,7 +7737,7 @@
|
|
|
7737
7737
|
"word": "kirk",
|
|
7738
7738
|
"range": {
|
|
7739
7739
|
"start": 0,
|
|
7740
|
-
"end":
|
|
7740
|
+
"end": 3
|
|
7741
7741
|
},
|
|
7742
7742
|
"dead": true,
|
|
7743
7743
|
"types": [
|
|
@@ -9400,7 +9400,7 @@
|
|
|
9400
9400
|
"word": "kirk",
|
|
9401
9401
|
"range": {
|
|
9402
9402
|
"start": 0,
|
|
9403
|
-
"end":
|
|
9403
|
+
"end": 3
|
|
9404
9404
|
},
|
|
9405
9405
|
"dead": true,
|
|
9406
9406
|
"types": [
|
|
@@ -11157,7 +11157,7 @@
|
|
|
11157
11157
|
"word": "rank",
|
|
11158
11158
|
"range": {
|
|
11159
11159
|
"start": 0,
|
|
11160
|
-
"end":
|
|
11160
|
+
"end": 11
|
|
11161
11161
|
},
|
|
11162
11162
|
"dead": true,
|
|
11163
11163
|
"types": [
|
|
@@ -13072,7 +13072,7 @@
|
|
|
13072
13072
|
"word": "name",
|
|
13073
13073
|
"range": {
|
|
13074
13074
|
"start": 0,
|
|
13075
|
-
"end":
|
|
13075
|
+
"end": 11
|
|
13076
13076
|
},
|
|
13077
13077
|
"dead": true,
|
|
13078
13078
|
"types": [
|
|
@@ -14992,7 +14992,7 @@
|
|
|
14992
14992
|
"word": "eyes",
|
|
14993
14993
|
"range": {
|
|
14994
14994
|
"start": 0,
|
|
14995
|
-
"end":
|
|
14995
|
+
"end": 11
|
|
14996
14996
|
},
|
|
14997
14997
|
"dead": true,
|
|
14998
14998
|
"types": [
|
|
@@ -16870,7 +16870,7 @@
|
|
|
16870
16870
|
"word": "spock",
|
|
16871
16871
|
"range": {
|
|
16872
16872
|
"start": 0,
|
|
16873
|
-
"end":
|
|
16873
|
+
"end": 4
|
|
16874
16874
|
},
|
|
16875
16875
|
"dead": true,
|
|
16876
16876
|
"types": [
|
|
@@ -18618,7 +18618,7 @@
|
|
|
18618
18618
|
"word": "spock",
|
|
18619
18619
|
"range": {
|
|
18620
18620
|
"start": 0,
|
|
18621
|
-
"end":
|
|
18621
|
+
"end": 4
|
|
18622
18622
|
},
|
|
18623
18623
|
"dead": true,
|
|
18624
18624
|
"types": [
|
|
@@ -20460,7 +20460,7 @@
|
|
|
20460
20460
|
"word": "rank",
|
|
20461
20461
|
"range": {
|
|
20462
20462
|
"start": 0,
|
|
20463
|
-
"end":
|
|
20463
|
+
"end": 11
|
|
20464
20464
|
},
|
|
20465
20465
|
"dead": true,
|
|
20466
20466
|
"types": [
|
|
@@ -22469,7 +22469,7 @@
|
|
|
22469
22469
|
"word": "name",
|
|
22470
22470
|
"range": {
|
|
22471
22471
|
"start": 0,
|
|
22472
|
-
"end":
|
|
22472
|
+
"end": 11
|
|
22473
22473
|
},
|
|
22474
22474
|
"dead": true,
|
|
22475
22475
|
"types": [
|
|
@@ -24479,7 +24479,7 @@
|
|
|
24479
24479
|
"word": "eyes",
|
|
24480
24480
|
"range": {
|
|
24481
24481
|
"start": 0,
|
|
24482
|
-
"end":
|
|
24482
|
+
"end": 11
|
|
24483
24483
|
},
|
|
24484
24484
|
"dead": true,
|
|
24485
24485
|
"types": [
|
|
@@ -26463,7 +26463,7 @@
|
|
|
26463
26463
|
"word": "mccoy",
|
|
26464
26464
|
"range": {
|
|
26465
26465
|
"start": 0,
|
|
26466
|
-
"end":
|
|
26466
|
+
"end": 4
|
|
26467
26467
|
},
|
|
26468
26468
|
"dead": true,
|
|
26469
26469
|
"types": [
|
|
@@ -28309,7 +28309,7 @@
|
|
|
28309
28309
|
"word": "mccoy",
|
|
28310
28310
|
"range": {
|
|
28311
28311
|
"start": 0,
|
|
28312
|
-
"end":
|
|
28312
|
+
"end": 4
|
|
28313
28313
|
},
|
|
28314
28314
|
"dead": true,
|
|
28315
28315
|
"types": [
|
|
@@ -30217,7 +30217,7 @@
|
|
|
30217
30217
|
"word": "status",
|
|
30218
30218
|
"range": {
|
|
30219
30219
|
"start": 0,
|
|
30220
|
-
"end":
|
|
30220
|
+
"end": 24
|
|
30221
30221
|
},
|
|
30222
30222
|
"dead": true,
|
|
30223
30223
|
"types": [
|
|
@@ -34476,7 +34476,7 @@
|
|
|
34476
34476
|
"word": "status",
|
|
34477
34477
|
"range": {
|
|
34478
34478
|
"start": 0,
|
|
34479
|
-
"end":
|
|
34479
|
+
"end": 33
|
|
34480
34480
|
},
|
|
34481
34481
|
"dead": true,
|
|
34482
34482
|
"types": [
|
|
@@ -36986,7 +36986,7 @@
|
|
|
36986
36986
|
"word": "phasers",
|
|
36987
36987
|
"range": {
|
|
36988
36988
|
"start": 0,
|
|
36989
|
-
"end":
|
|
36989
|
+
"end": 6
|
|
36990
36990
|
},
|
|
36991
36991
|
"dead": true,
|
|
36992
36992
|
"types": [
|
|
@@ -38867,7 +38867,7 @@
|
|
|
38867
38867
|
"word": "torpedoes",
|
|
38868
38868
|
"range": {
|
|
38869
38869
|
"start": 0,
|
|
38870
|
-
"end":
|
|
38870
|
+
"end": 8
|
|
38871
38871
|
},
|
|
38872
38872
|
"dead": true,
|
|
38873
38873
|
"types": [
|
|
@@ -40742,7 +40742,7 @@
|
|
|
40742
40742
|
"word": "kirk",
|
|
40743
40743
|
"range": {
|
|
40744
40744
|
"start": 0,
|
|
40745
|
-
"end":
|
|
40745
|
+
"end": 3
|
|
40746
40746
|
},
|
|
40747
40747
|
"dead": true,
|
|
40748
40748
|
"types": [
|
|
@@ -42572,7 +42572,7 @@
|
|
|
42572
42572
|
"word": "spock",
|
|
42573
42573
|
"range": {
|
|
42574
42574
|
"start": 0,
|
|
42575
|
-
"end":
|
|
42575
|
+
"end": 4
|
|
42576
42576
|
},
|
|
42577
42577
|
"dead": true,
|
|
42578
42578
|
"types": [
|
|
@@ -44402,7 +44402,7 @@
|
|
|
44402
44402
|
"word": "mccoy",
|
|
44403
44403
|
"range": {
|
|
44404
44404
|
"start": 0,
|
|
44405
|
-
"end":
|
|
44405
|
+
"end": 4
|
|
44406
44406
|
},
|
|
44407
44407
|
"dead": true,
|
|
44408
44408
|
"types": [
|
|
@@ -46615,7 +46615,7 @@
|
|
|
46615
46615
|
"word": "arm",
|
|
46616
46616
|
"range": {
|
|
46617
46617
|
"start": 0,
|
|
46618
|
-
"end":
|
|
46618
|
+
"end": 2
|
|
46619
46619
|
},
|
|
46620
46620
|
"evaluateWord": true,
|
|
46621
46621
|
"imperative": true,
|
|
@@ -46655,7 +46655,7 @@
|
|
|
46655
46655
|
"word": "status",
|
|
46656
46656
|
"range": {
|
|
46657
46657
|
"start": 21,
|
|
46658
|
-
"end":
|
|
46658
|
+
"end": 44
|
|
46659
46659
|
},
|
|
46660
46660
|
"dead": true,
|
|
46661
46661
|
"types": [
|
|
@@ -50129,7 +50129,7 @@
|
|
|
50129
50129
|
"word": "disarm",
|
|
50130
50130
|
"range": {
|
|
50131
50131
|
"start": 0,
|
|
50132
|
-
"end":
|
|
50132
|
+
"end": 5
|
|
50133
50133
|
},
|
|
50134
50134
|
"evaluateWord": true,
|
|
50135
50135
|
"imperative": true,
|
|
@@ -50169,7 +50169,7 @@
|
|
|
50169
50169
|
"word": "status",
|
|
50170
50170
|
"range": {
|
|
50171
50171
|
"start": 24,
|
|
50172
|
-
"end":
|
|
50172
|
+
"end": 47
|
|
50173
50173
|
},
|
|
50174
50174
|
"dead": true,
|
|
50175
50175
|
"types": [
|
package/common/crew.js
CHANGED
|
@@ -37,7 +37,7 @@ const template = {
|
|
|
37
37
|
],
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
function initializer({config, apis}) {
|
|
41
41
|
const api = apis('properties')
|
|
42
42
|
const conceptApi = apis('concept')
|
|
43
43
|
// conceptApi.kindOfConcept({ config, modifiers: ['photon'], object: 'torpedo' })
|
package/common/currency.js
CHANGED
|
@@ -89,7 +89,7 @@ const config = {
|
|
|
89
89
|
],
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
function initializer({config, objects, apis, addWord, addGenerator, baseConfig, uuid}) {
|
|
93
93
|
const api = apis('currency')
|
|
94
94
|
units = api.getUnits()
|
|
95
95
|
for (word in units) {
|
|
@@ -2972,7 +2972,7 @@
|
|
|
2972
2972
|
"text": "january, february, march, april, may, june, july, august, september, october, november and december",
|
|
2973
2973
|
"range": {
|
|
2974
2974
|
"start": 0,
|
|
2975
|
-
"end":
|
|
2975
|
+
"end": 98
|
|
2976
2976
|
},
|
|
2977
2977
|
"types": [
|
|
2978
2978
|
"list",
|
|
@@ -3401,6 +3401,20 @@
|
|
|
3401
3401
|
0
|
|
3402
3402
|
]
|
|
3403
3403
|
],
|
|
3404
|
+
[
|
|
3405
|
+
[
|
|
3406
|
+
"is",
|
|
3407
|
+
0
|
|
3408
|
+
],
|
|
3409
|
+
[
|
|
3410
|
+
"list",
|
|
3411
|
+
1
|
|
3412
|
+
],
|
|
3413
|
+
[
|
|
3414
|
+
"unknown",
|
|
3415
|
+
0
|
|
3416
|
+
]
|
|
3417
|
+
],
|
|
3404
3418
|
[
|
|
3405
3419
|
[
|
|
3406
3420
|
"is",
|
|
@@ -11477,7 +11491,7 @@
|
|
|
11477
11491
|
"text": "monday, tuesday, wednesday, thursday, friday, saturday and sunday",
|
|
11478
11492
|
"range": {
|
|
11479
11493
|
"start": 0,
|
|
11480
|
-
"end":
|
|
11494
|
+
"end": 64
|
|
11481
11495
|
},
|
|
11482
11496
|
"types": [
|
|
11483
11497
|
"list",
|
|
@@ -11751,6 +11765,20 @@
|
|
|
11751
11765
|
0
|
|
11752
11766
|
]
|
|
11753
11767
|
],
|
|
11768
|
+
[
|
|
11769
|
+
[
|
|
11770
|
+
"is",
|
|
11771
|
+
0
|
|
11772
|
+
],
|
|
11773
|
+
[
|
|
11774
|
+
"list",
|
|
11775
|
+
1
|
|
11776
|
+
],
|
|
11777
|
+
[
|
|
11778
|
+
"unknown",
|
|
11779
|
+
0
|
|
11780
|
+
]
|
|
11781
|
+
],
|
|
11754
11782
|
[
|
|
11755
11783
|
[
|
|
11756
11784
|
"is",
|
|
@@ -15659,7 +15687,7 @@
|
|
|
15659
15687
|
"text": "ac, bc, bce and ad",
|
|
15660
15688
|
"range": {
|
|
15661
15689
|
"start": 0,
|
|
15662
|
-
"end":
|
|
15690
|
+
"end": 17
|
|
15663
15691
|
},
|
|
15664
15692
|
"types": [
|
|
15665
15693
|
"list",
|
|
@@ -15840,6 +15868,20 @@
|
|
|
15840
15868
|
0
|
|
15841
15869
|
]
|
|
15842
15870
|
],
|
|
15871
|
+
[
|
|
15872
|
+
[
|
|
15873
|
+
"is",
|
|
15874
|
+
0
|
|
15875
|
+
],
|
|
15876
|
+
[
|
|
15877
|
+
"list",
|
|
15878
|
+
1
|
|
15879
|
+
],
|
|
15880
|
+
[
|
|
15881
|
+
"unknown",
|
|
15882
|
+
0
|
|
15883
|
+
]
|
|
15884
|
+
],
|
|
15843
15885
|
[
|
|
15844
15886
|
[
|
|
15845
15887
|
"is",
|
|
@@ -18801,6 +18843,48 @@
|
|
|
18801
18843
|
0
|
|
18802
18844
|
]
|
|
18803
18845
|
],
|
|
18846
|
+
[
|
|
18847
|
+
[
|
|
18848
|
+
"is",
|
|
18849
|
+
0
|
|
18850
|
+
],
|
|
18851
|
+
[
|
|
18852
|
+
"list",
|
|
18853
|
+
1
|
|
18854
|
+
],
|
|
18855
|
+
[
|
|
18856
|
+
"unknown",
|
|
18857
|
+
0
|
|
18858
|
+
]
|
|
18859
|
+
],
|
|
18860
|
+
[
|
|
18861
|
+
[
|
|
18862
|
+
"is",
|
|
18863
|
+
0
|
|
18864
|
+
],
|
|
18865
|
+
[
|
|
18866
|
+
"list",
|
|
18867
|
+
1
|
|
18868
|
+
],
|
|
18869
|
+
[
|
|
18870
|
+
"unknown",
|
|
18871
|
+
0
|
|
18872
|
+
]
|
|
18873
|
+
],
|
|
18874
|
+
[
|
|
18875
|
+
[
|
|
18876
|
+
"is",
|
|
18877
|
+
0
|
|
18878
|
+
],
|
|
18879
|
+
[
|
|
18880
|
+
"list",
|
|
18881
|
+
1
|
|
18882
|
+
],
|
|
18883
|
+
[
|
|
18884
|
+
"unknown",
|
|
18885
|
+
0
|
|
18886
|
+
]
|
|
18887
|
+
],
|
|
18804
18888
|
[
|
|
18805
18889
|
[
|
|
18806
18890
|
"setIdSuffix",
|
package/common/dialogues.js
CHANGED
|
@@ -18,7 +18,7 @@ const pluralize = require('pluralize')
|
|
|
18
18
|
|
|
19
19
|
const api = new API()
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
function warningIsANotImplemented(log, context) {
|
|
22
22
|
const description = 'WARNING from Dialogues KM: For semantics in order to handle sentences of type "x is y?", set the response to what you like.'
|
|
23
23
|
const match = `({context, hierarchy}) => hierarchy.isA(context.marker, 'is') && context.query && <other conditions as you like>`
|
|
24
24
|
const apply = `({context}) => <do stuff...>; context.evalue = <value>`
|
|
@@ -27,7 +27,7 @@ const warningIsANotImplemented = (log, context) => {
|
|
|
27
27
|
log(indent(message, 4))
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
function warningSameNotEvaluated(log, one) {
|
|
31
31
|
const description = 'WARNING from Dialogues KM: For the "X is Y" type phrase implement a same handler.'
|
|
32
32
|
const match = `({context}) => context.marker == '${one.marker}' && context.same && <other conditions as you like>`
|
|
33
33
|
const apply = '({context}) => <do stuff... context.same is the other value>; context.sameWasProcessed = true'
|
|
@@ -36,7 +36,7 @@ const warningSameNotEvaluated = (log, one) => {
|
|
|
36
36
|
log(indent(message, 4))
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
function listorama(type) {
|
|
40
40
|
return [
|
|
41
41
|
{ context: [[type, 0], ['list', 0], [type, 0]], choose: 0 },
|
|
42
42
|
{ context: [[type, 1], ['list', 0], [type, 0]], choose: 0 },
|
|
@@ -245,6 +245,7 @@ const config = {
|
|
|
245
245
|
{ id: "canBeDoQuestion", level: 2, bridge: "{ ...next(operator) }" },
|
|
246
246
|
{ id: "doesAble", level: 0, bridge: "{ ...next(operator) }" },
|
|
247
247
|
{ id: "doesAble", level: 1, bridge: "{ ...next(operator), before: before[0] }" },
|
|
248
|
+
// { id: "does", level: 0, bridge: "{ query: true, wantsTruthValue: true, what: operator.marker, ...context, number: operator.number, object.number: operator.number }*" },
|
|
248
249
|
{ id: "does", level: 0, bridge: "{ query: true, what: operator.marker, ...context, number: operator.number, object.number: operator.number }*" },
|
|
249
250
|
|
|
250
251
|
/*
|
|
@@ -369,11 +370,13 @@ const config = {
|
|
|
369
370
|
{
|
|
370
371
|
where: where(),
|
|
371
372
|
notes: "handle making responses brief",
|
|
372
|
-
match: ({context, objects}) => (context.topLevel || context.isResponse) && objects.brief && !context.briefWasRun,
|
|
373
|
+
match: ({context, objects, callId}) => (context.topLevel || context.isResponse) && objects.brief && !context.briefWasRun,
|
|
373
374
|
apply: async ({context, g}) => {
|
|
374
375
|
const focussed = focus(context)
|
|
375
376
|
context.briefWasRun = true
|
|
376
|
-
|
|
377
|
+
const result = await g(focussed)
|
|
378
|
+
context.briefWasRun = false
|
|
379
|
+
return result
|
|
377
380
|
},
|
|
378
381
|
priority: -2,
|
|
379
382
|
},
|
|
@@ -393,7 +396,7 @@ const config = {
|
|
|
393
396
|
where: where(),
|
|
394
397
|
notes: "be brief or wordy",
|
|
395
398
|
match: ({context}) => context.marker == 'be',
|
|
396
|
-
apply: ({context}) => `be ${context.type
|
|
399
|
+
apply: ({context}) => `be ${context.type?.word}`,
|
|
397
400
|
},
|
|
398
401
|
/*
|
|
399
402
|
{
|
|
@@ -528,7 +531,7 @@ const config = {
|
|
|
528
531
|
return `${await gp(context.one)} ${isMany(context.one) || isMany(context.two) || isMany(context) ? "are" : "is"} ${await g(context.two)}`
|
|
529
532
|
}
|
|
530
533
|
|
|
531
|
-
|
|
534
|
+
function hasFocus(property) {
|
|
532
535
|
if (context.focusableForPhrase) {
|
|
533
536
|
return true
|
|
534
537
|
}
|
|
@@ -788,7 +791,7 @@ const config = {
|
|
|
788
791
|
],
|
|
789
792
|
};
|
|
790
793
|
|
|
791
|
-
|
|
794
|
+
function initializer({objects, config, isModule}) {
|
|
792
795
|
/* TODO add this beck in. some stuff from config needs to be here
|
|
793
796
|
config.addArgs((args) => ({
|
|
794
797
|
e: (context) => config.api.getEvaluator(args.s, args.log, context),
|