@promptbook/wizard 0.112.0-24 → 0.112.0-26

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
@@ -38,7 +38,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
38
38
  * @generated
39
39
  * @see https://github.com/webgptorg/promptbook
40
40
  */
41
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-24';
41
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-26';
42
42
  /**
43
43
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
44
44
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -19203,10 +19203,10 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
19203
19203
  if (!trimmedContent) {
19204
19204
  return requirements;
19205
19205
  }
19206
- // Create goal section for system message
19206
+ // Add goal to the system message
19207
19207
  const goalSection = `Goal: ${trimmedContent}`;
19208
- // Goals are important directives, so we add them prominently to the system message
19209
- return this.appendToSystemMessage(requirements, goalSection, '\n\n');
19208
+ const requirementsWithGoal = this.appendToSystemMessage(requirements, goalSection, '\n\n');
19209
+ return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
19210
19210
  }
19211
19211
  }
19212
19212
  /**
@@ -22016,15 +22016,7 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
22016
22016
  // Add rule to the system message
22017
22017
  const ruleSection = `Rule: ${trimmedContent}`;
22018
22018
  const requirementsWithRule = this.appendToSystemMessage(requirements, ruleSection, '\n\n');
22019
- const ruleLines = trimmedContent
22020
- .split(/\r?\n/)
22021
- .map((line) => line.trim())
22022
- .filter(Boolean)
22023
- .map((line) => `- ${line}`);
22024
- if (ruleLines.length === 0) {
22025
- return requirementsWithRule;
22026
- }
22027
- return this.appendToPromptSuffix(requirementsWithRule, ruleLines.join('\n'));
22019
+ return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
22028
22020
  }
22029
22021
  }
22030
22022
  /**