MCPcopy
hub / github.com/garrytan/gstack / extractPreambleBeforeWorkflow

Function extractPreambleBeforeWorkflow

test/gen-skill-docs.test.ts:74–80  ·  view source on GitHub ↗
(content: string, workflowMarkers: string[])

Source from the content-addressed store, hash-verified

72}
73
74function extractPreambleBeforeWorkflow(content: string, workflowMarkers: string[]): string {
75 const markerIndexes = workflowMarkers
76 .map(marker => content.indexOf(marker))
77 .filter(index => index >= 0);
78 expect(markerIndexes.length).toBeGreaterThan(0);
79 return content.slice(0, Math.min(...markerIndexes));
80}
81
82function isRepoRootSymlink(candidateDir: string): boolean {
83 try {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected