@indra.ai/deva.feecting 0.14.0 → 0.14.2
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/_parse.js +14 -6
- package/help/corpus.feecting +3 -3
- package/package.json +1 -1
package/_parse.js
CHANGED
|
@@ -216,12 +216,20 @@ class Parser {
|
|
|
216
216
|
if (!current[item]) return false;
|
|
217
217
|
current = current[item];
|
|
218
218
|
});
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
219
|
+
try {
|
|
220
|
+
current = current.replace(/\{\{(client|agent|profile|prompt|vars)\.(.+?)\}\}/g, (match, scope, token) => {
|
|
221
|
+
return processVars(token, lookup[scope]);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
|
|
226
|
+
console.log('TOKEN\n', token);
|
|
227
|
+
console.log('CURRENT\n', current);
|
|
228
|
+
console.log('ERROR\n', err);
|
|
229
|
+
}
|
|
230
|
+
finally {
|
|
231
|
+
return current;
|
|
232
|
+
}
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
this.text = this.text.replace(/\{\{id\}\}/g, id)
|
package/help/corpus.feecting
CHANGED