LibreChat/client
Marco Beretta 379554a8cf 🚦 refactor: Route Chat Send, Stop, Steer and Queue Through the Transport (#16593)
* refactor: Start and Stream Agent Turns Through the Chat Transport

useResumableSSE now POSTs the turn with transport.start and attaches with
transport.stream({ token }).reconnectToStream, both read from ChatTransportContext.
The new transport spec renders the hook with a fake transport and covers the started
and rejected start.

* refactor: Stream Assistants Turns Through the Chat Transport

useSSE sends the turn with transport.stream({ token }).send from ChatTransportContext.
The transport spec covers the request it makes, closing on unmount, and a stream error.

* refactor: Stop Generations Through the Chat Transport

useAbortStreamMutation takes its mutation from transport.abort, and the Assistants
abort request moves from a fetch in useEventHandlers to transport.abortRun. The transport
spec stops an agents run and an Assistants run against a fake transport, including a
rejected stop.

* refactor: Steer Running Generations Through the Chat Transport

The steer, cancel-steer and arm-steer mutation hooks take their requests from
transport.steer, transport.cancelSteer and transport.armSteer. The transport spec
steers a running generation against a fake transport and checks that a refused steer
is kept as a queued turn.

* refactor: Queue Turns Through the Chat Transport

The queued-turn projection reads through transport.listQueued, and the enqueue and
cancel mutation hooks take transport.enqueue and transport.cancelQueued. The transport
spec reads, adds and withdraws a server queued turn against a fake transport, and keeps a
turn local when the server has no queue. The steer tests now answer the projection from
the fake transport instead of the request layer.

* test: Type the Transport Spec's Recoil Seeds

The seed callbacks take recoil's MutableSnapshot instead of a type read off RecoilRoot's
props union, which has no initializeState member on every branch. Drops the unused emit
helper.

* test: Cover Steer Cancel and Arm at the Transport Boundary

useSteerReclaim withdraws a waiting steer through transport.cancelSteer and
useSteerEscalate arms one through transport.armSteer, each against the fake transport.

(cherry picked from commit f772a26a40)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16593
2026-10-01 11:50:52 +00:00
..
public 🔤 fix: Ship the Theme Font Faces With the Package (#16485) 2026-10-01 03:46:18 +00:00
src 🚦 refactor: Route Chat Send, Stop, Steer and Queue Through the Transport (#16593) 2026-10-01 11:50:52 +00:00
sw
test
babel.config.cjs
check_updates.sh
index.html 🗄️ fix: Fall Back to In-Memory Storage When Web Storage Is Denied (#16431) 2026-09-28 12:28:52 +02:00
jest.config.cjs 🧩 feat: MCP Apps support (#13831) 2026-10-01 03:46:16 +00:00
jest.resolver.cjs
nginx.conf
package.json 🧩 feat: MCP Apps support (#13831) 2026-10-01 03:46:16 +00:00
postcss.config.cjs 🌊 refactor: Upgrade the Client to Tailwind v4 (#15996) 2026-10-01 03:46:16 +00:00
tailwind.config.cjs 📐 feat: Radius and Font Scales Follow the Theme (#16340) 2026-10-01 03:46:17 +00:00
tsconfig.json
vite.config.ts 🔤 fix: Ship the Theme Font Faces With the Package (#16485) 2026-10-01 03:46:18 +00:00