LibreChat/client/src/components
Danny Avila fbaf7d1a6c
🗂️ feat: Better Persistence for Code Execution Files Between Sessions (#11362)
* refactor: process code output files for re-use (WIP)

* feat: file attachment handling with additional metadata for downloads

* refactor: Update directory path logic for local file saving based on basePath

* refactor: file attachment handling to support TFile type and improve data merging logic

* feat: thread filtering of code-generated files

- Introduced parentMessageId parameter in addedConvo and initialize functions to enhance thread management.
- Updated related methods to utilize parentMessageId for retrieving messages and filtering code-generated files by conversation threads.
- Enhanced type definitions to include parentMessageId in relevant interfaces for better clarity and usage.

* chore: imports/params ordering

* feat: update file model to use messageId for filtering and processing

- Changed references from 'message' to 'messageId' in file-related methods for consistency.
- Added messageId field to the file schema and updated related types.
- Enhanced file processing logic to accommodate the new messageId structure.

* feat: enhance file retrieval methods to support user-uploaded execute_code files

- Added a new method `getUserCodeFiles` to retrieve user-uploaded execute_code files, excluding code-generated files.
- Updated existing file retrieval methods to improve filtering logic and handle edge cases.
- Enhanced thread data extraction to collect both message IDs and file IDs efficiently.
- Integrated `getUserCodeFiles` into relevant endpoints for better file management in conversations.

* chore: update @librechat/agents package version to 3.0.78 in package-lock.json and related package.json files

* refactor: file processing and retrieval logic

- Added a fallback mechanism for download URLs when files exceed size limits or cannot be processed locally.
- Implemented a deduplication strategy for code-generated files based on conversationId and filename to optimize storage.
- Updated file retrieval methods to ensure proper filtering by messageIds, preventing orphaned files from being included.
- Introduced comprehensive tests for new thread data extraction functionality, covering edge cases and performance considerations.

* fix: improve file retrieval tests and handling of optional properties

- Updated tests to safely access optional properties using non-null assertions.
- Modified test descriptions for clarity regarding the exclusion of execute_code files.
- Ensured that the retrieval logic correctly reflects the expected outcomes for file queries.

* test: add comprehensive unit tests for processCodeOutput functionality

- Introduced a new test suite for the processCodeOutput function, covering various scenarios including file retrieval, creation, and processing for both image and non-image files.
- Implemented mocks for dependencies such as axios, logger, and file models to isolate tests and ensure reliable outcomes.
- Validated behavior for existing files, new file creation, and error handling, including size limits and fallback mechanisms.
- Enhanced test coverage for metadata handling and usage increment logic, ensuring robust verification of file processing outcomes.

* test: enhance file size limit enforcement in processCodeOutput tests

- Introduced a configurable file size limit for tests to improve flexibility and coverage.
- Mocked the `librechat-data-provider` to allow dynamic adjustment of file size limits during tests.
- Updated the file size limit enforcement test to validate behavior when files exceed specified limits, ensuring proper fallback to download URLs.
- Reset file size limit after tests to maintain isolation for subsequent test cases.
2026-01-22 10:01:44 -05:00
..
Agents 🪄 refactor: UI Polish and Admin Dialog Unification (#11108) 2025-12-28 11:01:25 -05:00
Artifacts 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
Audio ️ fix: Accessibility, UI consistency, dialog & avatar refactors (#9975) 2025-10-07 14:12:49 -04:00
Auth feat: Zod Email Validation at Login (#11434) 2026-01-20 14:45:07 -05:00
Banners 🧠 style: Expanded Thinking footer, Banner links, and Copy Thoughts accessibility (#11142) 2025-12-29 13:49:18 -05:00
Bookmarks 🪄 refactor: UI Polish and Admin Dialog Unification (#11108) 2025-12-28 11:01:25 -05:00
Chat 🗂️ feat: Better Persistence for Code Execution Files Between Sessions (#11362) 2026-01-22 10:01:44 -05:00
Conversations ↕️ fix: Add aria-expanded Attribute to ConvoOptions (#11452) 2026-01-21 13:52:08 -05:00
Endpoints 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
Files 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
Input 🪦 refactor: Remove Legacy Code (#10533) 2025-12-11 16:36:12 -05:00
MCP 🔎 fix: Focus Credential Inputs in Agent Tools (#11394) 2026-01-19 12:02:24 -05:00
MCPUIResource 👨‍✈️ chore: Minor MCP-UI Logic Cleanup (#10950) 2025-12-12 17:10:57 -05:00
Messages 🧜 refactor: Focus Rendering for Mermaid Diagram (#11181) 2026-01-02 13:17:07 -05:00
Nav 🔖 fix: Announce Bookmark Selection State (#11450) 2026-01-21 13:49:50 -05:00
OAuth 🪟 feat: DataTable update + Various UI enhancements (#9698) 2025-12-11 16:39:06 -05:00
Plugins/Store 🔎 fix: Focus Credential Inputs in Agent Tools (#11394) 2026-01-19 12:02:24 -05:00
Prompts 🔧 refactor: Permission handling for Resource Sharing (#11283) 2026-01-10 14:02:56 -05:00
Share 📜 fix: Layout/Overflow handling in Share View (#11314) 2026-01-12 20:11:34 -05:00
SharePoint 🎨 style: Theming in SharePointPickerDialog, PrincipalAvatar, and PeoplePickerSearchItem 2025-08-13 16:24:23 -04:00
Sharing 🔧 refactor: Permission handling for Resource Sharing (#11283) 2026-01-10 14:02:56 -05:00
SidePanel 🦥 feat: Add Deferred Tools as Agents Capability (#11295) 2026-01-22 10:01:42 -05:00
System feat: Prevent Screen Sleep During Response Generation (#10597) 2025-11-21 09:14:32 -05:00
Tools 🌙 fix: Agent Builder MCP Tool Removal Button Text Contrast (#11223) 2026-01-06 11:20:05 -05:00
ui 🧩 feat: Standardize empty states, improve MCP icon upload accessibility, and refine UI layout (#11195) 2026-01-05 13:46:35 -05:00
Web 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
index.ts 🔧 refactor: Organize Sharing/Agent Components and Improve Type Safety 2025-08-13 16:24:20 -04:00