addSubsection

View as MarkdownOpen in Claude

Add a subsection under a parent POM section. Creates the parent section if it does not exist.

Parameters

parentTitle
stringRequired

The heading of the parent section.

title
stringRequired

The subsection heading.

opts
object

Optional subsection content.

opts.body
string

Body text for the subsection.

opts.bullets
string[]

Bullet points for the subsection.

Returns

void

Example

1import { PromptManager } from '@signalwire/sdk';
2
3const pm = new PromptManager();
4pm.addSection('Policies', { body: 'Follow company policies at all times.' });
5pm.addSubsection('Policies', 'Returns', { body: 'Accept returns within 30 days.' });
6console.log(pm.getPrompt());