@@ -10,8 +10,6 @@ const { CustomHandler } = require('../installers/lib/custom/handler');
1010 * UI utilities for the installer
1111 */
1212class UI {
13- constructor ( ) { }
14-
1513 /**
1614 * Prompt for installation configuration
1715 * @returns {Object } Installation configuration
@@ -161,14 +159,8 @@ class UI {
161159 }
162160 }
163161
164- // Always ask for custom content, but we'll handle it differently for new installs
165162 let customContentConfig = { hasCustomContent : false } ;
166- if ( hasExistingInstall ) {
167- // Existing installation - prompt to add/update custom content
168- customContentConfig = await this . promptCustomContentForExisting ( ) ;
169- } else {
170- // New installation - we'll prompt after creating the directory structure
171- // For now, set a flag to indicate we should ask later
163+ if ( ! hasExistingInstall ) {
172164 customContentConfig . _shouldAsk = true ;
173165 }
174166
@@ -1140,146 +1132,6 @@ class UI {
11401132 return existingInstall . ides || [ ] ;
11411133 }
11421134
1143- /**
1144- * Prompt for custom content for existing installations
1145- * @returns {Object } Custom content configuration
1146- */
1147- async promptCustomContentForExisting ( ) {
1148- try {
1149- // Skip custom content installation - always return false
1150- return { hasCustomContent : false } ;
1151-
1152- // TODO: Custom content installation temporarily disabled
1153- // CLIUtils.displaySection('Custom Content', 'Add new custom agents, workflows, or modules to your installation');
1154-
1155- // const { hasCustomContent } = await inquirer.prompt([
1156- // {
1157- // type: 'list',
1158- // name: 'hasCustomContent',
1159- // message: 'Do you want to add or update custom content?',
1160- // choices: [
1161- // {
1162- // name: 'No, continue with current installation only',
1163- // value: false,
1164- // },
1165- // {
1166- // name: 'Yes, I have custom content to add or update',
1167- // value: true,
1168- // },
1169- // ],
1170- // default: false,
1171- // },
1172- // ]);
1173-
1174- // if (!hasCustomContent) {
1175- // return { hasCustomContent: false };
1176- // }
1177-
1178- // TODO: Custom content installation temporarily disabled
1179- // // Get directory path
1180- // const { customPath } = await inquirer.prompt([
1181- // {
1182- // type: 'input',
1183- // name: 'customPath',
1184- // message: 'Enter directory to search for custom content (will scan subfolders):',
1185- // default: process.cwd(),
1186- // validate: async (input) => {
1187- // if (!input || input.trim() === '') {
1188- // return 'Please enter a directory path';
1189- // }
1190-
1191- // // Normalize and check if path exists
1192- // const expandedPath = CLIUtils.expandPath(input.trim());
1193- // const pathExists = await fs.pathExists(expandedPath);
1194- // if (!pathExists) {
1195- // return 'Directory does not exist';
1196- // }
1197-
1198- // // Check if it's actually a directory
1199- // const stats = await fs.stat(expandedPath);
1200- // if (!stats.isDirectory()) {
1201- // return 'Path must be a directory';
1202- // }
1203-
1204- // return true;
1205- // },
1206- // transformer: (input) => {
1207- // return CLIUtils.expandPath(input);
1208- // },
1209- // },
1210- // ]);
1211-
1212- // const resolvedPath = CLIUtils.expandPath(customPath);
1213-
1214- // // Find custom content
1215- // const customHandler = new CustomHandler();
1216- // const customFiles = await customHandler.findCustomContent(resolvedPath);
1217-
1218- // if (customFiles.length === 0) {
1219- // console.log(chalk.yellow(`\nNo custom content found in ${resolvedPath}`));
1220-
1221- // const { tryDifferent } = await inquirer.prompt([
1222- // {
1223- // type: 'confirm',
1224- // name: 'tryDifferent',
1225- // message: 'Try a different directory?',
1226- // default: true,
1227- // },
1228- // ]);
1229-
1230- // if (tryDifferent) {
1231- // return await this.promptCustomContentForExisting();
1232- // }
1233-
1234- // return { hasCustomContent: false };
1235- // }
1236-
1237- // // Display found items
1238- // console.log(chalk.cyan(`\nFound ${customFiles.length} custom content file(s):`));
1239- // const customContentItems = [];
1240-
1241- // for (const customFile of customFiles) {
1242- // const customInfo = await customHandler.getCustomInfo(customFile);
1243- // if (customInfo) {
1244- // customContentItems.push({
1245- // name: `${chalk.cyan('✓')} ${customInfo.name} ${chalk.gray(`(${customInfo.relativePath})`)}`,
1246- // value: `__CUSTOM_CONTENT__${customFile}`,
1247- // checked: true,
1248- // });
1249- // }
1250- // }
1251-
1252- // // Add option to keep existing custom content
1253- // console.log(chalk.yellow('\nExisting custom modules will be preserved unless you remove them'));
1254-
1255- // const { selectedFiles } = await inquirer.prompt([
1256- // {
1257- // type: 'checkbox',
1258- // name: 'selectedFiles',
1259- // message: 'Select custom content to add:',
1260- // choices: customContentItems,
1261- // pageSize: 15,
1262- // validate: (answer) => {
1263- // if (answer.length === 0) {
1264- // return 'You must select at least one item';
1265- // }
1266- // return true;
1267- // },
1268- // },
1269- // ]);
1270-
1271- // return {
1272- // hasCustomContent: true,
1273- // customPath: resolvedPath,
1274- // selected: true,
1275- // selectedFiles: selectedFiles,
1276- // };
1277- } catch ( error ) {
1278- console . error ( chalk . red ( 'Error configuring custom content:' ) , error ) ;
1279- return { hasCustomContent : false } ;
1280- }
1281- }
1282-
12831135 /**
12841136 * Prompt user for custom content source location
12851137 * @returns {Object } Custom content configuration
0 commit comments