lang-core: @ToAssistant context as any value - #1298
Open
Aditya-thesys wants to merge 2 commits into
Open
Aditya-thesys wants to merge 2 commits into
Aditya-thesys wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Aditya-thesys
force-pushed
the
feat/lang-core-to-assistant-context
branch
from
October 5, 2026 06:28
6cc8505 to
58dc2cc
Compare
…ext through as any value The context argument of @ToAssistant(message, context) is no longer coerced to a string. Any value (object, array, number, string) is kept, including falsy ones; null or a missing argument means no context. The renderers forward it in params.context whenever it is set.
The stored user turn for a continue_conversation action becomes
["User clicked: msg", formState, context] when a context is set, with {}
holding the form slot when there is no form. Without a context the
message is unchanged. Card item context merges into an object context as
selectedItem and stays a text suffix for other contexts.
Aditya-thesys
force-pushed
the
feat/lang-core-to-assistant-context
branch
from
October 5, 2026 15:28
58dc2cc to
d8e7541
Compare
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.
@ToAssistant(message, context)now passescontextthrough as any value instead of turning it into a string.0,false,""). Missing or null means no context.params.context.["User clicked: msg", formState, context]({}in the form slot when there is no form). Messages without a context are byte-identical. muse reads this JSON as text, so no backend change is needed.selectedItem.Single-step actions moved out of this PR to a later actions PR.
Open question for review: keep the array format, or switch to an object like
{"form": {...}, "context": {...}}.