* Detects new tool directories that aren't currently configured and displays a hint.
(projectPath: string, configuredTools: string[])
| 336 | * Detects new tool directories that aren't currently configured and displays a hint. |
| 337 | */ |
| 338 | private detectNewTools(projectPath: string, configuredTools: string[]): void { |
| 339 | const availableTools = getAvailableTools(projectPath); |
| 340 | const configuredSet = new Set(configuredTools); |
| 341 | |
| 342 | const newTools = availableTools.filter((t) => !configuredSet.has(t.value)); |
| 343 | |
| 344 | if (newTools.length > 0) { |
| 345 | const newToolNames = newTools.map((tool) => tool.name); |
| 346 | const isSingleTool = newToolNames.length === 1; |
| 347 | const toolNoun = isSingleTool ? 'tool' : 'tools'; |
| 348 | const pronoun = isSingleTool ? 'it' : 'them'; |
| 349 | console.log(); |
| 350 | console.log( |
| 351 | chalk.yellow( |
| 352 | `Detected new ${toolNoun}: ${newToolNames.join(', ')}. Run 'openspec init' to add ${pronoun}.` |
| 353 | ) |
| 354 | ); |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * Displays a note about extra workflows installed that aren't in the current profile. |
no test coverage detected