Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
blove
added this pull request to the merge queue
Nov 16, 2026
Any commits made after this event will not be merged.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Regenerate to React
Chat's built-in message actions, backed by a new optional command on the core session and an implementation in the framework-neutral LangGraph session. Until now React left it out becauseAgentSessionhad no command for it.Changes
Core
AgentSessiongains optionalregenerate?(messageId, options?). A session that cannot regenerate leaves it undefined, and callers offer no control. It rejects when the message cannot be regenerated, such as during a run. No existing session has to change.LangGraph runtime
session.regenerate(messageId)finds the prompt before that assistant message, reads the thread's history, and forks from the newest saved checkpoint that does not hold that prompt yet, submitting the prompt's text there. It is built on the existingfork, so everyforkrule applies after the read. The earlier answer stays on its old branch in the thread.getHistory,getState,getRunStatusandjoinStream, the capabilitiesforkneeds.React
onRegenerate(messageId)and show a Regenerate button beside Copy. It is disabled while a response is running.ChatfillsonRegeneratefromsession.regeneratewhenmessageActionsis set and the session has the command, and ignores a rejection. An app that passes its ownonRegeneratekeeps control.messageActionsstays opt-in, so nothing changes for aChatwithout it.Limits
Chat.Verification
regenerate.spec.ts, 11 tests over a thread with two turns and a checkpoint per step: the last and an earlier answer, each rejection, and the capability gate. Inverting the checkpoint choice fails 3 of them.regenerate.spec.tsx, 6 tests: offered only with the command andmessageActions, calls the session with the message id, app callback wins, disabled while running, works onMessageList.npx nx run-many -t test,type-tests,lint -p core,reactand-t test,lint,runtime-quality,runtime-type-tests -p langgraph: pass.core,content,angular,react;verify-packages.mjs;verify-langgraph-candidate.mjs;inventory.mjs --check --drift warn; the 169 verifier spec tests: pass.🤖 Generated with Claude Code