File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ resetEnv() {
136
136
LLM_ENVS=()
137
137
}
138
138
139
+ # Configuration wizard
139
140
runConfigWizard () {
140
141
echo " Provide a key for each LLM provider you want to enable, then press Enter."
141
142
echo " If no key is provided and Enter is pressed, configuration for that provider will be skipped."
@@ -185,15 +186,14 @@ runConfigWizard() {
185
186
i+=1
186
187
echo " ${i} . ${mark}${providerName} "
187
188
done
188
- read -r -p " Please choose an LLM service provider to configure (1~$i , 0 to break): " selectedIndex
189
+ read -r -p " Please choose an LLM service provider to configure (1~$i , press Enter alone to break): " selectedIndex
189
190
190
191
case $selectedIndex in
191
- ' ' | * [!0-9]* ) ;;
192
+ ' ' ) break ;; # Breaks the loop if the input is an empty string
193
+ * [!0-9]* ) ;; # Handles invalid input where characters are non-numeric
192
194
* )
193
195
selectedIndex=$(( selectedIndex))
194
- if [ $selectedIndex -eq 0 ]; then
195
- break
196
- elif [ $selectedIndex -gt $i ]; then
196
+ if [ $selectedIndex -gt $i ]; then
197
197
echo " Incorrect option number."
198
198
else
199
199
local provider=${providers[$selectedIndex - 1]}
You can’t perform that action at this time.
0 commit comments