LibreChat/packages/api
Danny Avila 01c85ab709
📍 feat: Show the Current Text Where a Missing Workspace Edit Belongs (#16698)
* 📍 feat: Show the Current Text Where a Missing Workspace Edit Belongs

Render the current-text excerpt that LibreChat-AI/code-interpreter#300 workers append to a missing edit's EDIT_CONFLICT diagnosis: a strict parse keeps it only when every row is well formed (contiguous numbers matching the stated range, a known mark, a bounded single line), and LibreChat renders it as a numbered block under its edit with a summary of which lines differ. The excerpt passes the file-content policy like a read_file result and reaches only the model; logs keep the excerpt-free message.

Also stop rendering every 409 as a text mismatch: a Code API rejection such as WORKSPACE_QUARANTINED now passes through with its own reason, and the worker's repetitive-candidate refusal is recognized.

* 🔒 fix: Name Other Attached Edit 409s by Code Instead of Forwarding Their Body

A 409 whose code is not EDIT_CONFLICT (a quarantined workspace) now gets a host-worded message naming only its validated code, with recovery guidance for WORKSPACE_QUARANTINED, and logs keep a body of just that code.

* 🧾 fix: Present Quoted Edit Excerpts as Partial Context, Not Text to Copy

A worker excerpt can window a long region and shorten wide lines with an ellipsis, so the guidance now asks the model to correct old_text against it and use read_file for lines it leaves out or shortens, here and in the attached edit_file descriptions.

* 🔐 fix: Quote Edit Excerpts Only Where the Workspace Allows read_file

A workspace that offers edit_file without read_file now never receives the worker's current-text excerpt, so a failing edit cannot read file content the operation policy withholds.

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-10-03 06:00:22 -04:00
..
openapi 🧳 feat: Choose Agent-Allowed Machines For New Chats (#16651) 2026-10-02 08:38:14 -04:00
src 📍 feat: Show the Current Text Where a Missing Workspace Edit Belongs (#16698) 2026-10-03 06:00:22 -04:00
types
.gitignore
babel.config.cjs
jest.config.mjs 🧩 feat: MCP Apps support (#13831) 2026-10-01 03:46:16 +00:00
jest.setup.cjs
package.json 🔑 feat: Passkey Authentication with WebAuthn Sign-In and Management (#14715) 2026-10-01 03:46:16 +00:00
tsconfig-paths-bootstrap.mjs
tsconfig.build.json
tsconfig.json
tsconfig.openapi.json 🔌 feat: OpenAPI spec and docs for the public Agents API (#15928) 2026-09-16 13:50:05 -04:00
tsconfig.spec.json
tsdown.config.mjs 🏋️ fix: Bound Host File Edits Outside the API Event Loop (#16677) 2026-10-02 20:54:46 -04:00