🐛 fix: Memories Key Updates (#8302)

* Updated the PATCH /memories/:key endpoint to allow key changes while ensuring no duplicate keys exist.
* Improved error handling in MemoryCreateDialog and MemoryEditDialog for key validation and duplication scenarios.
* Added a new translation for memory key validation error in translation.json.
This commit is contained in:
Dustin Healy 2025-07-07 13:38:55 -07:00 committed by GitHub
parent f4d97e1672
commit 12b08183ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 68 additions and 15 deletions

View file

@ -52,6 +52,10 @@ export default function MemoryCreateDialog({
if (axiosError.response?.status === 409 || errorMessage.includes('already exists')) {
errorMessage = localize('com_ui_memory_key_exists');
}
// Check for key validation error (lowercase and underscores only)
else if (errorMessage.includes('lowercase letters and underscores')) {
errorMessage = localize('com_ui_memory_key_validation');
}
}
} else if (error.message) {
errorMessage = error.message;