mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-25 03:36:12 +01:00
🐛 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:
parent
f4d97e1672
commit
12b08183ff
4 changed files with 68 additions and 15 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue