Repository navigation
fix: publish the agent's answer verbatim in summary - #20
Conversation
The unwrapping of response, summary, result, output and text fields was a leftover from the CLI's --output-format json days. The SDK returns the final message as plain text, so a JSON answer lost every field but one.
🦋 Changeset detectedLatest commit: a5e4bf0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
parseSummarytried toJSON.parsethe agent's answer and, when it was an object with aresponse,summary,result,output, ortextfield, published only that field. That was a leftover from the CLI's--output-format jsondays; the SDK returns the final message as plain text, so a workflow asking for a JSON answer silently lost every other field.summaryis now the answer verbatim, trimmed, with terminal colour codes stripped.Related Issues
None.
Checklist
.github/–only changes).github/–only community or template updates)Screenshots (if applicable)
N/A
Additional Notes
The five tests that asserted the unwrapping are replaced by one that asserts a JSON-shaped answer comes through unchanged.
dist/is rebuilt. The behaviour only changes for answers that happen to be JSON objects, which is what the docs already described.