theprogrammablemind 9.0.3 → 9.1.1-beta.1
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/package.json +1 -1
- package/src/config.js +18 -1
- package/src/configHelpers.js +3 -0
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -1131,7 +1131,9 @@ class Config {
|
|
1131
1131
|
}
|
1132
1132
|
const instanceFragments = (instance.fragments || []).map((fragment) => fragment.key || fragment.query).map(toCanonical)
|
1133
1133
|
const templateFragments = (template.fragments || []).concat(this.dynamicFragments).map(toCanonical)
|
1134
|
-
const
|
1134
|
+
const hasStop = template.configs && template.configs.find((config) => config.stop)
|
1135
|
+
// stop means fragments are not build so dont for a rebuild on the diff
|
1136
|
+
const sameFragments = hasStop || helpers.safeEquals(templateFragments, instanceFragments)
|
1135
1137
|
const toCanonicalQuery = (queryOrConfig) => {
|
1136
1138
|
if (typeof queryOrConfig === 'string') {
|
1137
1139
|
const query = queryOrConfig
|
@@ -1837,6 +1839,17 @@ class Config {
|
|
1837
1839
|
}
|
1838
1840
|
}
|
1839
1841
|
|
1842
|
+
get kms () {
|
1843
|
+
const kms = {}
|
1844
|
+
kms[this.name] = this
|
1845
|
+
for (const config of this.configs) {
|
1846
|
+
if (config.config instanceof Config) {
|
1847
|
+
kms[config.config.name] = config.config
|
1848
|
+
}
|
1849
|
+
}
|
1850
|
+
return kms
|
1851
|
+
}
|
1852
|
+
|
1840
1853
|
removeDevelopmentElements (config) {
|
1841
1854
|
if (!config) {
|
1842
1855
|
return
|
@@ -2067,6 +2080,10 @@ class Config {
|
|
2067
2080
|
}
|
2068
2081
|
}
|
2069
2082
|
|
2083
|
+
set api (api) {
|
2084
|
+
this._api = api
|
2085
|
+
}
|
2086
|
+
|
2070
2087
|
async addAPI (api) {
|
2071
2088
|
// console.trace()
|
2072
2089
|
// throw "addAPI"
|
package/src/configHelpers.js
CHANGED
@@ -395,6 +395,8 @@ const loadInstance = async (config, instance) => {
|
|
395
395
|
const transitoryMode = global.transitoryMode
|
396
396
|
global.transitoryMode = false
|
397
397
|
|
398
|
+
/*
|
399
|
+
TODO needs updating if still wanted
|
398
400
|
if (instance && (instance.associations || instance.learned_contextual_priorities)) {
|
399
401
|
if (!config.config.retrain) {
|
400
402
|
if (instance.associations) {
|
@@ -405,6 +407,7 @@ const loadInstance = async (config, instance) => {
|
|
405
407
|
}
|
406
408
|
}
|
407
409
|
}
|
410
|
+
*/
|
408
411
|
|
409
412
|
// const { /* data, generators, semantics, */ hierarchy } = setupProcessB({ config })
|
410
413
|
const hierarchy = config.hierarchy
|