File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -437,15 +437,20 @@ setup_agent_comfy() {
437
437
438
438
# Get user selections
439
439
SELECTED_OPTIONS=()
440
- while IFS= read -r option; do
441
- SELECTED_OPTIONS+=(" $option " )
442
- done < <( gum choose --no-limit --height 13 --cursor.foreground=" #FFA500" " ${MENU_OPTIONS[@]} " )
440
+ SELECTIONS=$( gum choose --no-limit --height 12 --cursor.foreground=" #FFA500" " ${MENU_OPTIONS[@]} " )
441
+ if [ -n " $SELECTIONS " ]; then
442
+ # Use mapfile to read selections into array, handling both single and multiple selections
443
+ mapfile -t SELECTED_OPTIONS <<< " $SELECTIONS"
444
+ fi
445
+
446
+ # Debugging: Print selected options
447
+ # echo "Selected options: ${SELECTED_OPTIONS[*]}"
443
448
444
449
# Exit if no selection
445
- if [ ${# SELECTED_OPTIONS[@]} -eq 0 ] || [ -z " ${SELECTED_OPTIONS[0]} " ] ; then
446
- echo " No functionality selected. Exiting setup ."
447
- exit 1
448
- fi # Changed from single-line syntax for clarity
450
+ if [ ${# SELECTED_OPTIONS[@]} -eq 0 ]; then
451
+ echo " No models selected. Exiting."
452
+ exit 0
453
+ fi
449
454
450
455
# Process selections for DEFAULT_MODELS
451
456
SELECTED_MODEL_IDS=" "
You can’t perform that action at this time.
0 commit comments