@promptbook/node 0.86.5 โ†’ 0.86.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.86.5",
3
+ "version": "0.86.8",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -47,7 +47,7 @@
47
47
  "module": "./esm/index.es.js",
48
48
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
49
49
  "peerDependencies": {
50
- "@promptbook/core": "0.86.5"
50
+ "@promptbook/core": "0.86.8"
51
51
  },
52
52
  "dependencies": {
53
53
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -45,7 +45,7 @@
45
45
  * @generated
46
46
  * @see https://github.com/webgptorg/promptbook
47
47
  */
48
- var PROMPTBOOK_ENGINE_VERSION = '0.86.5';
48
+ var PROMPTBOOK_ENGINE_VERSION = '0.86.8';
49
49
  /**
50
50
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
51
51
  * Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
@@ -5924,7 +5924,9 @@
5924
5924
  return __generator(this, function (_a) {
5925
5925
  dependentParameterNames = task.dependentParameterNames;
5926
5926
  preparedContent = undefined;
5927
- if (knowledgePiecesCount > 0 && !dependentParameterNames.includes('knowledge')) {
5927
+ if (task.taskType === 'PROMPT_TASK' &&
5928
+ knowledgePiecesCount > 0 &&
5929
+ !dependentParameterNames.includes('knowledge')) {
5928
5930
  preparedContent = spaceTrim.spaceTrim("\n {content}\n\n ## Knowledge\n\n {knowledge}\n ");
5929
5931
  // <- TODO: [๐Ÿง ][๐Ÿงป] Cutomize shape/language/formatting of the addition to the prompt
5930
5932
  dependentParameterNames = __spreadArray(__spreadArray([], __read(dependentParameterNames), false), [
@@ -11515,9 +11517,11 @@
11515
11517
  FileCacheStorage.prototype.getFilenameForKey = function (key) {
11516
11518
  // TODO: [๐Ÿ‘ฌ] DRY
11517
11519
  var name = titleToName(key);
11520
+ var nameStart = name.split('-', 2)[0] || 'unnamed';
11518
11521
  var hash = sha256__default["default"](hexEncoder__default["default"].parse(name)).toString( /* hex */);
11519
11522
  // <- TODO: [๐Ÿฅฌ] Encapsulate sha256 to some private utility function
11520
- return path.join.apply(void 0, __spreadArray(__spreadArray([this.options.rootFolderPath], __read(nameToSubfolderPath(hash /* <- TODO: [๐ŸŽŽ] Maybe add some SHA256 prefix */)), false), ["".concat(name.substring(0, MAX_FILENAME_LENGTH), ".json")], false));
11523
+ return path.join.apply(void 0, __spreadArray(__spreadArray([this.options.rootFolderPath,
11524
+ nameStart], __read(nameToSubfolderPath(hash /* <- TODO: [๐ŸŽŽ] Maybe add some SHA256 prefix */)), false), ["".concat(name.substring(0, MAX_FILENAME_LENGTH), ".json")], false));
11521
11525
  };
11522
11526
  /**
11523
11527
  * @@@ Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.