LibreChat/client/src/components/Chat/Messages/Content
Danny Avila 7c9c7e530b
⏲️ feat: Defer Loading MCP Tools (#11270)
* WIP: code ptc

* refactor: tool classification and calling logic

* 🔧 fix: Update @librechat/agents dependency to version 3.0.68

* chore: import order and correct renamed tool name for tool search

* refactor: streamline tool classification logic for local and programmatic tools

* feat: add per-tool configuration options for agents, including deferred loading and allowed callers

- Introduced `tool_options` in agent forms to manage tool behavior.
- Updated tool classification logic to prioritize agent-level configurations.
- Enhanced UI components to support tool deferral functionality.
- Added localization strings for new tool options and actions.

* feat: enhance agent schema with per-tool options for configuration

- Added `tool_options` schema to support per-tool configurations, including `defer_loading` and `allowed_callers`.
- Updated agent data model to incorporate new tool options, ensuring flexibility in tool behavior management.
- Modified type definitions to reflect the new `tool_options` structure for agents.

* feat: add tool_options parameter to loadTools and initializeAgent for enhanced agent configuration

* chore: update @librechat/agents dependency to version 3.0.71 and enhance agent tool loading logic

- Updated the @librechat/agents package to version 3.0.71 across multiple files.
- Added support for handling deferred loading of tools in agent initialization and execution processes.
- Improved the extraction of discovered tools from message history to optimize tool loading behavior.

* chore: update @librechat/agents dependency to version 3.0.72

* chore: update @librechat/agents dependency to version 3.0.75

* refactor: simplify tool defer loading logic in MCPTool component

- Removed local state management for deferred tools, relying on form state instead.
- Updated related functions to directly use form values for checking and toggling defer loading.
- Cleaned up code by eliminating unnecessary optimistic updates and local state dependencies.

* chore: remove deprecated localization strings for tool deferral in translation.json

- Eliminated unused strings related to deferred loading descriptions in the English translation file.
- Streamlined localization to reflect recent changes in tool loading logic.

* refactor: improve tool defer loading handling in MCPTool component

- Enhanced the logic for managing deferred loading of tools by simplifying the update process for tool options.
- Ensured that the state reflects the correct loading behavior based on the new deferred loading conditions.
- Cleaned up the code to remove unnecessary complexity in handling tool options.

* refactor: update agent mocks in callbacks test to use actual implementations

- Modified the agent mocks in the callbacks test to include actual implementations from the @librechat/agents module.
- This change enhances the accuracy of the tests by ensuring they reflect the real behavior of the agent functions.
2026-01-28 17:44:30 -05:00
..
__tests__ 💻 feat: Deeper MCP UI integration in the Chat UI (#9669) 2025-12-11 16:41:11 -05:00
Parts ⏲️ feat: Defer Loading MCP Tools (#11270) 2026-01-28 17:44:30 -05:00
ActionIcon.tsx feat: Assistants API, General File Support, Side Panel, File Explorer (#1696) 2024-02-13 20:42:27 -05:00
AgentHandoff.tsx 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
CancelledIcon.tsx 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
CodeAnalyze.tsx 🖼️ feat: Tool Call and Loading UI Refresh, Image Resize Config (#7086) 2025-05-19 19:23:11 -04:00
Container.tsx 🛡️ fix: Enhance File Upload Security & Error Handling (#4705) 2024-11-12 16:41:04 -05:00
ContentParts.tsx ⏸ refactor: Improve UX for Parallel Streams (Multi-Convo) (#11096) 2025-12-25 01:43:54 -05:00
DialogImage.tsx 🏞️ fix: Image Preview Refactor with Accessibility Enhancements (#11217) 2026-01-05 16:31:35 -05:00
EditMessage.tsx ⏸ refactor: Improve UX for Parallel Streams (Multi-Convo) (#11096) 2025-12-25 01:43:54 -05:00
Files.tsx feat: OAuth for Actions (#5693) 2025-02-10 15:56:08 -05:00
FinishedIcon.tsx 🖼️ feat: Tool Call and Loading UI Refresh, Image Resize Config (#7086) 2025-05-19 19:23:11 -04:00
Image.tsx 🏞️ fix: Image Preview Refactor with Accessibility Enhancements (#11217) 2026-01-05 16:31:35 -05:00
ImageGen.tsx 👟 style: WrenchIcon and ImageGen SVG Animations (#2382) 2024-04-23 08:14:28 -04:00
InProgressCall.tsx feat: OAuth for Actions (#5693) 2025-02-10 15:56:08 -05:00
Markdown.tsx 💻 feat: Deeper MCP UI integration in the Chat UI (#9669) 2025-12-11 16:41:11 -05:00
MarkdownComponents.tsx 📋 feat: Add Floating Copy Button to Code Blocks (#11113) 2025-12-26 20:56:06 -05:00
MarkdownErrorBoundary.tsx refactor: Imports to Prevent Circular Type Refs (#8423) 2025-07-12 11:37:07 -04:00
MarkdownLite.tsx 🧭 fix: Add Base Path Support for Login/Register and Image Paths (#10116) 2025-11-21 11:25:14 -05:00
MemoryArtifacts.tsx 🧠 feat: Enforce Token Limit for Memory Usage (#8401) 2025-07-11 14:46:19 -04:00
MemoryInfo.tsx 🧠 feat: Enforce Token Limit for Memory Usage (#8401) 2025-07-11 14:46:19 -04:00
MessageContent.tsx 🧠 refactor: Improve Reasoning Component Structure and UX (#10320) 2025-10-31 13:05:12 -04:00
ParallelContent.tsx ⏸ refactor: Improve UX for Parallel Streams (Multi-Convo) (#11096) 2025-12-25 01:43:54 -05:00
Part.tsx ⏲️ feat: Defer Loading MCP Tools (#11270) 2026-01-28 17:44:30 -05:00
ProgressCircle.tsx 🔧 chore: Update ESLint Config & Run Linter (#10986) 2025-12-15 17:55:25 -05:00
ProgressText.tsx 🛗 fix: Address Accessibility Issues - Axe Rating: Serious (#10521) 2025-12-11 16:36:32 -05:00
RetrievalCall.tsx feat: Assistants API, General File Support, Side Panel, File Explorer (#1696) 2024-02-13 20:42:27 -05:00
RetrievalIcon.tsx feat: Assistants API, General File Support, Side Panel, File Explorer (#1696) 2024-02-13 20:42:27 -05:00
SearchContent.tsx 📦 feat: Move Shared Components to @librechat/client (#8685) 2025-07-27 12:19:01 -04:00
SiblingHeader.tsx 🪜 fix: Layering Conflicts and UX Polish (#11177) 2026-01-02 11:43:03 -05:00
ToolCall.tsx 🔇 fix: Hide Button Icons from Screen Readers (#10776) 2025-12-11 16:35:17 -05:00
ToolCallInfo.tsx ✂️ refactor: Artifacts and Tool Callbacks to Pass UI Resources (#9581) 2025-09-11 14:34:07 -04:00
UIResourceCarousel.tsx 💻 feat: Deeper MCP UI integration in the Chat UI (#9669) 2025-12-11 16:41:11 -05:00
WebSearch.tsx 🔎 feat: Native Web Search with Citation References (#7516) 2025-05-23 17:40:40 -04:00
WrenchIcon.tsx 👟 style: WrenchIcon and ImageGen SVG Animations (#2382) 2024-04-23 08:14:28 -04:00