|
4 | 4 | * For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0 |
5 | 5 | */ |
6 | 6 | import {Args, Flags, ux} from '@oclif/core'; |
7 | | -import {checkbox, confirm} from '@inquirer/prompts'; |
| 7 | +import {checkbox, confirm, input} from '@inquirer/prompts'; |
8 | 8 | import {BaseCommand, createTable, type ColumnDef} from '@salesforce/b2c-tooling-sdk/cli'; |
9 | 9 | import { |
10 | 10 | type IdeType, |
@@ -273,12 +273,17 @@ export default class SetupSkills extends BaseCommand<typeof SetupSkills> { |
273 | 273 | } |
274 | 274 | } |
275 | 275 |
|
| 276 | + // Prompt for manual installation directory |
| 277 | + let directory = this.flags.directory; |
| 278 | + if (targetIdes.includes('manual') && !directory && !this.flags.force) { |
| 279 | + directory = await input({ |
| 280 | + message: t('commands.setup.skills.manualDirectory', 'Installation directory:'), |
| 281 | + default: '.agents/skills', |
| 282 | + }); |
| 283 | + } |
| 284 | + |
276 | 285 | // Show installation preview |
277 | | - const scope = this.flags.directory |
278 | | - ? `directory: ${this.flags.directory}` |
279 | | - : this.flags.global |
280 | | - ? 'global (user home)' |
281 | | - : 'project'; |
| 286 | + const scope = directory ? `directory: ${directory}` : this.flags.global ? 'global (user home)' : 'project'; |
282 | 287 | ux.stdout(''); |
283 | 288 | ux.stdout( |
284 | 289 | t('commands.setup.skills.preview', 'Installing {{count}} skills to {{ides}} ({{scope}})', { |
@@ -310,7 +315,7 @@ export default class SetupSkills extends BaseCommand<typeof SetupSkills> { |
310 | 315 | global: this.flags.global, |
311 | 316 | update: this.flags.update, |
312 | 317 | projectRoot: process.cwd(), |
313 | | - directory: this.flags.directory, |
| 318 | + directory, |
314 | 319 | }); |
315 | 320 | }) |
316 | 321 | .filter((p): p is Promise<InstallSkillsResult> => p !== null); |
|
0 commit comments