mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
fix: prevent unnecessary config operations when renaming to same name
- Add validation in UI to early return when renaming config to current name - Add server-side validation to prevent config save/delete operations
This commit is contained in:
@@ -60,6 +60,11 @@ const ApiConfigManager = ({
|
||||
if (editState === "new") {
|
||||
onUpsertConfig(trimmedValue)
|
||||
} else if (editState === "rename" && currentApiConfigName) {
|
||||
if (currentApiConfigName === trimmedValue) {
|
||||
setEditState(null)
|
||||
setInputValue("")
|
||||
return
|
||||
}
|
||||
onRenameConfig(currentApiConfigName, trimmedValue)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user