(
projectPath: string,
tools: Array<{ value: string; name: string; skillsDir: string; wasConfigured: boolean }>,
results: {
createdTools: typeof tools;
refreshedTools: typeof tools;
failedTools: Array<{ name: string; error: Error }>;
commandsSkipped: string[];
removedCommandCount: number;
removedSkillCount: number;
},
configStatus: 'created' | 'exists' | 'skipped'
)
| 649 | // ═══════════════════════════════════════════════════════════ |
| 650 | |
| 651 | private displaySuccessMessage( |
| 652 | projectPath: string, |
| 653 | tools: Array<{ value: string; name: string; skillsDir: string; wasConfigured: boolean }>, |
| 654 | results: { |
| 655 | createdTools: typeof tools; |
| 656 | refreshedTools: typeof tools; |
| 657 | failedTools: Array<{ name: string; error: Error }>; |
| 658 | commandsSkipped: string[]; |
| 659 | removedCommandCount: number; |
| 660 | removedSkillCount: number; |
| 661 | }, |
| 662 | configStatus: 'created' | 'exists' | 'skipped' |
| 663 | ): void { |
| 664 | console.log(); |
| 665 | console.log(chalk.bold('OpenSpec Setup Complete')); |
| 666 | console.log(); |
| 667 | |
| 668 | // Show created vs refreshed tools |
| 669 | if (results.createdTools.length > 0) { |
| 670 | console.log(`Created: ${results.createdTools.map((t) => t.name).join(', ')}`); |
| 671 | } |
| 672 | if (results.refreshedTools.length > 0) { |
| 673 | console.log(`Refreshed: ${results.refreshedTools.map((t) => t.name).join(', ')}`); |
| 674 | } |
| 675 | |
| 676 | // Show counts (respecting profile filter) |
| 677 | const successfulTools = [...results.createdTools, ...results.refreshedTools]; |
| 678 | if (successfulTools.length > 0) { |
| 679 | const globalConfig = getGlobalConfig(); |
| 680 | const profile: Profile = (this.profileOverride as Profile) ?? globalConfig.profile ?? 'core'; |
| 681 | const delivery: Delivery = globalConfig.delivery ?? 'both'; |
| 682 | const workflows = getProfileWorkflows(profile, globalConfig.workflows); |
| 683 | const toolDirs = [...new Set(successfulTools.map((t) => t.skillsDir))].join(', '); |
| 684 | const skillCount = delivery !== 'commands' ? getSkillTemplates(workflows).length : 0; |
| 685 | const commandCount = delivery !== 'skills' ? getCommandContents(workflows).length : 0; |
| 686 | if (skillCount > 0 && commandCount > 0) { |
| 687 | console.log(`${skillCount} skills and ${commandCount} commands in ${toolDirs}/`); |
| 688 | } else if (skillCount > 0) { |
| 689 | console.log(`${skillCount} skills in ${toolDirs}/`); |
| 690 | } else if (commandCount > 0) { |
| 691 | console.log(`${commandCount} commands in ${toolDirs}/`); |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | // Show failures |
| 696 | if (results.failedTools.length > 0) { |
| 697 | console.log(chalk.red(`Failed: ${results.failedTools.map((f) => `${f.name} (${f.error.message})`).join(', ')}`)); |
| 698 | } |
| 699 | |
| 700 | // Show skipped commands |
| 701 | if (results.commandsSkipped.length > 0) { |
| 702 | console.log(chalk.dim(`Commands skipped for: ${results.commandsSkipped.join(', ')} (no adapter)`)); |
| 703 | } |
| 704 | if (results.removedCommandCount > 0) { |
| 705 | console.log(chalk.dim(`Removed: ${results.removedCommandCount} command files (delivery: skills)`)); |
| 706 | } |
| 707 | if (results.removedSkillCount > 0) { |
| 708 | console.log(chalk.dim(`Removed: ${results.removedSkillCount} skill directories (delivery: commands)`)); |
no test coverage detected