[mason] Chat app: Capabilities refresh no longer wipes the conversation - #524
Open
akansal2 wants to merge 1 commit into
Open
[mason] Chat app: Capabilities refresh no longer wipes the conversation#524akansal2 wants to merge 1 commit into
akansal2 wants to merge 1 commit into
Conversation
The runtime "Capabilities" refresh button (#refresh-config → loadConfig) also
re-hydrated the chat log from the persisted transcript. Re-hydration rebuilds the
log from the checkpoint/session-store transcript, dropping browser-only messages
(errors) and empty-content assistant tool-call ("Tool request") bubbles — so
clicking refresh made messages disappear.
Give loadConfig a `hydrateChat` flag: the Capabilities refresh now passes
hydrateChat=false (refresh the capability indicators only, leave the conversation
alone), while initial page load still hydrates so a reload restores the
conversation. Applied to both the langgraph and openai chat-app templates.
Co-authored-by: Isaac <no-reply@databricks.com>
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
In the Mason chat-app templates, the runtime Capabilities refresh button (
#refresh-config→loadConfig) also re-hydrated the chat log from the persisted transcript. Re-hydration rebuilds the log from the checkpoint / Session-Store transcript, which omits browser-only messages (errors) and empty-content assistant tool-call ("Tool request") bubbles — so clicking the Capabilities ↻ made messages disappear from the conversation.Fix
Give
loadConfigahydrateChatflag:loadConfig({ hydrateChat: false })— refreshes the capability indicators only, leaves the conversation intact.loadConfig()defaults totrue), so a reload still restores the conversation from the transcript.Applied to both chat-app templates:
agent-langgraphandagent-openai.Testing
Scaffolded a langgraph chat app and ran it locally with
mason dev: reproduced the bug (Capabilities ↻ dropped the tool-call and answer bubbles), applied the fix, hard-refreshed, and confirmed the Capabilities ↻ now leaves the conversation intact while a full page reload still restores it.