LibreChat/client/src/components/Messages
Danny Avila fbe341a171
refactor: Latest Message Tracking with Robust Text Key Generation (#10059)
* chore: enhance logging for latest message actions in message components

* fix: Extract previous convoId from latest text in message helpers and process hooks

- Updated `useMessageHelpers` and `useMessageProcess` to extract `convoId` from the previous text key for improved message handling.
- Refactored `getLengthAndLastTenChars` to `getLengthAndLastNChars` for better flexibility in character length retrieval.
- Introduced `getLatestContentForKey` function to streamline content extraction from messages.

* chore: Enhance logging for clearing latest messages in conversation hooks

* refactor: Update message key formatting for improved URL parameter handling

- Modified `getLatestContentForKey` to change the format from `${text}-${i}` to `${text}&i=${i}` for better URL parameter structure.
- Adjusted `getTextKey` to increase character length retrieval from 12 to 16 in `getLengthAndLastNChars` for enhanced text processing.

* refactor: Simplify convoId extraction and enhance message formatting

- Updated `useMessageHelpers` and `useMessageProcess` to extract `convoId` using a new format for improved clarity.
- Refactored `getLatestContentForKey` to streamline content formatting and ensure consistent use of `Constants.COMMON_DIVIDER` for better message structure.
- Removed redundant length and last character extraction logic from `getLengthAndLastNChars` for cleaner code.

* chore: linting

* chore: Simplify pre-commit hook by removing unnecessary lines
2025-10-10 04:22:16 -04:00
..
Content 🧑‍💼 feat: Add Agent Model Validation (#8995) 2025-08-11 14:26:28 -04:00
ContentRender.tsx refactor: Latest Message Tracking with Robust Text Key Generation (#10059) 2025-10-10 04:22:16 -04:00
MessageContent.tsx 🪨 feat: AWS Bedrock support (#3935) 2024-09-09 12:06:59 -04:00
ScrollToBottom.tsx 🎨 feat: UI Refresh for Enhanced UX (#6346) 2025-03-25 18:50:58 -04:00