MCPcopy Index your code
hub / github.com/continuedev/continue / getRuleNameFromPath

Function getRuleNameFromPath

extensions/cli/src/systemMessage.ts:80–84  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

78}
79
80function getRuleNameFromPath(filePath: string): string {
81 const segments = filePath.split(/[/\\]/);
82 const lastTwoParts = segments.slice(-2);
83 return lastTwoParts.filter(Boolean).join("/").replace(/\.md$/, "");
84}
85
86/**
87 * Scan .continue/rules/ directories for markdown rule files and return the rules with metadata that should be always-applied

Callers 1

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected