snow-ai 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -166,6 +166,7 @@ export default function ConfigScreen({ onBack, onSave, inlineMode = false, }) {
|
|
|
166
166
|
if (value === '__DELETE__') {
|
|
167
167
|
if (activeProfile === 'default') {
|
|
168
168
|
setErrors(['Cannot delete the default profile']);
|
|
169
|
+
setIsEditing(false); // Exit editing mode to prevent Select component error
|
|
169
170
|
return;
|
|
170
171
|
}
|
|
171
172
|
setProfileMode('deleting');
|
|
@@ -222,6 +223,10 @@ export default function ConfigScreen({ onBack, onSave, inlineMode = false, }) {
|
|
|
222
223
|
const handleDeleteProfile = () => {
|
|
223
224
|
try {
|
|
224
225
|
deleteProfile(activeProfile);
|
|
226
|
+
// Important: Update activeProfile state BEFORE loading profiles
|
|
227
|
+
// because deleteProfile switches to 'default' if the active profile is deleted
|
|
228
|
+
const newActiveProfile = getActiveProfileName();
|
|
229
|
+
setActiveProfile(newActiveProfile);
|
|
225
230
|
loadProfilesAndConfig();
|
|
226
231
|
setProfileMode('normal');
|
|
227
232
|
setIsEditing(false);
|