Skip to content

fix(harness): preserve thinking blocks in session transcripts - #4636

Open
KSI-cell wants to merge 1 commit into
agentscope-ai:2.0.xfrom
KSI-cell:fix/session-transcript-thinking-blocks
Open

KSI-cell wants to merge 1 commit into
agentscope-ai:2.0.xfrom
KSI-cell:fix/session-transcript-thinking-blocks

Conversation

@KSI-cell

@KSI-cell KSI-cell commented Dec 5, 2026

Copy link
Copy Markdown

AgentScope-Java Version

2.0.6-SNAPSHOT (2.0.x)

Description

Refs #4628.

Session transcripts flatten thinking and answer text into a single string, so readers cannot distinguish them when replaying a conversation. This PR adds an ordered contentBlocks field to messages that contain thinking. It preserves the existing content field and the JSON shape of text-only messages. Existing entries without contentBlocks remain readable.

The regression test reproduces the missing field on the base code and verifies that thinking and multiline answer text keep their types and order after writing and reading the transcript. All 22 tests in SessionTranscriptWriterTest, SessionTreeMirrorTest, and SessionTranscriptStoreRoutingTest passed.

Checklist

  • Changed Java files pass Spotless.
  • Full mvn test suite.
  • Added Javadoc for the transcript block type and field.
  • Code is ready for review.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov

codecov Bot commented Dec 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants