(completed: number, total: number, width: number = 20)
| 205 | } |
| 206 | |
| 207 | private createProgressBar(completed: number, total: number, width: number = 20): string { |
| 208 | if (total === 0) return chalk.dim('─'.repeat(width)); |
| 209 | |
| 210 | const percentage = completed / total; |
| 211 | const filled = Math.round(percentage * width); |
| 212 | const empty = width - filled; |
| 213 | |
| 214 | const filledBar = chalk.green('█'.repeat(filled)); |
| 215 | const emptyBar = chalk.dim('░'.repeat(empty)); |
| 216 | |
| 217 | return `[${filledBar}${emptyBar}]`; |
| 218 | } |
| 219 | } |