LibreChat/client
Marco Beretta 1cc4277d1b 🔑 feat: Expose the Messages Key on the Chat Contract (#16395)
* feat: expose the messages key and the submitted response on the chat contract

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

* fix: keep the submitted response in the chat host instead of reading the submission atom

The contract's initialResponse is now the response ask submitted, held beside
the host's own state and exposed only while the turn is in flight, so a settled
turn and a run restored after a reload report none, and the submission atom
gains no reader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

* fix: take the submission ask builds as a value and document the empty messages key

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

* fix: scope the submitted response to its chat and promise seeded positions, not identity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

* docs: note that a new chat's submitted response ends at its saved id

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

* fix: end the submitted response with its turn and note that the stream can continue the last seeded part

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

* refactor: drop the submitted response from the chat contract

A run can be restored, replaced or torn down outside ask, so a copy of the
submitted response kept in the host describes the wrong run on those paths. The
contract keeps messagesKey only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

* test: cover the messages key across chat switches in the mock e2e harness

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQdLgSaTheiBFHYnUDgobw

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 77a1cfa31d)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16395
2026-10-01 03:46:18 +00:00
..
public 🔤 feat: Bundle Inconsolata for the ClickHouse Theme (#16376) 2026-10-01 03:46:17 +00:00
src 🔑 feat: Expose the Messages Key on the Chat Contract (#16395) 2026-10-01 03:46:18 +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 🔤 feat: Bundle Inconsolata for the ClickHouse Theme (#16376) 2026-10-01 03:46:17 +00:00