Phase 4: add appendSuffix — optional reinject message suffix.
Configurable trailing note after skill block per settings.suffix (SPEC §5.3). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,3 +18,12 @@ export function readSkillBody(filePath: string): string {
|
||||
export function formatBlock(meta: SkillBlockMeta, body: string): string {
|
||||
return `<skill name="${meta.name}" location="${meta.filePath}">\nReferences are relative to ${meta.baseDir}.\n\n${body}\n</skill>`;
|
||||
}
|
||||
|
||||
/** Append optional reinject suffix after skill block (SPEC §5.3). */
|
||||
export function appendSuffix(block: string, suffix: string | undefined): string {
|
||||
const trimmed = suffix?.trim();
|
||||
if (!trimmed) {
|
||||
return block;
|
||||
}
|
||||
return `${block}\n\n${trimmed}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user