@oh-my-pi/pi-utils 14.1.2 → 14.2.0

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/prompt.ts +12 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-utils",
4
- "version": "14.1.2",
4
+ "version": "14.2.0",
5
5
  "description": "Shared utilities for pi packages",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Boluk",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/bun": "^1.3",
41
- "@oh-my-pi/pi-natives": "14.1.2"
41
+ "@oh-my-pi/pi-natives": "14.2.0"
42
42
  },
43
43
  "engines": {
44
44
  "bun": ">=1.3.7"
package/src/prompt.ts CHANGED
@@ -382,6 +382,18 @@ handlebars.registerHelper("not", (value: unknown): boolean => !value);
382
382
 
383
383
  handlebars.registerHelper("jsonStringify", (value: unknown): string => JSON.stringify(value));
384
384
 
385
+ /**
386
+ * {{SECTION_SEPARATOR "Name"}}
387
+ * Renders a visible section header separator used by system-prompt templates.
388
+ */
389
+ export function sectionSeparator(name: string): string {
390
+ return `\n\n═══════════${name}═══════════\n`;
391
+ }
392
+ const sectionSeparatorHelper = (name: unknown): string => sectionSeparator(String(name));
393
+ handlebars.registerHelper("SECTION_SEPARATOR", sectionSeparatorHelper);
394
+ // Legacy misspelled alias retained for external templates copied from pre-rename versions.
395
+ handlebars.registerHelper("SECTION_SEPERATOR", sectionSeparatorHelper);
396
+
385
397
  export function registerHelper(name: string, fn: HelperDelegate): void {
386
398
  handlebars.registerHelper(name, fn);
387
399
  }