πŸ“„ File detail

utils/systemPromptType.ts

🧩 .tsπŸ“ 15 linesπŸ’Ύ 382 bytesπŸ“ text
← Back to All Files

🎯 Use case

This file lives under β€œutils/”, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, …). On the API surface it exposes SystemPrompt and asSystemPrompt β€” mainly functions, hooks, or classes. What the file header says: Branded type for system prompt arrays. This module is intentionally dependency-free so it can be imported from anywhere without risking circular initialization issues.

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

Branded type for system prompt arrays. This module is intentionally dependency-free so it can be imported from anywhere without risking circular initialization issues.

πŸ“€ Exports (heuristic)

  • SystemPrompt
  • asSystemPrompt

πŸ–₯️ Source preview

/**
 * Branded type for system prompt arrays.
 *
 * This module is intentionally dependency-free so it can be imported
 * from anywhere without risking circular initialization issues.
 */

export type SystemPrompt = readonly string[] & {
  readonly __brand: 'SystemPrompt'
}

export function asSystemPrompt(value: readonly string[]): SystemPrompt {
  return value as SystemPrompt
}