LibreChat/packages/api/src/agents
Danny Avila a771d70b10
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
🎬 fix: Code Session Context In Event Driven Mode (#11673)
* fix: Update parseTextParts to handle undefined content parts

- Modified the parseTextParts function to accept an array of content parts that may include undefined values.
- Implemented optional chaining to safely check for the type of each part, preventing potential runtime errors when accessing properties of undefined elements.

* refactor: Tool Call Configuration with Session Context

- Added support for including session ID and injected files in the tool call configuration when a code session context is present.
- Improved handling of tool call configurations to accommodate additional context data, enhancing the functionality of the tool execution handler.

* chore: Update @librechat/agents to version 3.1.37 in package.json and package-lock.json

* test: Add unit tests for createToolExecuteHandler

- Introduced a new test suite for the createToolExecuteHandler function, validating the handling of session context in tool calls.
- Added tests to ensure correct passing of session IDs and injected files based on the presence of codeSessionContext.
- Included scenarios for handling multiple tool calls and ensuring non-code execution tools are unaffected by session context.

* test: Update createToolExecuteHandler tests for session context handling

- Renamed test to clarify that it checks for the absence of session context in non-code-execution tools.
- Updated assertions to ensure that session_id and _injected_files are undefined when non-code-execution tools are invoked, enhancing test accuracy.
2026-02-07 03:09:55 -05:00
..
__tests__ 🪙 fix: Max Output Tokens Refactor for Responses API (#8972) 2025-08-10 14:08:35 -04:00
openai 🦥 refactor: Event-Driven Lazy Tool Loading (#11588) 2026-02-01 08:50:57 -05:00
responses 🛸 feat: Remote Agent Access with External API Support (#11503) 2026-01-28 17:44:33 -05:00
auth.ts 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
avatars.spec.ts 🌅 fix: Agent Avatar S3 URL Refresh Pagination and Persistence (#11323) 2026-01-13 13:01:11 -05:00
avatars.ts 🌅 fix: Agent Avatar S3 URL Refresh Pagination and Persistence (#11323) 2026-01-13 13:01:11 -05:00
chain.ts 🤖 feat: Agent Handoffs (Routing) (#10176) 2025-11-05 17:15:17 -05:00
context.spec.ts 🧑‍🏫 fix: Multi-Agent Instructions Handling (#11484) 2026-01-22 19:36:06 -05:00
context.ts 🦥 refactor: Event-Driven Lazy Tool Loading (#11588) 2026-02-01 08:50:57 -05:00
edges.spec.ts 🫱🏼🫲🏽 refactor: Improve Agent Handoffs (#11172) 2026-01-01 16:02:51 -05:00
edges.ts 🫱🏼🫲🏽 refactor: Improve Agent Handoffs (#11172) 2026-01-01 16:02:51 -05:00
handlers.spec.ts 🎬 fix: Code Session Context In Event Driven Mode (#11673) 2026-02-07 03:09:55 -05:00
handlers.ts 🎬 fix: Code Session Context In Event Driven Mode (#11673) 2026-02-07 03:09:55 -05:00
index.ts 📉 feat: Add Token Usage Tracking for Agents API Routes (#11600) 2026-02-01 21:36:51 -05:00
initialize.ts 🔦 fix: Tool resource files not visible in event-driven mode (#11610) 2026-02-04 10:11:47 +01:00
legacy.test.ts 🔄 refactor: Convert OCR Tool Resource to Context (#9699) 2025-09-18 20:06:59 -04:00
legacy.ts 🔄 refactor: Convert OCR Tool Resource to Context (#9699) 2025-09-18 20:06:59 -04:00
memory.spec.ts 🧩 fix: Missing Memory Agent Assignment for Matching IDs (#11514) 2026-01-25 12:08:52 -05:00
memory.ts 🧩 fix: Missing Memory Agent Assignment for Matching IDs (#11514) 2026-01-25 12:08:52 -05:00
migration.ts 🔧 refactor: Centralize Collection Checks for Permissions Migration (#9565) 2025-09-10 20:40:58 -04:00
resources.test.ts 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
resources.ts 🧵 refactor: Migrate Endpoint Initialization to TypeScript (#10794) 2025-12-11 16:37:16 -05:00
run.spec.ts 🦥 refactor: Event-Driven Lazy Tool Loading (#11588) 2026-02-01 08:50:57 -05:00
run.ts 🌙 feat: Moonshot Provider Support (#11621) 2026-02-04 10:53:57 +01:00
tools.spec.ts 🦥 refactor: Event-Driven Lazy Tool Loading (#11588) 2026-02-01 08:50:57 -05:00
tools.ts 🦥 refactor: Event-Driven Lazy Tool Loading (#11588) 2026-02-01 08:50:57 -05:00
usage.spec.ts 📉 feat: Add Token Usage Tracking for Agents API Routes (#11600) 2026-02-01 21:36:51 -05:00
usage.ts 📉 feat: Add Token Usage Tracking for Agents API Routes (#11600) 2026-02-01 21:36:51 -05:00
validation.ts ⏲️ feat: Defer Loading MCP Tools (#11270) 2026-01-28 17:44:30 -05:00