Repository navigation
fix(markdown-chat): preserve text-only MCP results in output envelopes - #16
Merged
devnoname120 merged 4 commits intoNov 10, 2026
Conversation
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.
Unstructured MCP tools can return useful text while Markdown-chat adds an empty
structuredContentenvelope. Clients that prefer structured output then see{}instead of the tool result. Metadata-only structured output can hide the text in the same way.This change mirrors nonempty text into
structuredContent.contentwhen the tool has no original output schema and no upstreamcontentfield. The generated mirror stays within the configured structured-output budget, including JSON escaping and upstream metadata, before user notices and ticket handoffs are attached.content, metadata, error state, and non-text blocks for ordinary results; retain the existing schema-aware wrapping behavior.Validation at
5cbaf9370fcc1627ce61c9654cc425732f03d898:cargo fmt --all --checkandgit diff --check: passed.cargo clippy --locked --all-targets -- -D warnings: passed.cargo test --locked --all -- --test-threads=4: 1,618 passed, 0 failed, 14 ignored.853b8e6ff22600fbfceae8e60f0b4e5f648b0e7e.The first local run at default concurrency timed out in the existing workspace-switch test's three-second wait. That test passed independently and in the complete four-thread run above.
A follow-up commit applies formatting only to the ticket-isolation test file inherited from main, satisfying the workflow's separate
rustfmt --edition 2024 --checkstep. Both the Cargo formatting check and the explicit included-file check pass locally.