()
| 61 | </context>`; |
| 62 | |
| 63 | async function getConfigYamlRules(): Promise<string[]> { |
| 64 | const configState = await serviceContainer.get<ConfigServiceState>( |
| 65 | SERVICE_NAMES.CONFIG, |
| 66 | ); |
| 67 | if (configState.config?.rules) { |
| 68 | // Extract systemMessage from the config if it exists |
| 69 | const rules = configState.config.rules; |
| 70 | return rules |
| 71 | .map((rule) => { |
| 72 | return typeof rule === "string" ? rule : rule?.rule; |
| 73 | }) |
| 74 | .filter((rule): rule is string => !!rule); |
| 75 | } |
| 76 | |
| 77 | return []; |
| 78 | } |
| 79 | |
| 80 | function getRuleNameFromPath(filePath: string): string { |
| 81 | const segments = filePath.split(/[/\\]/); |
no outgoing calls
no test coverage detected