@promptbook/components 0.104.0-8 → 0.104.0-9

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/esm/index.es.js CHANGED
@@ -35,7 +35,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
35
35
  * @generated
36
36
  * @see https://github.com/webgptorg/promptbook
37
37
  */
38
- const PROMPTBOOK_ENGINE_VERSION = '0.104.0-8';
38
+ const PROMPTBOOK_ENGINE_VERSION = '0.104.0-9';
39
39
  /**
40
40
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
41
41
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -15329,7 +15329,12 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
15329
15329
  };
15330
15330
  }
15331
15331
  // Apply each commitment in order using reduce-like pattern
15332
- for (const commitment of filteredCommitments) {
15332
+ for (let i = 0; i < filteredCommitments.length; i++) {
15333
+ const commitment = filteredCommitments[i];
15334
+ // CLOSED commitment should work only if its the last commitment in the book
15335
+ if (commitment.type === 'CLOSED' && i !== filteredCommitments.length - 1) {
15336
+ continue;
15337
+ }
15333
15338
  const definition = getCommitmentDefinition(commitment.type);
15334
15339
  if (definition) {
15335
15340
  try {