LibreChat/api/server/services
Danny Avila 81139046e5
🔄 refactor: Convert OCR Tool Resource to Context (#9699)
* WIP: conversion of `ocr` to `context`

* refactor: make `primeResources` backwards-compatible for `ocr` tool_resources

* refactor: Convert legacy `ocr` tool resource to `context` in agent updates

- Implemented conversion logic to replace `ocr` with `context` in both incoming updates and existing agent data.
- Merged file IDs and files from `ocr` into `context` while ensuring deduplication.
- Updated tools array to reflect the change from `ocr` to `context`.

* refactor: Enhance context file handling in agent processing

- Updated the logic for managing context files by consolidating file IDs from both `ocr` and `context` resources.
- Improved backwards compatibility by ensuring that context files are correctly populated and handled.
- Simplified the iteration over context files for better readability and maintainability.

* refactor: Enhance tool_resources handling in primeResources

- Added tests to verify the deletion behavior of tool_resources fields, ensuring original objects remain unchanged.
- Implemented logic to delete `ocr` and `context` fields after fetching and re-categorizing files.
- Preserved context field when the context capability is disabled, ensuring correct behavior in various scenarios.

* refactor: Replace `ocrEnabled` with `contextEnabled` in AgentConfig

* refactor: Adjust legacy tool handling order for improved clarity

* refactor: Implement OCR to context conversion functions and remove original conversion logic in update agent handling

* refactor: Move contextEnabled declaration to maintain consistent order in capabilities

* refactor: Update localization keys for file context to improve clarity and accuracy

* chore: Update localization key for file context information to improve clarity
2025-09-18 20:06:59 -04:00
..
Artifacts 🧪 fix: Editor Styling, Incomplete Artifact Editing, Optimize Artifact Context (#8953) 2025-08-08 15:49:58 -04:00
Config 🧹 chore: Remove Unused Cache Configuration Keys (#9551) 2025-09-10 19:01:44 -04:00
Endpoints 🎚️ feat: Anthropic Parameter Set Support via Custom Endpoints (#9415) 2025-09-08 14:35:29 -04:00
Files 🔄 refactor: Convert OCR Tool Resource to Context (#9699) 2025-09-18 20:06:59 -04:00
Runs 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
start 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
Threads 🔧 fix: Assistants API SDK calls to match Updated Arguments (#8818) 2025-08-02 12:19:58 -04:00
Tools 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
ActionService.js 🪐 feat: MCP OAuth 2.0 Discovery Support (#7924) 2025-06-17 13:50:33 -04:00
ActionService.spec.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
AppService.interface.spec.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
AppService.js 🗄️ feat: Allow Skipping Transactions When Balance is Disabled (#9419) 2025-09-05 11:21:02 -04:00
AppService.spec.js 🔗 feat: Custom Jina API URL for Web Search Reranking (#9236) 2025-09-06 08:39:20 -04:00
AssistantService.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
AuthService.js 🔃 fix: Refresh Token Edge Cases (#9625) 2025-09-13 21:36:45 -04:00
cleanup.js 🧹 fix: Resolve Unarchive Conversation Bug, Archive Pagination (#4189) 2024-09-22 17:21:50 -04:00
createRunBody.js feat: Add Current Datetime to Assistants (v1/v2) (#4952) 2024-12-11 15:26:18 -05:00
domains.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
domains.spec.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
GraphApiService.js 🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804) 2025-08-13 16:24:17 -04:00
GraphApiService.spec.js 🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804) 2025-08-13 16:24:17 -04:00
GraphTokenService.js 📁 feat: Integrate SharePoint File Picker and Download Workflow (#8651) 2025-08-13 16:24:16 -04:00
initializeMCPs.js 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
initializeOAuthReconnectManager.js 💫 feat: MCP OAuth Auto-Reconnect (#9646) 2025-09-17 16:49:36 -04:00
MCP.js 💫 feat: MCP OAuth Auto-Reconnect (#9646) 2025-09-17 16:49:36 -04:00
MCP.spec.js 💫 feat: MCP OAuth Auto-Reconnect (#9646) 2025-09-17 16:49:36 -04:00
ModelService.js 🎚️ feat: Anthropic Parameter Set Support via Custom Endpoints (#9415) 2025-09-08 14:35:29 -04:00
ModelService.spec.js 🎚️ feat: Anthropic Parameter Set Support via Custom Endpoints (#9415) 2025-09-08 14:35:29 -04:00
PermissionService.js fix: Disable TTL For Transient OIDC Users In Permission Service (#9643) 2025-09-17 14:21:36 -04:00
PermissionService.spec.js 🛂 feat: Role as Permission Principal Type 2025-08-13 16:24:23 -04:00
PluginService.js 🔌 feat: MCP Reinitialization and OAuth in UI (#8598) 2025-07-22 22:52:45 -04:00
ToolService.js 🔄 refactor: Convert OCR Tool Resource to Context (#9699) 2025-09-18 20:06:59 -04:00
twoFactorService.js 🪐 feat: MCP OAuth 2.0 Discovery Support (#7924) 2025-06-17 13:50:33 -04:00
UserService.js 🪐 feat: MCP OAuth 2.0 Discovery Support (#7924) 2025-06-17 13:50:33 -04:00