readPromptSegment
readPromptSegment(
segment,config):string
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/llmUtils.ts:60
GS2-43 — the single composition point for one prompt segment, honouring the segment’s
prompts.<segment> config:
- no setting → the segment’s default-named file (PROMPT_SEGMENT_FILES), falling back
to the bundled default unless
noDefaultPrompts— exactly the pre-GS2-43 behaviour; - a
string→ shorthand for{ path }; enabled: false→ the segment is dropped entirely (returns''), even its bundled default;path+mode: 'replace'(default) → the file replaces the built-in segment content;path+mode: 'append'→ the file content is appended after the built-in content.
Parameters
Section titled “Parameters”segment
Section titled “segment”config
Section titled “config”PromptReadConfig
Returns
Section titled “Returns”string